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

Render report without scrollbars

3 Answers 142 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Travis
Top achievements
Rank 1
Travis asked on 31 Oct 2011, 09:28 PM
I have reports that I want to display without paging so that they expand down the page without having to use the viewer's scrollbars.  Is there a way to do this?  I've got the non-paging reports working by using the GroupKeepTogether property, but I can't seem to set the viewer to not have a scrollbar and to render its full height.  Is this a limitation of using an iframe to render the report?

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 03 Nov 2011, 03:05 PM
Hi Travis,

The sizing behavior of all Report Viewers by design is not determined by their content, but from the form/page which contains the viewer. This behavior is typical for document viewers including Word/Pdf viewers. Pushing dynamic content on a page is more a CMS solutions task.

All the best,
Peter
the Telerik team

Q2’11 SP1 of Telerik Reporting is available for download (see what's new). Get it today.

0
Travis
Top achievements
Rank 1
answered on 03 Nov 2011, 03:16 PM
I ended up adding a custom tool to the report viewer's toolbar that would take the iframe's content and then put it into a div tag on my page.  I then hide the iframe in the viewer.  This simulated the effect I was looking for, but the user has to click on the tool to make it work.  I tried doing the same thing when the report was intially loaded, but was  unable to effectively determine when the report was finished loading.  I don't suppose there is some kind of client event I can tap into that will tell me when the report viewer is finished loading so that I can get the report iframe's html and put it into my div tag?
0
Steve
Telerik team
answered on 04 Nov 2011, 10:05 AM
Hi Travis,

To accomplish this goal you can replace the original OnReportLoaded method of the ReportViewer. It is fired exactly when needed: when the report is loaded in the report area. Here is an example:

<telerik:ReportViewer id="ReportViewer1" runat="server" ></telerik:ReportViewer>
        <script type="text/javascript">
            ReportViewer.OnReportLoadedOld = ReportViewer.OnReportLoaded;
            ReportViewer.prototype.OnReportLoaded = function() {                
                this.OnReportLoadedOld();                
                //do your thing
            }
        </script>

Hope this helps.

Greetings,
Steve
the Telerik team

Q2’11 SP1 of Telerik Reporting is available for download (see what's new). Get it today.

Tags
General Discussions
Asked by
Travis
Top achievements
Rank 1
Answers by
Peter
Telerik team
Travis
Top achievements
Rank 1
Steve
Telerik team
Share this question
or