2013年8月14日星期三

Telerik Reporting in ASP.NET Application

 

today learned T elerik Reporting control use. Because no contact with before, just started learning it at a loss, I feel very difficult. But the actual through to find information, a step by step after trying discovered that in fact did not imagine so headache. After three hours of study I made a report, make a summary of this process now.

 

fact T elerik Reporting is a very user-friendly controls, a report generation almost without writing code, is through the" WYSIWYG "mode is completed. Because customers need to use the actual project T elerik Reporting controls, they need to report to the page. From the steps are as follows:

 

an installation Telerik Reporting Controls

 

in the official website http://www.telerik.com/products/reporting.aspx download T elerik Reporting online installation package . Installation is best to turn off Visual Studio (not related to the problem will not know, just in case best to turn off). Installation is only necessary to check the "Reporting" option. Downloads about 60M, wait for the automatic installation is complete.

 

two, New Report

 

installation is complete, the Visual Studio menu bar will display" Telerik "option, but does not yet have operational sub-menu. As shown below:

 

 

 

add in the project "New Item" search " reporting "Found just installed reporting controls, they need to modify the file name. As shown below:

 

 

 

pop Wizard: Wizard's role is bound to a data source.

 

 

 

same time you can see reporting editing interface by 3 files composed of:

 

 

 

 

three, bound data <​​strong>

 

Then the above set the data source wizard interface. If the wizard screen is turned off, you can " Telerik " screen opens, as shown below:

 

 

click NEXT is set as follows:

 

 

 

 

 

 

Choose your data now available source, because my project using the EF with SQL Service of You can select the desired options according to their own, will not go into here.

 

 

 

 

 

 

then select the project EF Model name and your project TracTerraModel.edmx unanimously ( If not, then try another one ) . As follows:

 

 

 

choose the one you want to display table (In fact, personally feel that it does not matter what point here, but if not, then do not point the next step, you just order a table, right), point NEXT , as shown: < / span>

 

 

 

Then,

 

 

 

select the report you want to display in the column to the corresponding region, has been point NEXT, statements generate success. As shown below:

 

 

 

 

 

 

 

 

 

point in the middle of preview File to see the data has been bound to succeed.

 

 

 

 

Third, the report to the page

 

 

1. start toolbox drag Report < span style = "font-family: Arial;"> Viewer control to the page design view:

 

 

 

 

2. in web.config configuration inside the following information:

 

system.web in: < / span>

 

 

 

...

 

 

...

 

 

 

 

system.webServer in: < / span>

 

 

...

 

 

 

...

 

;

 

...

 

 

...

 

 

3. in need Showing page background call this report , the code is as follows:

 

 

 

The red part is created < / span> Report object.

 

 

point, All work is done, run the program, open the page to see the report.

没有评论:

发表评论