Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Want to show data different in a subreport

Status
Not open for further replies.

JarreZoolook

Technical User
Sep 4, 2007
9
0
0
DK
Hi

Crystal Reports version 11.

I hope that you guys can help me. I have looked at the different forums but have not been able to find posts that match my problem.

I have a main report and two sub-reports. Subreport A generates a lot of shared variables (about 75 at the moment) that are shown in the main report. In subreport A is also created a shared array. This shared array is used as a key to find data in subreport B.

My problem is in subreport B.

The array from subreport A are used to find data from one table in subreport B. Each key in the array finds 3 posts in the table.

The subreport shows these posts like this in the main report:
Varenummer: 1000539
Batchnummer: B000047587
Varenavn: Optima_A 4mg

And because the array may contain many keys it may look like this (with 4 keys and each key finds 3 posts):
Varenummer: 1000539
Batchnummer: B000047587
Varenavn: Optima_A 4mg
Varenummer: 1000539
Batchnummer: B000047579
Varenavn: Optima_A 4mg
Varenavn: Optima_A 4mg
Batchnummer: B000047581
Varenummer: 1000539
Varenummer: 1000531
Batchnummer: B000047583
Varenavn: Optima_A 4mg

I have used the “Record sort expert” to group the data so the posts with the same key are shown together. This works fine.

But because it is impossible for the user to read the data I would like to show the fields with the same key on the same line. Liks this:
Varenummer: 1000539 Batchnummer: B000047587 Varenavn: Optima_A 4mg
Varenummer: 1000539 Batchnummer: B000047579 Varenavn: Optima_A 4mg
Varenummer: 1000539 Batchnummer: B000047581 Varenavn: Optima_A 4mg
Varenummer: 1000531 Batchnummer: B000047583 Varenavn: Optima_A 4mg

Is this possible?

I could create 20 shared variables to each field (varenummer, batchnummer and varenavn) but what if there are 21 keys in the array. Then I will miss one.

Please let me know if you do not understand my problem.

Thank you very much for you help and time.

Morten
Denmark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top