I have a site consisting of div s that are made visible="true" or visible="false" based on what buttons the user operates. One of the div s contains a ReportViewer...
...the problem being that when the button is operated to make divReports visible="true" in the codebehind the report does not display. No exception is thrown and nothing shows up in the debug output but the page is just empty. If I change the code so that
the div divReports is visible="true" when the site is first accessed the reporting displays on the page just fine.
Can someone kindly show me what I need to do to make the report display on the page when the button is operated to make divReports visible="true"? Thanks tonnes for any help, Roscoe
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
May be you can define a global variable. When you click a button and change the global variable value. Then, in psotback (page_load) event, you can set divReports visible="true/false" based on the global variable.
Best Regards,
Yohann Lu
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Thanks for the reply Yohann Lu but that does not work either.
I also tried adding the text "top" to the top of the <div> and "bottom" to the end of the <div> when the button to make the <div> visible=true the text "top" appears, followed by the space that should be displaying the ReportViewer (which is empty) followed
by the text "bottom".
So it looks like the visibility of the <div> is not the issue.
As I wrote before when the div is made visible=true on first load of the site the ReportViewer show up fine and even after the button was operated.
Can someone explain what is going on? Thanks tonnes for any help, Roscoe
1: Postpone setting the report definition until you make the ReportViewer visible.
2: When making the ReportViewer visible, also make a trivial change to the ReportViewer to trigger a definition change. The easiest way to do this is to toggle the value of ReportViewer.ProcessingMode (e.g. set it from Remote to Local then back again).
You can refer the following detailed description and solutions
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Member
108 Points
294 Posts
SSRS reporting does not display when containing <div> made visible
Jun 09, 2016 01:04 PM|rpfinnimore|LINK
I have a site consisting of div s that are made visible="true" or visible="false" based on what buttons the user operates. One of the div s contains a ReportViewer...
...the problem being that when the button is operated to make divReports visible="true" in the codebehind the report does not display. No exception is thrown and nothing shows up in the debug output but the page is just empty. If I change the code so that the div divReports is visible="true" when the site is first accessed the reporting displays on the page just fine.
Can someone kindly show me what I need to do to make the report display on the page when the button is operated to make divReports visible="true"? Thanks tonnes for any help, Roscoe
Star
11464 Points
2439 Posts
Re: SSRS reporting does not display when containing <div> made visible
Jun 10, 2016 04:29 AM|Yohann Lu|LINK
Hi rpfinnimore,
From your description, you can try the following suggestions.
1: Use ReportViewer1.ShowReportBody
2: set Div Visibility.
3: Make a DIV visible and invisible with JavaScript
http://stackoverflow.com/questions/9456289/how-to-make-a-div-visible-and-invisible-with-javascript
http://stackoverflow.com/questions/18379894/how-to-set-visible-property-for-div-in-javascript
Best Regards,
Yohann Lu
Member
108 Points
294 Posts
Re: SSRS reporting does not display when containing <div> made visible
Jun 14, 2016 07:11 PM|rpfinnimore|LINK
I think it has something to do with the button causing a postback. I need to reload the report. Can someone show me how to do that?
Star
11464 Points
2439 Posts
Re: SSRS reporting does not display when containing <div> made visible
Jun 17, 2016 10:15 AM|Yohann Lu|LINK
Hi rpfinnimore,
May be you can define a global variable. When you click a button and change the global variable value. Then, in psotback (page_load) event, you can set divReports visible="true/false" based on the global variable.
Best Regards,
Yohann Lu
Member
108 Points
294 Posts
Re: SSRS reporting does not display when containing <div> made visible
Jun 20, 2016 12:50 PM|rpfinnimore|LINK
Thanks for the reply Yohann Lu but that does not work either.
I also tried adding the text "top" to the top of the <div> and "bottom" to the end of the <div> when the button to make the <div> visible=true the text "top" appears, followed by the space that should be displaying the ReportViewer (which is empty) followed by the text "bottom".
So it looks like the visibility of the <div> is not the issue.
As I wrote before when the div is made visible=true on first load of the site the ReportViewer show up fine and even after the button was operated.
Can someone explain what is going on? Thanks tonnes for any help, Roscoe
Star
11464 Points
2439 Posts
Re: SSRS reporting does not display when containing <div> made visible
Jun 29, 2016 07:19 AM|Yohann Lu|LINK
Hi rpfinnimore,
There are two ways to solve this issue.
1: Postpone setting the report definition until you make the ReportViewer visible.
2: When making the ReportViewer visible, also make a trivial change to the ReportViewer to trigger a definition change. The easiest way to do this is to toggle the value of ReportViewer.ProcessingMode (e.g. set it from Remote to Local then back again).
You can refer the following detailed description and solutions
The Invisible ReportViewer:
https://blogs.msdn.microsoft.com/brianhartman/2010/11/16/the-invisible-reportviewer/
Best Regards,
Yohann Lu