Hi
When i generate a preview for my datagrid the initial position is not on the top left. Somehow there's a margin?
Hello,
Did the sample provide what you were looking for?
Valerie
Please see the attached sample which renders the report.
Let me know if this resolves your issue.
Thanks,
Unfortunately the proposed solution didn't work. Here's the style and code:
<Style x:Key="PagePresenterStyle" TargetType="{x:Type igReporting:ReportPagePresenter}"> <Setter Property="HorizontalContentAlignment" Value="Left"/> <Setter Property="VerticalContentAlignment" Value="Top"/> </Style>
Report report = new Report(); //report.PagePresenterStyle = this.TryFindResource("PagePresenterStyle") as Style; EmbeddedVisualReportSection section = new EmbeddedVisualReportSection(idg1); section.PagePresenterStyle = this.TryFindResource("PagePresenterStyle") as Style; report.Sections.Add(section); this.XamReportPreview1.GeneratePreview(report, false, false);
Were you able to resolve this issue?
To remove the margins in the document. You can create a style for the ReportPagePresenter with two setters for Horizontal/VerticalContentAlignment and set those properties to left/top. Then on the Report (or EmbeddedVisualReportSection) you can set the PagePresenterStyle property to the style you created.