Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

Program crashes when I try to export to pdf file using CR for VS2010

$
0
0

I'm using VS2010, framework 4.0. I can view, print, and export the report to excel. When I click export, select pdf, enter a file name, and click save...I get the following message:

 

Value cannot be null.

Parameter name: window

 

I added Ludek's code to limit exports to pdf and excel to my JPTreportView.xaml.vb file:

 

Public Class JPTReportView

 

        Private Sub UserControl_Loaded(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles MyBase.Loaded

            reportViewer.ViewerCore.ReportSource = Me.DataContext.ReportSource

            reportViewer.ViewerCore.ToggleGroupTree = False

            reportViewer.ViewerCore.ToggleParameterPanel = False

            reportViewer.ViewerCore.ToggleSidePanel = False

            Dim exportFlags = (CrystalDecisions.Shared.ViewerExportFormats.PdfFormat Or CrystalDecisions.Shared.ViewerExportFormats.ExcelFormat)

            reportViewer.ViewerCore.AllowedExportFormats = exportFlags

        End Sub

    End Class


Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>