Crystal report production instance, vs crystal report instance

Source: Internet
Author: User

Crystal report production instance, vs crystal report instance

The crystal report seems to be an old report technology. It is a report product developed by SAP. by installing the Development Kit, you can integrate the Crystall Reports designer in. You can create reports through visual design and operations. Just recently, I had a little help for my friend. He also mentioned how TO USE THE CRYSTAL REPORT technology to print and export reports in batches. N years without Crystal Reports, just practice.

We use the mainstream flagship version of VS2010 as the development tool. Vs2010.pdf is not integrated with the crystal report. Install the crforvs_13_0.exe package. Here I provide one for you to download and install.

Http://yunpan.cn/cVzPeMMWnJqFv access password 238a

The following shows how to use the crystal report to develop a report application under asp.net. This application reads the relevant information (including images) from the access database and displays it in our designed report template. Finally, basic functions such as batch printing and export are implemented.

First create an asp.net project, and then create a new Crystal Reports file.


Create a blank report.


Then we can design what we want in this blank report, as shown in:


Right-click the database field and select a database expert.


In the pop-up dialog box, create a new connection and select our access database.


Then, you can select the displayed fields in the database Field List on the right and drag them to the corresponding position of the designer on the right (delete the repeated string text box in the header ).

However, because the photo information stores the binary data of the image, it can be displayed in the designer after being dragged directly, but the webpage cannot be displayed normally. In this case, you need to set Web. config. Add the following nodes:

 

Then you can directly display the images in the database.

Before running the project, you need to explain the following details:

1. The reports are incomplete on each page. At last, there is always a blank page.

This problem occurs because unnecessary parts of the page are not removed. You need to make the following settings:




2. How to Set Font alignment



Numbers do not contain commas


After the preparation is complete, we can directly display it on the page.

Drag a CrystalReportViewer control on the page. It will automatically do a lot of things, including referencing the corresponding dll and so on. Finally, write the following code in the background of the page.

Protected void Page_Load (object sender, EventArgs e) {ReportDocument rd = new ReportDocument (); rd. Load (Server. MapPath ("~ ") +" CrystalReport1.rpt "); rd. SetDataSource (xxx); // xxx dataset this. CrystalReportViewer1.ReportSource = rd ;}
Finally, let's take a look:

Batch printing and export (word and excel) are all appropriate. In this respect, Crystal Reports are both worry-free and effort-saving.



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.