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

convert 0 to null or blank in crosstab 1

Status
Not open for further replies.

aks12

Technical User
Nov 10, 2005
60
US
I am using CR 10 with Oracle database.

I have a crosstab in my report and the user wants the final output format as Microsoft Excel (data only) and all crosstab values as numeric. The first column in the crosstab is a percentage calculation that by design returns 0.00% all the way down the column. The user does not want to see 0.00%, but rather a blank cell in Excel. Is there a way to modify the first formula below (or the crosstab cell formatting) so that the '.' column will show up blank in the Excel output?

[@saved acct persist %]

numberVar x;
if {@Persist Interval}='.' then
x := {TR_REVENUE_RPT_OUTPUT.Account Persistency};
if {TR_REVENUE_RPT_OUTPUT.Account Persistency}%x=100 then
0
else
{TR_REVENUE_RPT_OUTPUT.Account Persistency}%x


[@Persist Interval]
if {TR_REVENUE_RPT_OUTPUT.PERSIST_INTERVAL} = 0 then
"."
else
if {TR_REVENUE_RPT_OUTPUT.PERSIST_INTERVAL} > 0 and {TR_REVENUE_RPT_OUTPUT.PERSIST_INTERVAL} < 36 then
"Int. " & totext({TR_REVENUE_RPT_OUTPUT.PERSIST_INTERVAL},0)
else
"Int. 36+
 
If you format the cells to "suppress if zero" (format field->number->customize->suppress if zero), the zeros should not appear when the crosstab is exported.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top