
Subreport in group footer,...with union join?
Tankx for such a speedy reply.
First off im using the old ttx method because the original report
requires several outer joins. Our product supports both informix and
SQLserver Databases and so the SQLs differ between databases, after a
few brief tests i concluded crystal wasnt going to handle this. Also
im using the report to display several different reports. These
things however arent relevant to my current dilema.
The problem with the linked subreport is the linking. The subreport RS
will be returning from the table all where transfer_ind IN("O", "I")
and audit_no is say 69. Then for each group, linking with ledger_ind.
Thats all ok, but i need the records where:
((ledger_ind = report.ledger_ind AND transfer_ind = 'O')
OR (ledger_ind = report.class_ind AND transfer_ind = 'I'))
This conditional linking does not appear to be possible using the
linking expert.
Have i missed a trick?
Cheers
Dunc.
On Mon, 19 Aug 2002 19:49:13 +1000, "CW"
Quote:
>I don't see any problem here at all. You simply use a linked subreport in
>the group footer. You would pass an ADO recordset to the main report, and an
>ADO recordset to the subreport.
>Of course I don't see why you must use ttx and pass ADO recordsets in the
>first place. What you require can be achieved using normal CR with minimal
>VB code (really only required to set up connection parameters so that report
>can be run against different databases).
>> Hi, i think i've come up against something that simply isnt possible
>> in crystal report (8.5, vb6). Im wondering if anyone has a work
>> around or solution, any help will be much appreaciated!!
>> I need to place a subreport into a group footer. ok, but the problem
>> is the SQL for this subreport requires a union join, or a few
>> conditional criteria. Example:
>> SELECT *
>> From nomtrans
>> Where audit_no = report.audit_no
>> AND ledger_ind = report.ledger_ind
>> AND transfer_ind = "O"
>> UNION
>> SELECT *
>> FROM nomtrans
>> Where audit_no = report.audit_no
>> AND ledger_ind = report.class_ind
>> AND transfer_ind = "I"
>> OR:
>> SELECT ... WHERE audit_no = report.audit_no
>> AND ((ledger_ind = report.ledger_ind AND transfer_ind = 'O')
>> OR (ledger_ind = report.class_ind AND transfer_ind = 'I'))
>> I wouldn't have a problem creating this report if it wasnt in the
>> group footer of another report, my normal method would be using ttx
>> field definition and passing ADO recordset. This though has me
>> stumped cos i must link the subreport to the report, and the only way
>> i know to do this is defining links(?). Any ideas anyone??? Cheers!