Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Sum on data from SubReports / Formula Fields ? Post Reply Post New Topic
Author Message
joeyg13
Newbie
Newbie
Avatar

Joined: 21 Dec 2010
Online Status: Offline
Posts: 15
Quote joeyg13 Replybullet Topic: Sum on data from SubReports / Formula Fields ?
     Posted: 23 Mar 2011 at 10:00am
I am using a subReport to handle a one-to-many data issue.  And, it is working fine returning data on a 2nd Detail line - so my shared variable is read/processed after the subReport.

However, I cannot 'sum' on the field.
My field in report is like:
// @subAsthma
WhilePrintingRecords;
Shared NumberVar srxAsthma;
srxAsthma


So, while printing detail records, I correctly show who has Asthma. (There is a 1 in the field.)

But, it is not in the list of fields that I can sum/count on for my Group and Report level breaks.

I think I can create a running-total field for this; actually two since I will need one for Group (and need to reset in Group Hdr) and one for Report.  Possibly an ok solution, but I envision passing 20 or so data values from subReport.

So, any insight into why some Formula Fields are eligible for sum/count and others are not?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 Mar 2011 at 10:06am
has to do with passes of the data in the report
some formuals are created before the SUmmaries are created and others are created after. Shared variable formuals are after so are not eligible for summaries
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