Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Footer summary issues Post Reply Post New Topic
Author Message
krisgarcia1414
Newbie
Newbie


Joined: 13 Jan 2012
Online Status: Offline
Posts: 9
Quote krisgarcia1414 Replybullet Topic: Footer summary issues
    Posted: 13 Jan 2012 at 9:21am
Such a simple task has proven to be a real pain! I have custom formulas doing conditional counts for a table called
"FalloutTimelineTable".

An example of one of the counts is as follows:

If
{falloutTimelineTable.PROGRAM} In["FNMA10","FNMA15"]
and
{falloutTimelineTable.CLOSE DATE} <> Date(12/30/1899)
Then 1
Else 0

I then sum the result of this formula using another formula to get the count I want.

Sum({@FNMA 10/15 Count})

It is the result of this formula that I place into the report footer. The problem arises when I try to use the same counting method using a separate database table. My other database table is called "FalloutTimelineCalcs"

I am basically trying to count how many variables under "Days Extended" are grater than 0. My formula is as follows:

If
{falloutTimelineCalcs.daysExtended} <> 0
Then 1
Else 0

I then use the same "Sum" function I used before, but when I try to insert the result of that sum function into the report, the report hangs up for about 30 seconds doing calculations for tens-of-thousands of database fields (weird), displays a result that is WAY off, and changes the results of all other summary fields in my report. I am at wit's end here. Any help or suggestions would be appreciated.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Jan 2012 at 10:06am
You can use running totals or variable formula for this.
The running total version would be
Name= whatever
Field to summarize=primar key
Type=distinct count
Evaluate=use a formula
Daysextended<>0
Reset=never for report total (or a group for a group total)
Place in report or group footer
IP IP Logged
krisgarcia1414
Newbie
Newbie


Joined: 13 Jan 2012
Online Status: Offline
Posts: 9
Quote krisgarcia1414 Replybullet Posted: 13 Jan 2012 at 11:14am
Originally posted by DBlank

You can use running totals or variable formula for this.
The running total version would be
Name= whatever
Field to summarize=primar key
Type=distinct count
Evaluate=use a formula
Daysextended<>0
Reset=never for report total (or a group for a group total)
Place in report or group footer


Unfortunately, I encountered the same result. The record count is no where near what it should be, and the other summary fields I have in the report have blown up (their values are now in the hundreds of thousands rather than hundreds). I appreciate the help!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Jan 2012 at 11:19am
When you added a new table to your report it created duplicate rows. First check your joins. If the tables are not joined you will get a huge Cartesian result.
Your other values exploded because once you used a field from the new table it enforced the join which is when the Cartesian result occurred.
In the running total did you set it to a distinct count or a count. Regardless of the duplicated number of rows your result should be the same with the distinct count.

Edited by DBlank - 13 Jan 2012 at 11:20am
IP IP Logged
krisgarcia1414
Newbie
Newbie


Joined: 13 Jan 2012
Online Status: Offline
Posts: 9
Quote krisgarcia1414 Replybullet Posted: 17 Jan 2012 at 6:10am
Originally posted by DBlank

When you added a new table to your report it created duplicate rows. First check your joins. If the tables are not joined you will get a huge Cartesian result.
Your other values exploded because once you used a field from the new table it enforced the join which is when the Cartesian result occurred.
In the running total did you set it to a distinct count or a count. Regardless of the duplicated number of rows your result should be the same with the distinct count.


I had a feeling it had something to do with the table setup. I have little experience with setting up the links in the table, but the only column of information that matches between the two is called the "Universal Join Column", which I assume is automatically added in by Crystal. The number of rows in the two tables is also the same.

I used a distinct count and the problem still occurred.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 17 Jan 2012 at 8:30am
sometimes you need a third table that links the two together in the manner in whcih you need.
You might also consider a Union of the two tables.
Crystal might have smart linking on to try and default links but that does not meant hay are the corerct links for your use of the data.
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.