Item is duplicating because of a text line in crystal reports

60 Views Asked by At

Item is duplicating because of a text line in crystal reports. If i remove the details section for the text lines, the items details dont duplicate. How many I resolve this. enter image description here

enter image description here

Below is the structure of the crystal report enter image description here

Another example of an invoice where they are 2 different items. Doesn't duplicate on the 2nd item just the first one. enter image description here enter image description here

2

There are 2 best solutions below

1
MilletSoftware On BEST ANSWER

NUPK309 has 2 text items so it gets duplicated 2 times.

NUPK311 has no text items, so it doesn't get duplicated.

If you look at the report joins, it's probably an outer join from the item to the text items. That is fine. But you need to decide how you want to handle multiple text items per a single item. Consider one of the 3 solutions suggested above.

1
MilletSoftware On

Most likely, each Item# record gets joined to 2 matching Text_Line records.

If the column from the Text_Line table is not used in the report (when you "remove the details section for the text line") Crystal doesn't join to that table, and hence you don't get Item# duplication.

You need to decide what you want to display. If you wish to display all text lines for each Item#, you can group by Item# and show the Text_Line rows as the detail for that group. Or you can concatenate the text lines into a single global string variable. Or you can use a subreport.