Get started with devexpress xtrareports 1. Create a hello World Report

Source: Internet
Author: User

 

This article is only intended to help people who are new to users or who need devexpress xtrareports reports. To help more people, this article will not be written as a waste of time.ArticleYou can see what you don't want.

The devexpress xtrareports help document is provided in this Article. If you have read similar articles, skip this document.

Start with things.

This article consists of four steps:

    • Create an applicationProgramAdd a report
    • Build reports
    • Output report
    • View running results

I,Create an application

1. Start MS Visual Studio (2005, 2008, or 2010 ).

2. Create a Windows form application (or create a Windows Application in Visual Studio 2005 ).

3. In the project menu, select Add new project... (or press Ctrl + Shift + a) to call the Add new project dialog box.

4. In the dialog box, select xtrareport class v10.2 and click Add. In this way, a blank report is added to the application.

You can also select xtrareport wizard v10.2 to call the Report Wizard. This wizard helps you quickly create standard reports.

 

Ii. Build reports

 

    1. Visual Studio now displays the designer for creating a report (by default, the report name is xtrareport1 and will be used in this course ). Note: This report is derived from the xtrareport class, which is the basic class for all reports. You can find that this behavior is similar to the result of creating a form derived from the form class. (To continue creating a report, open the Toolbox pane (for example, press CTRL + ALT + x) and select the xrlabel control (on the dx.10.2: Report controls tab ), and drag it to the detail band of the report ).

Double-click the created tag and call its built-in editor that allows the input text. For example, type the classic Hello world! Statement. Then, use the xtrareports toolbar to adjust the label color and font options.

 

Switch to the preview tab (click the preview button at the bottom of the report designer ).

Similarly, if you want to view the HTML appearance of the report, switch to the HTML view tab.

Iii. output reports

      1. Switch to the form1 designer and add three system. Windows. Forms. button controls to the form. Modify their text to preview, print, and edit respectively.

Write the following click event handler for these buttons.

 
Private void button#click (Object sender, eventargs e) {// create a report. xtrareport1 report = new xtrareport1 (); // show the report's preview. report. showpreview ();} private void button2_click (Object sender, eventargs e) {// create a report. xtrareport1 report = new xtrareport1 (); // print the report. report. print ();} private void button3_click (Object sender, eventargs e) {// create a report. xtrareport1 report = new xtrareport1 (); // open the report in the End-User Designer. report. showdesigner ();}

 

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.