Use Crystal Report (lower) (cashcho flip in Visual Studio. NET

Source: Internet
Author: User
Tags visual studio
Use Crystal Report (lower) in Visual Studio. NET)

From www.aspfree.com
Translated by cash (World 7)
Cashcao@msn.com (cashcao@msn.com)

Crystal Report demonstration-use Push Model

The following describes how to use the Push Model to implement Crystal Reports.

1. Create a design-time dataset
2. Create a. rpt file and point it to the dataset we created earlier.
3. Place the Crystal Report Viewer control on the. aspx page and set its properties to point to the. rpt file created in the previous step.
4. Write the database connection function in code behind page.
5. Add the databind method.

Create a design-time dataset to define the Fielsds of Reports.

1) right-click "Solution Explorer" and choose "Add" --> select "Add New Item --> Select" DataSet"




2) drag the "Stores" table from "SQL Server" on the "Server Explorer" panel.




3) this will create a "Stores" table in dataset.





The. xsd file created in this way only contains the definition of field, and there is no data in it. You need to create a connection to the database and fill in the data.

Create a. rpt file

4) Create a. rpt file. The only difference from the previous one is that we will use dataset to create a table instead of using Crystal Report.

5) after creating the. rpt file, right-click "Details" section and select "Add/Remove Database"

6) in the "Database Expert" window, expand "Project Data", expand "ADO. NET DataSet", "DataSet1", and select "Stores" table.

7) click ">" include "Stores" table into "Selected Tables"




8) next, set the report layout.
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.