How to display the design form of xtrareport in developer Express

Source: Internet
Author: User

the xtrareport designer can actually use xrdesignformex.

Using system; using system. collections. generic; using system. componentmodel; using system. data; using system. drawing; using system. LINQ; using system. text; using system. windows. forms; using devexpress. xtrareports. ui; using devexpress. xtrareports. userdesigner; using system. drawing. design; using system. componentmodel. design; namespace wfaxtrareport {public partial class form1: FORM {xtrareport R; // This can be the template public form1 () {initializecomponent ();} private void designform_formclosing (Object sender, formclosingeventargs e) {// processing the operation when the designer is disabled here, mainly using Custom Data Storage // R. savelayout (@ "C: \ 1. repx ");} private void designform_reportstatechanged (Object sender, reportstateeventargs E) {// set the status to save as long as the report changes. // avoid if (E. reportstate = reportstate. changed) {(xrdesignformex) sender ). designpanel. reportstate = reportstate. saved ;}} private void form1_load (Object sender, eventargs e) {r = new xtrareport (); // R. loadlayout (@ "C: \ 1. repx "); xrdesignformex designform = new xrdesignformex (); // hide the button designform. designpanel. setcommandvisibility (New reportcommand [] {reportcommand. newreport, reportcommand. savefileas, reportcommand. newreportwizard, reportcommand. openfile}, commandvisibility. none); // change the status of designform. reportstatechanged + = new reportstateeventhandler (designform_reportstatechanged); designform. formclosing + = new formclosingeventhandler (designform_formclosing); // load the report. designform. openreport (r); // open the designer designform. showdialog (); designform. dispose ();}}}In this way, we can control what to control when loading and destroying the design form. You can reload the data in it. For example, the design form display is a little slow. We load a wait form at the beginning and close it after it is displayed. 
 
The waiting form is displayed. Other events depend on the situation. (Refer to the http://www.cnblogs.com/rock_chen/archive/2008/7/2.html) for template design and data binding, see previous
 
Developer Express: How to dynamically bind xtrareport data.

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.