Link to home
Start Free TrialLog in
Avatar of cehrnow
cehrnow

asked on

report within a report

Using CR 8 Developer

We have, for example:

Record 1
Record 2
Record 3
Record 4

Records 1 & 4 can be selected directly but 2 & 3 require a second select based on Record 1. Is this possible ?
Avatar of cehrnow
cehrnow

ASKER

..or is it possible to run two separate select statements from the same table and merge the results into a single dataset ?
ASKER CERTIFIED SOLUTION
Avatar of Kurt Reinhardt
Kurt Reinhardt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Ido Millet
Ido Millet
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cehrnow

ASKER

Apologies using CR 2008 v12 - Developer
Avatar of cehrnow

ASKER

Thanks rhinok - have tried this but still not sure it will work out. Best to reorganise db but this is not an option.

Thanks IdoMiller - given that there could be 100s of Record 1s with several Record 2&3 under each one do you still think a sub-report is realistic ?
Is this hierarchical data, such as an employee table where there are children (employees) and parents (supervisors)?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Crystal Reports 8, not 2008.  The only SQL options are to use the Crystal SQL Designer (which I wouldn't recommend, since there won't be any support for it should an upgrade eventually be required) or to use Views/Stored Procs and stored proc support was extremely funky back then.
Author's comment above

Apologies using CR 2008 v12 - Developer

mlmcc
Ahh, cool.  Missed that, thanks :)
Avatar of cehrnow

ASKER

Thanks for all suggestions which I think covers options. However, it's such hard work even with these that I'm forcing through a db redesign.
It is not necessary to redesign the database. This is a classic tree structure and can be easily handled by recursive queries. What is your database type ?