DevExpress Xtrareports Getting started four creating a WEB report

Source: Internet
Author: User

Original: DevExpress Xtrareports get started four create a WEB report

This article is only to help the first contact or need to devexpress Xtrareports report of the people to use, in order to help more people will not like me to waste time to write this article, master don't want to see please pass by

This article is to devexpress xtrareports help documentation, as seen in similar please skip.

Talk less about getting started.

I. Create a WEB report and bind the data

    1. starts MS Visual Studio (2005, 2008, or 2010).
    2. Create a new ASP. NET WEB application.
    3. To add a new report to the WEB application.
    4. Now you need to add the dataset to the Web application.
          Note
            You can not add datasets to a report in the same way as in getting started two. Instead, you first manually add the dataset to the application and assign it to the report's Xtrareportbase.datasource property.
      To do this, in the Project menu, choose Add New Item ..., in the dialog box that is called, select DataSet, and then click the Add button.

    5. Then, in the Open DataSet Designer, drag and drop the Categories data table from the Server Explorer panel onto the designer's interface.

      Saves the changes you made and exits the DataSet Designer.
    6. Now, switch to the report's designer and click the smart tag for the report. In the list of actions invoked, specify the dataset you created as the Xtrareportbase.datasource of the report.

      After this step, two additional properties are automatically specified: The Xtrareportbase.datamember property value is set to the Categories,xtrareportbase.dataadapter property value is set to Categoriestableadapter.

    7. Now that the report is bound to data, you can adjust the layout of the report by dragging the fields you want from the field list to the report band. For this guide, we copy the report created in the Getting Started two, which has the following layout.

      checks to see if the report layout you created meets the requirements for exporting to HTML: report controls cannot intersect each other. Otherwise, the HTML output will become confusing. If the Xtrareport.showexportwarnings property is enabled (enabled by default), then the intersecting controls are drawn in red. Therefore, you should rearrange them as shown in.

Second, display the report in the webpage

    1. Switch to the Default.aspx tab, and click the Design button at the bottom of the page to view the designer for this page.
    2. To embed the report in a Web page, we expand the Dx.10.2:reporting Toolbox tab and drag and drop the ReportViewer control onto the Web page. To provide navigation tools for reports, you can also add Reporttoolbar controls.


      Attention
      After the Reporttoolbar or ReportViewer control is added to the WEB application (the first time only), the application's Web. config file is changed.

    3. To link the ReportToolbar1 and ReportViewer1 controls together, you need to set the Reporttoolbar.reportviewer property to an existing ReportViewer1 object.

    4. To specify the report object that will be rendered through the ReportViewer1 control, you need to set its Reportviewer.report property to XtraReport1.

Iii. viewing the results of the operation

The WEB report is now ready. Run the application and view the ASP. NET page created in the system's default Web browser. If the Default.aspx page is not specified as the startup page for the project, then right-click the page in Solution Explorer and select Set As Start Page menu item and run it again.

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.