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

Crystal Reports 8.5: formula help suppressing records in a subreport

Status
Not open for further replies.

mdieckman

MIS
Nov 21, 2006
88
US
Here is what I am attempting:

Basically, I have a main report and a subreport.

The main report looks a little like this:

details a id # ...
details b subreport

I am using a shared variable in the main report to share the id # to the subreport.

formula field in main report:
whileprintingrecords;
shared stringvar x;
x := {id #};

formula field in subreport:
whileprintingrecords;
shared stringvar x;
x

In the subreport, I also have a details a and b

details a contains the shared variable which is passed fine
details b contains the info I am looking for.

What I am trying to do is suppress the information in details b where my ID # is equal to the shared ID # from the main report, but I keep getting the error message "a statement is expected here" when I go when I try to go into the format section area and create a formula to suppress it. Can anybody help me out with a formula or how to get around this?
 
In the subreport->format section->detail_b->suppress, you should have:

whileprintingrecords;
shared stringvar x;
{table.ID#} = x

-LB
 
I am not sure why, but the section visibility for detail b doesn't seem to recognize stringvar as a valid variable declaration. Usually, when something is valid in Crystal syntax, it highlights it in blue, but it doesn't do that for me here.

When I do that, I get a message that says "The remaining text does not appear to be part of the formula."

I'm not sure what I can do here...
 
Nevermind, I must have accidentally hit the box and changed it to Basic syntax rather than Crystal syntax...

That fixed it. Thanks for the help LB. I was on the right track before, but the basic syntax was screwing me up.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top