Crystal Report, solution-the message "the report you requested requires more information ."

Source: Internet
Author: User
String SQL = "Select * from Orders ";
String DBConfig_ SQL = @ "Data Source = WAN-9013A0BB35C \ SQL2005; Initial Catalog = Northwind; User ID = sa ";
DataSet ds = new DataSet ();
SqlConnection sqlCon = new SqlConnection (DBConfig_ SQL );
SqlCommand sqlCmd = new SqlCommand (SQL, sqlCon );
SqlDataAdapter sqglad = new SqlDataAdapter ();

Sqglad. SelectCommand = sqlCmd;
Sqglad. Fill (ds, "Orders ");

CrystalReportSource1.ReportDocument. Load (Server. MapPath ("CrystalReport. rpt "));
// Note that the name of the table in Dataset must be specified here. Otherwise, the system prompts "the report you requested requires more information ."
CrystalReportSource1.ReportDocument. SetDataSource (ds. Tables ["Orders"]);
//{?} You do not need to assign values to parameters in, even if a value is assigned.
CrystalReportSource1.ReportDocument. ParameterFields ["Parm"]. CurrentValues. AddValue ("1234567 ");
CrystalReportSource1.ReportDocument. ParameterFields ["Title"]. CurrentValues. AddValue ("sample report in Push mode! ");
CrystalReportSource1.DataBind ();

CrystalReportViewer1.ReportSource = CrystalReportSource1;
CrystalReportViewer1.DataBind ();

Summary:

Database Connection
Fill dataset
Report viewer obtains ReportDocument objects and extracts data from reports.
Pass dataset data to the Report Engine

 

Crystal Report registration code

Crystal Report registration code:
Password: AAP5GKS0000GHE100UM
Registration Code 6078043616
6110167826
Aap50gs1_gsg80038

Your registration number is 6275350665
Your new key is AAP5GKS0000GBB100C9
This is the 9.2 license key:
AVS50-81SG00S-G61002U 1236731231
9999999991
0019250903
0004400007
1112411119

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.