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

Hi, Iam doing a decode statmen

Status
Not open for further replies.

unknownly

Programmer
Jul 7, 2003
181
US
Hi,

Iam doing a decode statment in my SQL and group on that decode statement in the report. the decode statement returns 2 values(child, parent).
eg: decode(tab1.field1,tab2.field1,'parent','child')
now in report Iam displaying as follows:
Indictaor Unit node amount
// This is placed in the group footer because need only subtotals and not details
--------------------------------------------
child 1111 a1a1a1a1 $43005
child 2222 a1a1a1a1 $8879
child 3333 a1a1a1a1 $54679
-----------------------------------------------
// this part is placed in details and suppress if the indicator is child
Indictaor Unit node subunit amount
------------------------------------------------
parent 1919 a0a0a0a0 1111 $43005
parent 1919 a0a0a0a0 2222 $8879
parent 1919 a0a0a0a0 3333 $54679

But Now My user wants to see the report as( 2nd part of the report)as:
// this part is placed in details and suppress if the indicator is child
Indictaor Unit node subunit Parentamt childamt
----------------------------------------------------------
parent 1919 a0a0a0a0 1111 $43005 $43005
parent 1919 a0a0a0a0 2222 $8879 $8879
parent 1919 a0a0a0a0 3333 $54679 $54679


so that they can compare the data loads have been correct or not. How can I do this. to show the child amount beside the parent amount for comparsion and if any sun unit is miss from I should be do a bold of that row.

Any help Please.

Thanks,
Sweetie
 
One option is to insert a linked one-field subreport besides the parent detail.

A simpler option is to insert a CrossTab to the right of the parent first 4 columns that uses the Indicator as the columns. This would require some adjusting to ensure the rows of the CrossTab align with the rows on the sections, but it should be doable.

hth,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
I really didn't follow. Can you please explain it to me again and I appericate your patience & time. I don't want to use the sub report links.

It doesn't let me drop the cross tab in the details section beside the Parent rows.

Is there any other way like a formula or something.
I tired a place formula beside the parent amount

@childamt

WhilePrintingRecords;
IF
{decode statement} = 'child' THEN
{total amt}
ELSE
0


Thank you,

Sweetie



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top