To create a crystal report from a dataset in VB.NET, follow the steps below:
In the form's Load event, add the following code:
Dim report As New CrystalReport1() 'Replace CrystalReport1 with the name of your report report.SetDataSource(dataset1) 'Replace dataset1 with the name of your dataset CrystalReportViewer1.ReportSource = report
Run the application to display the report in the Crystal Report Viewer control.
Note: You may need to configure the Crystal Report Viewer control to connect to your database if your dataset is based on a database.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-09-11 11:00:00 +0000
Seen: 15 times
Last updated: Aug 14 '21
How can the access violation in crystal reports be expressed differently?
How can one suppress certain details sections on Crystal Reports based on the page number?
How can Pytorch circular padding be used to implement Floquet-Bloch boundary conditions?
How can details sections in Crystal Reports be suppressed depending on the page number?
How can I export an XML string as a text file in Crystal Reports?
How do you select in Crystal Reports?
How can the LCD (I2C) display the sum of money inserted into the coin acceptor?
What is the process of generating a class instance using a string name in Crystal?
How can I deal with Expression.Error related to a column in Power Query?