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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CR11 - crosstab, some cells empty

Status
Not open for further replies.

azoe

Technical User
Feb 21, 2005
175
US
There is one crosstab for each employee. For some employees all the cells are populated whether with a zero or other figure. For some employees the detail cells are blank but the total lines at the bottom of the last group and in the last column are populated. I am using the formula below for the summarized field. In case the problem was a null I tried adding the //new parts below to see if there was any change but there wasn't.

Does anyone have any ideas about why the individual cells might be blank when the total fills in?

Thanks -


If {@ChargeCondition} = True
Then
if isnull({dch_MonthlyProduction;1.ChgAmt}) //new
Then 0 //new
Else {dch_MonthlyProduction;1.ChgAmt} //new
// {dch_MonthlyProduction;1.ChgAmt} //old

Else If {@AdjustmentCondition}
Then {@ConvertAdjustments}

Else If
{@The4GroupSplit} = "2Refer70"
Then
{@NetCollections} * .7

Else if {@The4GroupSplit} = "2Render30"
Then
{@NetCollections} * .3

Else {@NetCollections}
 
As a diagnostic, use [Save As] and modify the new version to show the detail lines for each employee.

Include a display of {@ChargeCondition}. Assuming it is boolian, I think you'll find that it is sometimes blank instead of 'true' or 'false'. You probably need to modify {@ChargeCondition} to allow for nulls.

Incidentally, it would be fine to say if {@ChargeCondition} rather than if {@ChargeCondition} = True. Or if not {@ChargeCondition} for False.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Does anyone have any ideas about why the individual cells might be blank when the total fills in?

A total for a group will ignore nulls and just sum the non-null values. Normally you have to test for nulls on a field before doing anything else with it, but null is an exception.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Thanks for the suggestion of including @ChargeCondition to display. I don't see any blanks.

I changed the report options to use default values for database and other hoping that would help if the problem was Nulls. But it didn't.

This is all I have for my @ChargeCondition formula:
{dch_MonthlyProduction;1.RenderReferPercent} = 10

That is a temp field I created so I could use the 10 and other numbers I fill in for calculations in Crystal.

On one of the blanks I checked the detail for, there are only 2 records in that group. The first one is false and the figures are zero. The second one is true and the same figure that appears in the total row shows up.

I changed the formula (see below) but it didn't help.

isnull({dch_MonthlyProduction;1.RenderReferPercent}) then False
else
{dch_MonthlyProduction;1.RenderReferPercent} = 10

thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top