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

  • Home
  • SEARCH
  • 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 1002777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:52:38+00:00 2026-05-16T07:52:38+00:00

So my problem is I have created a report which is grouped by Dealer

  • 0

So my problem is I have created a report which is grouped by Dealer number. Within this group I have created running totals to summarize the volume of each dealer, then just display their total volume. I reset all my variables to 0 in the group header. When I look at the report in CR it looks fine. But through the viewer or exported to excel -data only it just displays an ongoing running total. Seems like its not reseting to 0 in the group header. Any thoughts would be appreciated. Could problem just be with viewer if its displaying properly in CR?

In Report Header:

whileprintingrecords;
global numbervar volume := 0;

In Detail Section of Group:
Formula Field

if  Month({appl_trans.trans-dt}) = 1
and Year({appl_trans.trans-dt}) = Year(CurrentDate) then (
if previousisnull({contract1.contract-no}) then
    global numbervar volume := {contract1.cost-base};
if {contract1.contract-no} <> previous({contract1.contract-no}) then
    global numbervar volume := volume + {contract1.cost-base}
else
    global numbervar volume := volume
);

In Group Header :

whileprintingrecords;
global numbervar volume := 0;

In Group Footer : Formula Field

whileprintingrecords;
global numbervar volume := volume;
  • 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-16T07:52:39+00:00Added an answer on May 16, 2026 at 7:52 am

    Your variable usage is overly complicated and CR might be doing odd things because of it. Get rid of the formula in the report header completely – you’re already reinitializing the variable in the group header. Next, change the formula in the details section to something like this:

    whileprintingrecords;
    global numbervar volume;
    if  (Month({appl_trans.trans-dt}) = 1
    and Year({appl_trans.trans-dt}) = Year(CurrentDate)
       and {contract1.contract-no} <> previous({contract1.contract-no}) then
            volume := volume + {contract1.cost-base}; 

    Keep the formula in the group header as it is. Then use this formula to display the volume in the footer:

    whileprintingrecords;
    global numbervar volume;
    volume

    You generally only want to declare a variable once per formula, meaning only one “global numbervar x” and do it for every formula where that variable is used. You also will never need to set a variable to itself, as it won’t actually do anything.

    Another way to accomplish this that might be simpler than using formulas is that you could just add a Running Total field to sum {contract1.cost-base}, evaluate on change of {contract1.contract-no} and reset after each group. Or yet another way is to add another inner grouping on {contract1.contract-no} and insert a Summary field in the group footer. Either way will get the job done.

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

Sidebar

Related Questions

in .net I have created an excel report which takes a datagrid's render output
I am having a problem using the Unity Application Block, I have created a
I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE
This is kind of a weird problem, but I have to create a search
Problem: I have an address field from an Access database which has been converted
Problem I have timestamped data, which I need to search based on the timestamp
I have created a report in MS Access report and write some VBA code
While my initial problem counting the running number of rows in a table has
I have a created a C# windows service (Serv.exe) which is responsible for performing
I have a problem with my WPF program. I'm trying to create an object

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.