Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 228431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:40:54+00:00 2026-05-11T19:40:54+00:00

I have a formula @InitVars in the page header which includes the following, and

  • 0

I have a formula @InitVars in the page header which includes the following, and similar lines:

shared numbervar runWaste:=0;

In Details v, I have a sub-report, which has a formula @SetRunWaste:

shared numbervar runWaste;
if (OnFirstRecord) then
(
if not(isnull({x.x-or})) and 
not(isnull({x.y-override})) and {x.y-override} = true then
runWaste:={x.x-or} 
  else
runWaste:= {x.x}
);
runWaste

I can see the output of this formula in the sub-report is 18.00.

However, both in another sub-report, in Details az, and in the main report in Details w (as a test), I have the following formula @test:

shared numbervar runWaste;
runWaste;

In both places, it shows as 0.00.

Why is it showing 0 not 18?

I’m using Crystal Reports version 11.0.0.895.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:40:54+00:00Added an answer on May 11, 2026 at 7:40 pm

    The problem is that @InitVars is in the page header, not the report header. It is resetting the variable to 0 at the top of every page.

    Moving @InitVars to the report header fixed it so the correct number comes up in the sub-report in Details az.

    I still see some odd behavior when I include the variable in the main report, but since that was just for debugging, not the main target, I don’t care.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have formula which looks something like the following: =(IF(ISBLANK(B1),1, (IF($B1=Banana, 2.23, IF($B1=Cherry,3.5))) )*C1*A1)
I have a formula like this which works fine on Excel/OOCalc applications: =SUMPRODUCT(--($Panels.$A$5:$A$6999=K$80);--($Panels.$B$5:$B$6999=K$81);INDEX($Panels.$C$5:$J$6999;0;MATCH(Voc;$Panels.$C$3:$J$3;0))) Since
I have the following formula float mean = (r+b+g)/3/255.0f; I want to speed it
we have an interesting formula to figure out. First, we count the following, where
I have the following formula: =ArrayFormula(SUM(Morten!$M4:$M400)) How can I replace Morten with the contents
I have below formula in my crystal report which doesn't work. if({SINGLECASEMULTIPLEASSAY.sSampleName}=P)then val({SINGLECASEMULTIPLEASSAY.sODValue}) The
I have the following formula =IF((GLOBAL_DATE-30)<G2,1 Month,IF((GLOBAL_DATE-60)<G2,2 Month,IF((GLOBAL_DATE-90)<G2,3 Month,Older Than 3 Months))) and I
I have the following formula that works out the value of all the rows
I'll simplify this for example sake I have a formula in column B which
I have this formula in a cell: =GetData(Channel_01,Chicago) Which executes this code: Public Function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.