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

Trying to supress group header when pulling information from subreport

Status
Not open for further replies.

JLP1

Technical User
Jul 30, 2009
4
US
I found thread767-1480010 and tried to follow the directions because my issues is very similiar.
I am using Crystal XI and have a report that has two subreports to pull data into the main report.
Subreports WIP and AR are located in the main report. In the main report, GHa contains a copy of both subreports and GHb also contains another copy of both reports. I have a shared variable "True_False" in the WIP subreport (GF1) and another shared variable "True_False_AR" in the AR subreport.
In both subreports in GHa, I suppressed all sections (but NOT the sub itself), and I formated the sub (format subreport->subreport tab->check "suppress blank subreport"). Then went into the section expert and check "suppress blank section" for GHa. Then I went into the section expert of the main report->GHb->suppress->x+2 and entered:

whileprintingrecords;
shared booleanvar true_false;
true_false = false
or
shared booleanvar true_false_AR;
true_false_AR = false

On all subreports I shrank up each field and section as small as possible.

Gha seems to be working correctly and is not displayed on the report. Ghb is displayed as a very small section on most pages of the report, however there are a few pages that is takes up more space than I would like.

Any help would be greatly appreciated. Thanks!

 
You shouldn't have to make objects small in GH_b at all. I wonder if your shared variables are set up correctly. How did you set the values for each variable within the subs?

-LB
 
I was wondering if that was the problem, because I am not very familiar with how to use shared variables.

Field true_false in the WIP subreport is:
shared booleanvar true_false:=

If {@AmountVariable} <> 0.00 then
true
else
false

and field true_false_AR in the AR subreport is:
shared booleanvar true_false_AR:=

If {@AmountVariable} <> 0.00 then
true
else
false

Both fields are in the GF1 with the rest of the data I am pulling through to the main report.

Thanks
 
I would have set them up like this:

shared booleanvar true_false;
If {@AmountVariable} <> 0.00 then
true_false := true else
true_false := false;

I wonder what is in {@AmountVariable}? You should always show the content of nested formulas. I'm assuming it is a summary of some kind, and that the true/false formula is placed in the subreport footer.

-LB
 
I must still be doing something wrong.
The Amount Variable formula is in the subreportis GF1 (as is the true_false formula.

The formula for the Amount Variable is:
shared numbervar WIPamount;

If not isnull({@cat_1_disp_prj})
then WIPamount:= {@cat_1_disp_prj}
else WIPamount:= 0.00;

I changed the true_false to:
shared booleanvar true_false;

If shared numbervar WIPamount <> 0.00 then
true_false :=true else
true_false :=false;

Thanks

 
I'm unclear on what the continuing problem is.

You also did not show the content of all nested formulas. Depending upon what that is, you might be picking up only the value of the last record in the group in your shared variable. Can you verify that the shared variable is showing the correct value in the subreport?

-LB

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top