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

highlight cross tab cell with and without dollar sign 1

Status
Not open for further replies.

swiss2007

Technical User
Aug 13, 2007
92
US
I have a cross tab that is set up like below.

--Rows
ReviewNo
Cost

--Columns
Year
Month Period

--Summarized fields
PaperAmount

The report uses a command statement that uses union all to get the desired results.

select




select MonthPeriod,FiscalYear,ReviewNo,
case when Papertype = 'Adtype' then 'Ad Cost($)'
when Papertype = 'ComAdtype' then 'ComAd Cost($)'
end as 'Cost',PaperAmount from PaperAmount
union all
select MonthPeriod,FiscalYear,ReviewNo,
'Paper Demand',PaperDemand from PaperDemand


Month Fiscal Review Cost PaperAmount
Period Year No
200807 2009 150009 Ad Cost($) 1936.59
200808 2009 200001 Ad Cost($) 1450.60
200807 2009 400004 ComAd Cost($) 15970.36
200808 2009 620004 ComAd Cost($) 160009.50
200807 2009 400004 Paper Demand 833.36
200808 2009 620004 Paper Demand 4554.50
--
--
--


So on.

In the cell I want to highlight Costs with a $ sign and Demand with no dollar sign.
How do I do this, as its the same field, its either number or dollar but not both.
I tried to use the formula

if gridrowcolumnvalue("{Cost}") in ["Ad Cost($)","ComAd Cost($)"]
then crFixedCurrencySymbol else crNoCurrencySymbol

but ended up with an error like

"This is not the name of a grid group for the field being formatted"

Thanks
 
Try:

if gridrowcolumnvalue("Command.Cost") in ["Ad Cost($)","ComAd Cost($)"] then
crFixedCurrencySymbol else
crNoCurrencySymbol

For the gridrowcolumnvalue you remove the curly bracket from around the table.field name and replace with double quotes as above.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top