Ask Your Question
1

How can a crystal report be created from a dataset in Vb.Net?

asked 2022-09-11 11:00:00 +0000

huitzilopochtli gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2021-08-14 23:00:00 +0000

plato gravatar image

To create a crystal report from a dataset in VB.NET, follow the steps below:

  1. Create a new Windows Forms application in Visual Studio.
  2. Add a reference to the CrystalDecisions.CrystalReports.Engine and CrystalDecisions.Shared assemblies.
  3. Add a Crystal Report to your project.
  4. Create a dataset in your project that contains the data you want to display in the report.
  5. Drag and drop a Crystal Report Viewer control onto your form.
  6. 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

  7. 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.

edit flag offensive delete link more

Your Answer

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

Add Answer


Question Tools

Stats

Asked: 2022-09-11 11:00:00 +0000

Seen: 14 times

Last updated: Aug 14 '21