ZT: Use Rava for master-slave relationship report

Source: Internet
Author: User
Use Rava to generate master-slave relationship reports

 

Bytes -----------------------------------------------------------------------------------------------------------

References

1. Add rvproject1, rvsystem1,

Rvproject1.engine: = rvsystem1

Rvproject1.loaddesigner: = false

Rvproject1.projectfile: = 'C:/myrave/project1.rav'

2. Add Table1, Table2, rvtableconnection1, rvtableconnection2,

Table1 connects to the dbdemos database table customer [master table], Table2 connects to the dbdemos database table orders [slave table]

3. Set table2.filteroptions: = [fonopartialcompare],

Rvtableconnection1:

Rvtableconnection1.runtimevisibility: = rtenduser

Rvtableconnection1.table: = Table1

Rvtableconnection2.runtimevisibility: = rtenduser

Rvtableconnection2.table: = Table2

4. Set

Page1.bin: = middle Tray

Page1.pagersize: = custom

5. In the ravereport design environment

Add dataview1 and dataview1 to rvtableconnection1

Add dataview2 and dataview2 to rvtableconnection2

6. In the ravereport design environment

Add region1, databand1, databand2 to page1, and add a data display control to databand1 and databand2.

7. Set

Databand1.dataview: = dataview1

Databand2.controllerband: = databand1

Databand2.dataview: = dataview2

Databand2.detailkey: = custno

Databand2.masterdataview: = dataview1

Databand2.masterkey: = custno

8. Set the datatext Control

Datatext1.datafield: = custno

Datatext1.dataview: = dataview1

Datatext1 on databand1

Datatext2.datafield: = custno

Datatext2.dataview: = dataview2

Datatext2 on databand2

9. Set databand1 and databand2

In the databand1 attribute box, click the attribute bandstyle. In the displayed dialog box, select first, new page under print occurrence.

In the databand2 attribute box, click the attribute bandstyle. In the displayed dialog box, select first under print occurrence,

Detail under print location

Follow these steps to create a master-slave report

Currently, I know two methods:
First
Do not set hard mastdetail on the foreground, that is, do not set it through the mastsource attribute of dataset.
Otherwise, he will not be able to die, and the foreground will pass
The dynamic filter sub-statement indicates that the filter is used, or the setrange is not used for SQL queries.
The report format is set by placing two databand, The controllerband of the databand in the detail table
Point to the databand of the master table, click the bandstyle attribute, and hook detail;
Second
Set it directly in the report without any code at the front end,
The above steps remain unchanged. Set masterkey below
Master key is the key of the primary table, dataview
Detailkey is the slave table key.
However, compound primary keys are not supported.

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.