Getting started with Crystal Report (Microsoft Report) FAQs

Source: Internet
Author: User

1. Page size settings:
Specify the page size on the design page. After the page margin, all design areas in the work area are page printable areas. therefore, you do not need to consider the margins during design. or, if the margin is set to 0 during design, all design areas in the workspace are printed areas.
2. Automatic line feed extension when the content is too long:
If the cangrow of the object is set to true, the content is too long and the line feed is automatically extended. To maintain the normal connection of the Table Line, set extendtobottomofsection of the table line to true.
3. Prevent Table Line widening caused by Table Line handover between the table ending with the header and detailed information:
Set the top attribute of the table at the end of the header to the height of the area, that is, the table is located at the bottom of the area.
Set the top attribute of the detail start table to 0, that is, the table is located at the top of the area.
4. Remove the underline Of the field:
Set in font properties.
5. crystalreportviewer:
Crystaldecisions. crystalreports. Engine. textobject headtextobject = NULL;
If (this. printtype = 1)
{
Crystalreport1 crystalreport1 = new crystalreport1 ();
Crystalreport1.setdatasource (datatable) This. printdataset. Table1 );
Headtextobject = (textobject) crystalreport1.section1. reportobjects ["totitle"];
This. crystalreportviewer1.reportsource = crystalreport1;
}
Else if (this. printtype = 2)
{
Crystalreport2 crystalreport2 = new crystalreport2 ();
Crystalreport2.setdatasource (datatable) This. printdataset. table2 );
Headtextobject = (textobject) crystalreport2.section1. reportobjects ["totitle"];
This. crystalreportviewer1.reportsource = crystalreport2;
}
Headtextobject. Text = "Header"
6. Set the totitle of an object in the report and set the value: see Figure 5.

Microsoft reports
1. Microsoft reportviewer dynamic report loading:
Bindingsource = new bindingsource ();
If (this. printtype = 1)
{
This. reportviewer1.localreport. reportembeddedresource = "namespace. report file name 1. rdlc"
Reportdatasource = new reportdatasource ("Dataset 1", bindingsource );
// Dataset 1 the dataset name must be the same as the dataset name specified during report design.
This. reportviewer1.localreport. CES. Add (reportdatasource );
Bindingsource. datasource = This. printdataset. Table1;
}
Else if (this. printtype = 2)
{
This. reportviewer1.localreport. reportembeddedresource = "namespace. report file name 2. rdlc"
Reportdatasource = new reportdatasource ("Dataset 2", bindingsource );
This. reportviewer1.localreport. CES. Add (reportdatasource );
Bindingsource. datasource = This. printdataset. Table2;
}
This. reportviewer1.refreshreport ();
2. Add custom parameters to the report.
In the open report parameters dialog box, you can add report parameters in the dialog box. Note that there is an "internal" in parameter settings, and the setting meaning is not very accurate, after this option is selected, the parameter becomes read-only and cannot be dynamically changed in the program.
If the parameter is title and the type is string, you can pass the parameter value as follows.
Reportparameter rptparaa = new reportparameter ("title", "test report Parameters ");
Reportviewer1.localreport. setparameters (New reportparameter [] {rptparaa });
Then add text to the page with the value = parameters! Title. value, this parameter can be displayed in the report.

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.