水晶报表的等待框卡顿的问题(Crystal Reports)

框架中添加Crystal Reports,画面使用时有等待框卡顿的情况,

在代码的内存清空之后加上「GC.Collect() 」。程序应该等待框卡顿问题会改善。           


            With reportDoc
                '指定通常的打印机
                Dim localPrinter As System.Drawing.Printing.PrintDocument = New PrintDocument()
                .PrintOptions.PrinterName = localPrinter.PrinterSettings.PrinterName
                'ReportDocument的DataSource指定
                .SetDataSource(src)
            End With


            Dim report As New CRP(reportDoc, zoomLevel, canPrint, canExport, canDrillDown)
            report.ShowDialog()

            reportDoc.Close()
            reportDoc.Dispose()
            report.Dispose()
            report = Nothing

            GC.Collect() '释放内存



 

如果资源学习了,可以点赞支持!

你可能感兴趣的:(.net)