Multi-Table Association in Push mode for. NET Crystal Reports

Source: Internet
Author: User

Recently, I have been busy designing various reports with Crystal Reports, all of which adopt the push mode.
The basic situation for designing a report is as follows:
1. Create a dataset
2. manually create one or more table structures in the dataset;
3. Create an RTP file;
4. Use databaseexpert to import the created dataset;
5. Use this dataset during report design;

Now I have a report in this format, so I plan to create a table for each of the three phases of A, B, and C in dataset.
 

Parameters

A phase

Phase B

C phase

 

Maximum Value

Maximum time

Minimum value

Average Value

Overview of 95%

Rate

Maximum Value

Maximum time

Minimum value

Average Value

Overview of 95%

Rate

Maximum Value

Maximum time

Minimum value

Average Value

Overview of 95%

Rate

Total active power (kW)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The three tables have the same structure and contain the following fields:
Rowname;
Maxvalue float;
Maxvaluetime datetime;
Minvalue float;
Avgvalue float;
Provalue float;

When importing the dataset to the RTP file, the expert will require Association. For the first time, I deleted all these links. Although the association is deleted, these datasets can still be added to the rpt file. However, a problem occurs when the report is designed and run.
Assume that the values of Table A are in the following two columns:
Total active power (kW), 100,200 22:22:22, 10, 50, 75
Total active power (kW), 100,200 22:22:22, 10, 50, 75
Table B and Table C have the same values. Normally

 

Parameters

A phase

Phase B

C phase

 

Maximum Value

Maximum time

Minimum value

Average Value

Overview of 95%

Rate

Maximum Value

Maximum time

Minimum value

Average Value

Overview of 95%

Rate

Maximum Value

Maximum time

Minimum value

Average Value

Overview of 95%

Rate

Total active power (kW)

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

Total reactive power (kvar)

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

But it is actually shown as, a total of 8 rows:
 

Parameters

A phase

Phase B

C phase

 

Maximum Value

Maximum time

Minimum value

Average Value

Overview of 95%

Rate

Maximum Value

Maximum time

Minimum value

Average Value

Overview of 95%

Rate

Maximum Value

Maximum time

Minimum value

Average Value

Overview of 95%

Rate

Total active power (kW)

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

Total reactive power (kW)

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

 

Total active power (kW)

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

Total reactive power (kW)

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

Total active power (kW)

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

Total reactive power (kW)

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

Total active power (kW)

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

Total reactive power (kW)

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

I suspect that the link was deleted during the dataset import process of Database Expert, so I decided to re-import the dataset;
First, Use Database Expert to delete the original imported dataset, set row as the primary key in dataset, and then use Database Expert to re-import the dataset. When setting the Association, delete all other associations, leaving only the associations between primary keys.
Then run the original program and the expected results are displayed:
 

Parameters

A phase

Phase B

C phase

 

Maximum Value

Maximum time

Minimum value

Average Value

Overview of 95%

Rate

Maximum Value

Maximum time

Minimum value

Average Value

Overview of 95%

Rate

Maximum Value

Maximum time

Minimum value

Average Value

Overview of 95%

Rate

Total active power (kW)

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

Total reactive power (kvar)

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

100

2006-11-11 22:22:22

10

50

100

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.