Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Formula Totals Incorrect when Drilldown Post Reply Post New Topic
Author Message
NeilD
Newbie
Newbie
Avatar

Joined: 02 Aug 2013
Location: United Kingdom
Online Status: Offline
Posts: 7
Quote NeilD Replybullet Topic: Formula Totals Incorrect when Drilldown
     Posted: 22 Aug 2013 at 3:02am

The format of my report is

GH1
GH2
GH3
D
GF3
GF2
GF1
 
I have a formula fields calculating manual running totals for groups 1 and 1. Groups2 and 3 are hidden from report but allow drilldown.
 
When I run report, GF1 running totals are fine. If I then doubleclick on GF1, the GF2 details including its manual running totalis displayed. However both the GF2 and GF1 manual running totals are now displaying the wrong values.
 
If I amend the report to display all GF (i.e. no hidden sections) all the manual running totals are displayed correctly.
 
I've been banging my head off a brick wall on this for hours now Ouch, so would appreciate any assistance/suggestions anyone can provide.
Dot
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 23 Aug 2013 at 4:48am
All that comes to mind is that CR is evaluating the running totals at time of display...though I am not sure why. I am not sure if the WhilePrintingRecords would make a difference.

Having just taken a look at the help file...perhaps adding the explicit WhileReadingRecords at the top of the formulas would help...

This is only a hunch/guess, but since the section is initially hidden the values are not being persisted, and when you display them, the values are being recalculated, and so they are off.

It's a thought, hope it helps
IP IP Logged
NeilD
Newbie
Newbie
Avatar

Joined: 02 Aug 2013
Location: United Kingdom
Online Status: Offline
Posts: 7
Quote NeilD Replybullet Posted: 23 Aug 2013 at 4:56am
Thanks for the suggestion, but sadly, I have already added the "whileprintingrecords" statement to each manual subtotal as well as to the other formula fields that contribute to the subtotals.
Unhappy
Dot
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 23 Aug 2013 at 5:38am
I have noticed this before. Drilling down seems to make the drilled n report act like a seperate report or a sub report.
A wrinkle though is that if you create a formula field using the fuctions liek sum/count/average and place that in the drille ddown section ti still willshow the values from the whole report.
IP IP Logged
NeilD
Newbie
Newbie
Avatar

Joined: 02 Aug 2013
Location: United Kingdom
Online Status: Offline
Posts: 7
Quote NeilD Replybullet Posted: 24 Aug 2013 at 12:40pm
Thanks but I'm afraid that didn't work either Unhappy
Dot
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