Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Running total for subreport - Declare variables? Post Reply Post New Topic
Author Message
crystalbeg
Newbie
Newbie


Joined: 30 Oct 2012
Online Status: Offline
Posts: 15
Quote crystalbeg Replybullet Topic: Running total for subreport - Declare variables?
     Posted: 05 Nov 2012 at 10:42pm
Dear Crystal Gurus,

I created a project income/expenditure account for all projects. All project transactions are recorded in our project journal on a transactional basis so the report groups all income and expenditure transactions by project number. In order to be able to select between active/inactive/all projects within a certain period, i created a new parameter/Flag with the three respective options.

As the condition for a project to be active/inactive is formula based, i created a subreport for each case and supressed the respective  footer sections based on which flag is selected. (My subreports are in the footer section)

In each of the subreports, the unwanted data is supressed i.e. in the active subreport, the inactive projects are supressed and vice versa. The problem arises in the running total field. I would like to sum up the the totals from the subreports. However, the criteria defining an active and inactive project, is a formula that derives some of its data from an existing running total field and hence cannot be selected as a field/formula for a new running total field. I'm guessing the reason for this would be a similar case to a circular reference in excel.

How would i best solve this? Is it possible to use a formula to declare what an active/inactive project is and using a true/false flag evaluate in the running totals field?

Your assistance is highly appreciated.

regards,
cb
MK
IP IP Logged
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 06 Nov 2012 at 4:18am
I have done everything from sql expressions (which I like the best, because you really only need to return a sum, or single value).

My luck with global variables hasn't been the greatest.
IP IP Logged
crystalbeg
Newbie
Newbie


Joined: 30 Oct 2012
Online Status: Offline
Posts: 15
Quote crystalbeg Replybullet Posted: 06 Nov 2012 at 4:45am
Thanks for the tip. Do you happen to know where i can write the sql expressions in crystal and how i can run it? 
MK
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum