This is a migrated thread and some comments may be shown as answers.

ReportViewer is empty when I put it in a RadMultiPage and RadPageView

4 Answers 164 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael Hunt
Top achievements
Rank 1
Michael Hunt asked on 27 Jun 2014, 06:23 PM
Hi,

I am using version 6.2.12.1017 of your Reporting components.  I have an aspx page that uses the Telerik ReportViewer control.  When the page loads, I set the reports datasource and refresh the report.

The report is generated and data displays in it.

PROBLEM
=========
I just added a RadTabStrip with two tabs and a RadMultiPage with two RadPageViews.
A RadGrid is in the first tab/pageview and the second tab/pageview contains ReportViewer.

Now when the page loads the report is empty / blank until I hit the Report's Refresh button.  Then the report shows data immediately.

MORE INFORMATION
==================
- If I move the ReportView outside of the MultiPage/PageViewer, it again works correctly...  the reports is displayed as soon as the page loads as expected.
- Ajax isn't really involved.  The grid itself has a RadAjaxPanel around it.  I've tried putting the RadAjaxPanel around ALL controls (tab, multipage), but that didn't help.
- The page has a RadAjaxManager on it, but I've set EnableAJAX="false" and it didn't help.

What's the trick?  How can I make the report display on page load, when it is inside a RadMultiPage / PageView?

Thanks,
Michael

4 Answers, 1 is accepted

Sort by
0
Michael Hunt
Top achievements
Rank 1
answered on 27 Jun 2014, 06:30 PM
MORE INFORMATION
=================
- When I make the ReportViewer's tab the "default" (Selected="true" on the RadTab  and  SelectedIndex="1" on the RadMultiPage) then the reportviewer DOES show it's report on page load.

- However, I don't want that tab to be the default tab.

- And anyway, if I switch to the other tab and do something that reruns the report (does a postback), when I switch back to the reportviewer's tab, the report is empty again.

Thanks,
Michael
0
Michael Hunt
Top achievements
Rank 1
answered on 27 Jun 2014, 06:39 PM
MORE INFORMATION
=================
- I am testing in IE 9, and if I turn Compatibility View On, the ReportViewer displays correctly on Page Load.  However I can not use that for  a workaround.

- The same problem happens in Firefox.

- In Chrome, the reportview displays data, but there are big whitespace gaps above and below the reportviewer toolbar, which disappear when I refresh the report.
0
Michael Hunt
Top achievements
Rank 1
answered on 30 Jun 2014, 03:18 PM
UPDATE:
I removed the MultiPage and instead used two div tags (one for the grid and one for the reportviewer), and set display:none (css) on the div that shouldn't be displayed, based on the active radtab...

And the same problem happens.  It looks like when "display:none" is used the reportviewer won't display it's data.

WORKAROUND:
On tab click (OnClientTabSelected), if the tab that is clicked in the one that should show the ReportViewer div, I just use the following javascript to refresh the report.

var viewer = <%=MainReportViewer.ClientID%>;
viewer.RefreshReport();

Seems a little buggy though that I'd need to do this.

Thanks,
Michael
0
Stef
Telerik team
answered on 02 Jul 2014, 02:54 PM
Hello Michael,

The ASP.NET ReportViewer cannot be added or refreshed at the client. The viewer should be added on creating the PageView or clicking the Tab. Also it is recommended to use Standard document mode in IE - for more details check the Defining document compatibility msdn article.


You can switch to the new HTML5 Report Viewer, which will give you the required flexibility. The HTML5 Report Viewer is a HTML/CSS/JS client-side widget, which resources are served through a running Reporting REST Service - the possible implementations are Web API and ServiceStack based.

To use the viewer and the Reporting REST Web API for example,  follow the steps listed in the following articles:

1. How To: Add the HTML5 Report Viewer to an HTML page
2.
How To: Add Telerik Reporting REST Web API to Web Application




Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Michael Hunt
Top achievements
Rank 1
Answers by
Michael Hunt
Top achievements
Rank 1
Stef
Telerik team
Share this question
or