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!

Suppressing data

Status
Not open for further replies.

lilal111

Technical User
Sep 16, 2008
18
CA
I am currently using a report with a sub report. I am trying to suppress the data in the sub report where it already exists in the main report between the two fields and only show the fields that don't match. Pardon the crude example below, but in essence it is what I am trying to accomplish.

For instance

main report field : a
b
c

subreport a
b
c
d

I would only like to display the d in the sub report where the other ones match.

thanks.
 
In the main report, add a formula like this to the detail section and suppress it if you like:

whileprintingrecords;
shared stringvar array x;
numbervar i := i + 1;
numbervar j := count({table.field});
if i <= j then (
redim preserve x[j];
x := {table.field}
);

In the subreport->section expert->details->suppress->x+2 enter:
whileprintingrecords;
shared stringvar array x;
numbervar i;
numbervar j := count({table.field});
booleanvar flag := false;
for i := 1 to j do(
redim preserve x[j];
if {table.field} = x then
flag := true
);
flag

-LB
 
Thank you very much, this worked great....You made my day!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top