Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Sections Post Reply Post New Topic
Author Message
scotlandc
Newbie
Newbie
Avatar

Joined: 07 Oct 2009
Location: United Kingdom
Online Status: Offline
Posts: 6
Quote scotlandc Replybullet Topic: Sections
     Posted: 17 Jul 2011 at 10:53pm
Hi all,
 
Hope you can help.
 
I have a report which is using an XML dataset. Within the dataset, there are 3 arrays of numerous lengths. What I need to do is print the first array, then the second one, then the third. Each report has a unique ID (note_ID) which each table contains as a key. None of the tables links to another directly.
 
The 3 arrays I have are line_items, items_to_follow and backorders. Each of these tables shares field names such as part number, description, quantity etc and of course, note_ID so that any fields on the report look like line_item.partno, item_to_follow.partno and backorder.partno etc.
 
When I include the first array only, everything works fine. However, as soon as I try to include items from 2nd or 3rd arrays, the information is displayed incorrectly.
 
As an example, in my first array there is one line item which displays fine by itself. As soon as I try to include the 2nd array which contains 5 items, the item from they first array appears followed by the first item from the 2nd array, then the first item from the first array followed by the 2nd item from the second array, the pattern is as follows:
 
1.1
2.1
1.1
2.2
1.1
2.3
1.1
2.4
1.1
2.5
 
Does anyone know of a way to get the first array to print, then any items in the 2nd array followed by any items in the 3rd.
 
I've tried inserting 3 sections into the Details section of the report and checking the 'keep together' checkbox but no luck.
 
Anyone have any ideas please?
 
Thanks

Scott


Edited by scotlandc - 18 Jul 2011 at 3:03am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 19 Jul 2011 at 3:21am
since it sounds like the tables are not linked, CR is giving you the cartesian product of each array, basically it is doing:
select * from a,b,c
 
well, shouldn't all of the arrays be on 1 data row, as it seems that you want them mixed that way, not each to its own.
 
figuring out a link would probably make your life simpler, but this sounds like a time to play, as 3 unrelated tables is not usually the best place to start.
 
Have fun.
 
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum