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

shared variable oxymoron!!!!

Status
Not open for further replies.

sixfoottrackjohnno

Programmer
Joined
Jun 21, 2001
Messages
3
Location
AU
I have a CR v8 report (CRW32 8.0.0.441) which consists of a main report and 3 subreports. I was attempting to do some conditional page breaks to ensure that group header and their subtotals do not span pages(groups are small <= 5 items) I did not get this to work in all the subreports one did two didn't. I then made the assumption that my formulae were in error so proceeded to insert debug formulae in the relevant group header and subtotal places.

here are two of the formulae.
========================================

1.
WhilePrintingRecords;
shared Numbervar acc_rec_count;
global numbervar numberingroup;
shared numbervar acc_linesleft;
shared booleanVar acc_temp1 := TRUE;
shared booleanVar acc_temp2 := false;
shared booleanVar acc_temp := true;
if ((numberingroup + 2)> acc_linesleft) then
(
//acc_rec_count := 0;
acc_temp := acc_temp1;
)
else
acc_temp := acc_temp2;
acc_temp

=======================================
2.
shared booleanVar acc_temp;
acc_temp

the first is the criteria by which I want the group to start on a new page, minus a reset , so I can monitor the progress of the boolean variable down the page. The second just displays the variable. I place both formulae in the group footer and header down the page and get the following output.

1. 2.
.
.
.
false false
false false
true false
jumps to new page due to format formula in group header.
true true
false true
false false
.
.
.

I was under the impression that a shared variable was like a global in the C sense. I wonder whether any gifted individual could explain this behaviour to me then i may be
able to sort out my other problem. formula 1 and 2 are placed adjacent to each other in the group header and footer
with no other formula in between. My reaction is that of a brain dead product or a product that is rendering me braindead, I have already installed the CR patch for shared variables.

thank u in advance

sixfoottrackjohnno.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top