// Crystalreport. rpt is the name of the crystal report file. crystalreportsource1 is the object of the crystal report data source added to the page from the toolbox.
Crystalreportsource1.reportdocument. Load (server. mappath ("crystalreport. rpt "));
// This method must be used in setdatabaselogon PULL mode to set logon information. Parameters 1: User Name; parameter 2: password; parameter 3: Server; parameter 4: Database Name
Crystalreportsource1.reportdocument. setdatabaselogon ("sa", "123456", @ "sywzswl \ sqlexpress", "test ");
// Transmit parameters to the crystal report. Parameter 1: Parameter Name, parameter 2: parameter value;
Crystalreportsource1.reportdocument. setparametervalue ("title", "this is a test report ");
Crystalreportsource1.reportdocument. setparametervalue ("parm", "1 ");
// Bind the crystal report data source.
Crystalreportsource1.databind ();
// Crystalreportviewer1 is the crystal report browser.
Crystalreportviewer1.reportsource = crystalreportsource1;
Crystalreportviewer1.databind ();
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