How to Use the push mode of the crystal report?

Source: Internet
Author: User


1. Create an xsd file based on the report structure fields to store data.
2. Create a report. Note that you must browse the xsd file when creating the report,
After the report is created, find the report attribute "custom tool" and set the original
"CrystalDecisions. VSDesigner. CodeGen. ReportCodeGenerator"
Change to "CrystalDecisions. VSShell. CodeGen. ReportCodeGenerator"
This will generate a release XB. cs file named after your report name, which is actually the following class release XB
Create a page and place the CrystalReportViewer control to the page,
And declare the report class at the top of the page file,
Public class fr_policxb: System. Windows. Forms. Form
{
Using XB crReportDocument;
.........
3. Create a report structure
DataSet dss = new DataSet ();
DataTable dt = new DataTable ("zsmxb ");
Dt. Columns. Add ("cchbh", System. Type. GetType ("System. String "));
Dt. Columns. Add ("nglf", System. Type. GetType ("System. Decimal "));
Dt. Columns. Add ("ncf", System. Type. GetType ("System. Decimal "));
Dt. Columns. Add ("nqyf", System. Type. GetType ("System. Decimal "));
Dt. Columns. Add ("nzsf", System. Type. GetType ("System. Decimal "));
Dt. Columns. Add ("ntcf", System. Type. GetType ("System. Decimal "));
Dt. Columns. Add ("ngz", System. Type. GetType ("System. Decimal "));

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.