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

Global Variables/ Reset

Status
Not open for further replies.

sbirkenkamp

Programmer
Jan 24, 2006
12
US
HOw do you reset a global variable?
 
Depends on the type.

Globalvar MyVar:=0;

would reset a numeric type.

If you're performing aggregate functions at the group level, then each group header should have that.

If this doesn't help, consider that posting 7 words probably isn't conveying much...

-k
 
I wasn't really sure how to explain my problem but I will try to. lol..

I am creating a report for a donor plaque. Here are my fields

Report Header
Page Header
a
b
GH 1
GH 2
Details
GF 2
GF 1
Page Footer
a
b
Report Footer

When a new group appears in GH1 I have the report start on a new page. Some groups when have only 1 page for the report where others could have 10 pages. On page 1 of each GROUP I need different margins that those on any following pages.

I was told to use Global Variables in my Group Footer and reset it in my page footer in order to create suppression formulas to handle my margins.

HOwever I really do not understand Variables or how to reset them. I am a self taught CR user so this is taking some time. Any help would be great.
 
OK, you posted quite a bit, what all of this distills to in my wee brain is that you have some varying length of a Top Margin? (you apparently don't want to share how they differ, or which margins).

Conveying requirements should answer the basic envoironemt (software version/database), what you have, and what you want.

I think that the solution is much simpler than you were told.

Right click the GH1 and insert section below.

Size it for when you want additional space.

Right click it and select format section->X2 next to suppress and place:

previous({table.groupfield)) = {table.groupfield}

-k
 
Vam-

I am sorry for the lack of information. I only registered today for this forum and still learning what I should add and what is helpful. :)

I'm in CR 8.5

My page one will have a top margin of 1.8 and a bottom margin of 2

Page 2+ will have a top margin of 1.5 and a bottom of 1 inch


I tried inputting what you said and it still did not work. I get an error of the "remaining text does not appear..."

Here is what I put in

Previous GroupName({CnCnstncy_1.CnCnstncy_1_CodeLong}) = GroupName ({CnCnstncy_1.CnCnstncy_1_CodeLong})

Again, I am sorry for the lack of proper info. Still trying to learn the jargon.

THanks
 
Use the field used, not the groupname field, not sure why you elected to use that, mine showed using the {table.groupfield}, not the groupname function.

I guess you should use the page header/footer suppression.

Create 2 of each, and conditionally suppress based on whether the previous or next group differs. This means right clicking the section, selecting format section->X2 next to suppress and in the header use:

New group (page header section a):

previous({table.group}) = {table.group}

Continuing group (page header section b):

previous({table.group}) <> {table.group}


For the page footers:

New group (page footer section a):

next({table.group}) <> {table.group}

Continuing group (page footer section b):

next({table.group}) = {table.group}

That should get you close.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top