Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
595
Prints Great but XamReportPreview does not have series items rendered
posted

http://blogs.infragistics.com/wpf/articles/printing-the-xamdatagrid-with-infragistics-reports.aspx

 

Using the above as a reference I've had great results printing my report. For some reason though the Print Preview window has everything in it except for the actual series items. Even though there are no series items if I hit the Print button from the print preview window it will print all the series objects just fine.

 

    Public Shared Sub PrintPreview(ByVal V As Visual)

        Dim Report As New Report

        Dim Section1 As New EmbeddedVisualReportSection(V)
        Report.Sections.Add(Section1)

        Report.PageFooter = New TextBlock() With {.Text = My.Application.Info.Description & My.Application.Info.Version.ToString & " - CONFIDENTIAL INFORMATION - " & DateTime.Now.ToString, .VerticalAlignment = VerticalAlignment.Top}
        Report.ReportSettings.PageOrientation = PageOrientation.Landscape
        Report.ReportSettings.HorizontalPaginationMode = HorizontalPaginationMode.Scale
        Report.PageHeader = New TextBlock() With {.Text = My.Settings.TeamName, .VerticalAlignment = VerticalAlignment.Center, .TextAlignment = TextAlignment.Center, .FontWeight = FontWeights.Bold}

        Dim pp As New PrintPreview
        'Method Signature GeneratePreview(Report, bool showPrintDialog, bool   showReportProgressControl

        pp.xamReportPreview1.GeneratePreview(Report, False, True)

        pp.ShowDialog()
    End Sub

 

The 3rd line from the bottom is where the series items are actually added. What I mean is that if you look at the chart being passed into this subroutine it will have nothing in its series collection. Once the GeneratePreview method is called then the series items are added. I tried removing a series item from the Series collection and then adding it back to get it to 'redraw' but this made no difference. Any ideas?

Parents
No Data
Reply
  • 595
    Verified Answer
    posted

    Well it's certainly not elegant but I was able to get my PrintPreview series items to render by creating a 'DummyPrintPreview' routine which is identical to the above code except that pp.ShowDialog() is omitted. I made a call to my Dummy routine just before the Dim pp As New PrintPreview line.

Children