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

WPF ReportViewer margins

3 Answers 110 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sarah
Top achievements
Rank 1
Sarah asked on 06 Apr 2017, 05:19 PM
I'm trying to add margins to reports in our WPF report viewer when viewing them in print preview and also printing the report itself. We build our reports programmatically. I've set the PageSettings.Margins on the report to what I'd like them to be and I've set the report.Width to what I believe it should be but these fields have no effect on what is displayed in the report viewer itself or what happens when it is printed. Everything is shifted to the top left of the page. Is there a setting that I am missing?

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 11 Apr 2017, 12:00 PM
Hi Sarah,

The report's PageSettings are applied when you preview the report in PrintPreview mode of the viewer, or when you export in a physical format like PDF. For more details, please check Understanding Pagination.


If the preview looks shrunk in top left corner, the problem might be related to the machine's DPI settings. Test to open the machine's Control Panel\Appearance and Personalization\Display and set the magnifier to 100%.


Regards,
Stef
Telerik by Progress
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 Feedback Portal and vote to affect the priority of the items
0
Sarah
Top achievements
Rank 1
answered on 13 Apr 2017, 04:03 PM
It doesn't look shrunk in the top corner it just is in the top left corner. I checked my machine's DPI settings and everything was set correctly. We are previewing the report in PrintPreview as I stated above. I should mention we use the same custom report service in a Silverlight based app and the report margins are set and working correctly. The same code is not working in our WPF app. The PageSettings never get applied.
0
Stef
Telerik team
answered on 18 Apr 2017, 01:42 PM
Hi Sarah,

Please post the code for generating the report and the viewer's settings. Include also screenshots of the print preview of the working and not working applications. Also test to serialize in TRDX the modified report instance before using it for the viewer (before creating the InstanceReportSource). The TRDX file can be used for verifying the changes in the Standalone Report Designer.

In case you used events and upgraded to a version greater than R3 2016, please check Changes on items in report events are not applied and move the code in the report's constructor.


On your side, test running the application on different machines and check if the preview changes if you use different magnifying from Control Panel\Appearance and Personalization\Display.


Regards,
Stef
Telerik by Progress
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 Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Sarah
Top achievements
Rank 1
Answers by
Stef
Telerik team
Sarah
Top achievements
Rank 1
Share this question
or