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!

suppresing details

Status
Not open for further replies.

unknownly

Programmer
Jul 7, 2003
181
US
Here is the example: Data in a tree structure:


aaa123 --Parent 1
aaa1231 --Child 1
aaa1232 --child 2
aaa1233 --child 3
aaa123sp1 --Subparent 1
aaa123sp1a --subchild 1
aaa123sp1b --subchild 2

bbb123 --Parent 2
bbb1231 --Child 1
bbb1232 --child 2
bbb1233 --child 3
bbb123sp1 --Subparent 1
bbb123sp1a --subchild 1
bbb123sp1b --subchild 2
bbb123sp2 --Subparent 2
bbb123sp2a --subchild 1
bbb123sp2b --subchild 2

aaa123sp1 --Parent 3
aaa123sp1a --child 1
aaa123sp1b --child 2

bbb123sp1 --Parent 4
bbb123sp1a --child 1
bbb123sp1b --child 2

bbb123sp2 --Parent 5
bbb123sp2a --child 1
bbb123sp2b --child 2

Data In a table sturcture:


Column1 column2
--------------------------
aaa123 aaa1231
aaa123 aaa1232
aaa123 aaa1233
aaa123 aaa123sp1
aaa123 aaa123sp1a
aaa123 aaa123sp1b
bbb123 bbb1231
bbb123 bbb1232
bbb123 bbb1233
bbb123 bbb123sp1
bbb123 bbb123sp1a
bbb123 bbb123sp1b
bbb123 bbb123sp2
bbb123 bbb123sp2a
bbb123 bbb123sp2b
aaa123sp1 aaa123sp1a
aaa123sp1 aaa123sp1b
bbb123sp1 bbb123sp1a
bbb123sp1 bbb123sp1b
bbb123sp2 bbb123sp2a
bbb123sp2 bbb123sp2b

Problem I have is a subparent is again a parent. So, the report I have done come up with repeated data with different group heading ( grouping on column1 in the report). What my user want to see in the report is...


I should be able to suppress the details for the (aaa123sp1, bbb123sp1, bbb123sp2) these rows and only show the subtotal for them.

report should look some what like this


Column 2 Amount //headings

aaa123 //group header name

aaa1231 $110000
aaa1232 $100000
aaa1233 $100001
aaa123sp1a $100020
aaa123sp1b $100001

subtot:aaa123 $510022

bbb123 //group header name

bbb1231 $100000
bbb1232 $100000
bbb1233 $100000
bbb123sp1a $100000
bbb123sp1b $100000
bbb123sp2a $100000
bbb123sp2b $100000

subtot:bbb123 $700000

aaa123sp1 $100021 // should show only total
bbb123sp1 $200000 // and suppress the details for
bbb123sp2 $200000 // these subparents which are
//rolled up and a parent again


How can i do this I have tried and can't think any more..how to resolve this..

Any help is greatly appreciated

Thanks in Advance

Sweetie
 
One soluton would be to correct this bizarre means of storing data with a Union (this is Crystal version and datbase dependent, which you omitted).

Remove the Column2 from the report.

Go into the Database->Show SQL Query and do the following:

copy the SQL

Add the line Union after the SQL

Paste the SQL back in afterwards and change the column1 to column2

Now you'll get a single unique column with the values.

Should work fine.

-k
 
I can't do a union for this report.

My issue is somewhat similar to the thread


thread767-677417

I tired to feed the column 2 data into array but I get error which says array int should be between 1 and 1000

Please advice, If there is any other work around in this case.


Thanks,

Sweetie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top