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

Any luck getting WPF ReportViewer to fill containing area?

3 Answers 152 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jules
Top achievements
Rank 1
Jules asked on 13 May 2010, 12:10 AM
I am playing with the new WPF ReportViewer and am wondering if there is a secret to getting it to fill a container without overflow? It does just great when a specific height and width are set, but if I remove the height and width settings from the XAML tag and just let it fill up the enclosing grid cell, when my reports are long it overflows. Instead of the edge of the ReportViewer being contained and the vertical scrollbar being activated, it just pushes beyond the edge of the window.

Any tips or ideas? I'd like to have a window that users can resize, and ideally I'd like to do so without having to code something that catches a resize-type event and calculates a new specific size for the report viewer.

Thanks in advance for any ideas.....

J

3 Answers, 1 is accepted

Sort by
0
Jules
Top achievements
Rank 1
answered on 13 May 2010, 12:13 AM
Here's a screenshot to illustrate.

J
0
Peter
Telerik team
answered on 17 May 2010, 02:52 PM
Hi Julia Essex,

The WPF Report Viewer fills the parent cell by default. Check out the Telerik Reporting examples that came with your installation. In the example we haven't set any size properties to the viewer and it is able to fill the parent grid cell. We suspect that you have set a size to the parent cell that forces the view to grow beyond the windows. 

If you still experience difficulties send us your xaml that shows the unexpected behavior you have encountered, so we can investigate it locally.

Regards,
Peter
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Ashif
Top achievements
Rank 1
answered on 14 Oct 2011, 11:04 PM
Also ensure that your ReportViewer control is not nested within a pre-existing ScrollViewer.  
I had the same problem and couldn't figure out why my ReportViewer was overflowing out of the cell boundary when a report was too wide.  I noticed my view's parent template had a ScrollViewer wrapping all child content. Removing the parent ScrollViewer solved the problem and prevented the ReportViewer from growing when the report contained within it is too large to fit the container.

Now, scrollbars only appear when necessary in the report's container and everything sits tightly within the ReportViewer.
Hope that helps someone else down the road.
Tags
General Discussions
Asked by
Jules
Top achievements
Rank 1
Answers by
Jules
Top achievements
Rank 1
Peter
Telerik team
Ashif
Top achievements
Rank 1
Share this question
or