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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

subreport vs union

Status
Not open for further replies.

DanHD

Technical User
Dec 1, 2008
98
NL
Hello

I need a report where I can see the Sales order (SO) Lines and the purchase order (PO) Lines on one record. The connection in the database is a field <project number>. They are not connected with an item number because it is free text.

Example:
Project number 10042 has tree sales order lines and two purchase order lines.
I need to see:
PO line 1, price 100 SO line 1, price 200
PO line 2, price 150 SO line 2, price 210
…………………………… SO line 3, price 220


Results with subreport:
When I use a subreport connected to the project number, I get as results:

PO line 1, price 100 SO line 1, price 200
……………………… SO line 2, price 210
…………………………… SO line 3, price 220
PO line 2, price 150 SO line 1, price 200
……………………… SO line 2, price 210
……………………… SO line 3, price 220


In sql I believe you can use the statement <Union all>.
How can I fix this in Crystal Reports?


Dan
 
This would work fine with a subreport if you first group on project number and then place the subreport in the group header section and format it to "underlay following sections".

I don't think a union all is a solution in this case.

-LB
 
Thanks LB

it works perfect!

regards
Dan

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top