Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange Formula Behavior

Status
Not open for further replies.

joeg23

Programmer
Apr 5, 2006
13
US
Hi,

I'm using CR XI with an excel database.

I'm trying to create 3 outputs for one group based on three separate date ranges. The ranges are pulled from parameter fields. They are:

Week (Start/End) - WTD
Month (Start/End) - MTD
Cumulative (Start/End) - Cum

My report looks something like this:

Error Type WTD MTD Cum
Type A 2 4 5
Type B 1 1 2

However...I've created 3 separate formulas for each variable type. They look like this:
-----------------
if {export_.QA Finding Date} in {?CumStart} to {?CumEnd} then
(
if isnull({export_.QA Finding}) or
{export_.QA Finding} <> "Analyst / Worksheet- didn't record credit score" then
0 else 1
)
-----------------
The ONLY difference between the formulas (I copied and pasted) is the parameter fields.

I then consolidate the formulas through a Sum formula like this:
---------
{@Etype1Cum} +
{@Etype2Cum} +
{@EtypeNCum}
---------
Finally, I create a summary for each of these formulas and place them in the report to print for each group member.

Here's the issue...The formulas for Week, Month and Cumulative are all outputting the same data. So my report looks like this even though the values are definitely different.
----------
Error Type WTD MTD Cum
Type A 2 2 2
Type B 1 1 1
---------

Any ideas???
 
First, I'd simplify the formula:

if {export_.QA Finding Date} in {?CumStart} to {?CumEnd} and
{export_.QA Finding} = "Analyst / Worksheet- didn't record credit score" then
1
else
0

I don't understand why you're using parameters for a week to date or month to date as these can be resolved using a formula, as in:

if {export_.QA Finding Date} in monthtodate
and
{export_.QA Finding} = "Analyst / Worksheet- didn't record credit score" then
1
else
0

Anyway, al long as the dates differ, you should get different values.

Perhaps you have somehting in the record selection formula which is limiting what is being returned?

-k
 
Hey thanks for all your help with this question and others!

It was a record selection issue...i had a <> to 0 condition that was causing the error...thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top