Vbnet crystal report conversion methods
Create a new Crystal Report, and then create the data of the current Crystal Report on the page.
The background code is as follows:
The attributes and methods for defining and formatting reports, setting export options, and setting Print Options and report options can be accessed through the objects returned by the reportdocument attribute.
Dim customerreport as reportdocument = new reportdocument
Dim reportpath as string = server. mappath ("crystalreport2.rpt") 'specifies the report path
Customerreport. Load (reportpath) 'loads a new report. If a report has been loaded, close it and open a new report.
Dim dataset as dataset = datasetconfiguration. customerdataset 'Load the dataset
Customerreport. setdatasource (Dataset) 'optimize tables object' to the optimize table Engine
'Mermerreport. setparametervalue ("pards", "sdfsdfsdfsdfsdf") 'first method of parameter value passing in a crystal report
CustomerReport. ParameterFields ("pards"). CurrentValues. AddValue ("sdflu8888888888") 'Second method of parameter value passing IN THE CRYSTAL REPORT
CrystalReportViewer. ReportSource = mermerreport specifies the report for the CrystalReportViewer control.
CrystalReportViewer. ShowFirstPage () 'displays the first page of data for loading a report.