更新时间:2023-11-14 19:00:22
与其在Crystal Report查看器中显示报告,还可以将其转换为PDF,然后启动它. PDF. Adobe将显示所有页面以及滚动条.
这是 ^ ],了解如何进行转换.
这是我创建PDF后使用的一种方法(它在vb.net中,但是应该很容易转换):
Instead of displaying the report in a crystal report viewer, you could convert it to a PDF and then just launch the PDF. Adobe displays all pages together with a scroll bar.
Here are the google results[^] for how to convert it.
Here is a method I use to launch pdfs after I''ve created them (it''s in vb.net but should be easy to convert):
Public Sub LaunchPDF(ByVal strFile As String)
If strFile.Trim.Length <> 0 AndAlso System.IO.File.Exists(strFile.Trim) Then
Try
Process.Start(strFile.Trim)
Catch ex As System.ComponentModel.Win32Exception
MessageBox.Show("To view a report after it has been turned into a PDF, your computer must have Adobe Reader." & _
vbCr & "Please download and install Adobe Reader from http://www.adobe.com.", gblstrFormText)
Catch ex As Exception
MessageBox.Show("Unable to view PDF." & vbCr & "Error: " & ex.Message, gblstrFormText)
End Try
End If
End Sub
希望这会有所帮助.
Hope this helps.