开发者

Print Dialog Does not show up in Crystal Report Viewer on 64 bit machine

I have a client, who is running Windows 2008 Server 64 bit. He is running our software, it has a built in crystal report viewer functionality.

The print dialogue just wouldn't work no matter what. It worked on our 32 bit box and we verified it. I verified it on our 64 bit box, and the print dialogue didn't open either. I did some research online. And one suggestion is to set m_printDlg.UseEXDialog = True. I tried that, but that DID NOT WORK EITHER...

I am kind of frustrated now. Has anyone encountered the similar issue? If so, please let me know.

Here is the code snippet.

#R开发者_运维百科egion " Methods "

Public Overrides Sub PrintReport()

    ' NOTE: Do not use bug in reportviewer
    'MyBase.PrintReport()

    Dim objRpt As ReportDocument = CType(Me.ReportSource, ReportDocument)

    If m_printDlg Is Nothing Then
        m_printDlg = New PrintDialog
    End If

    m_printDlg.PrinterSettings = ReportEngine.GetPrinterSettings(objRpt)
    m_printDlg.UseEXDialog = True

    'm_printDlg.ShowDialog(Me)
    If m_printDlg.ShowDialog = DialogResult.OK Then
        ReportEngine.PrintReportDocument(objRpt, m_printDlg.PrinterSettings)
    End If

End Sub

End Region


Try compiling your application to target any or target x64 (if already any) and see if that has any effect.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜