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

Conditional Formatting to add '%' only to the percent value-CrossTab

Status
Not open for further replies.

PPetronas

Programmer
Nov 13, 2008
14
0
0
US
Hello All,

I have a Crosstab in which I have 'Sum Of Command.Totals' under my summarized Fields. This is being calculated at the query level either as a Number or as a Percentage.
I want to display % sign only for the ones that are percent and blank for the numbers. Under my Crosstab Rows I have 'Command.Label' which is putting in labels such as 'Total Submitted', 'Submission Rate','First Time Reject Rate','First Time Reject Rate'.
I wrote a formula under Currency Symbol
IF {Command.Label} in ['Submission Rate','First Time Reject Rate'] then '%' else ' ' , but it does not work.
Is there a way to get this done?

Thanks in advance,
Petronas
 
Are you referring to changing the label or the summary field?

Try using the "display string" formatting feature. Use a formula like this:

if gridrowcolumnvalue("yourcolumnfield")='Submission Rate' then
totext(currentfieldvalue,2)+'%' else
totext(currentfieldvalue,2) //2 for two decimals

-LB
 
Hi Lbass,

Thank you so much! I appreciate you taking the time to give me the perfect solution. I have a question regarding the GridRowColumnValue. If my Columnfield is based on a parameter, a date range.Eg, if I select YTD ( year to date) from the parameters the column field would be Jan 12, Feb 12 , March 12.
In that case , how can I use the GridRowColumnValue("Column.DateMonth")?

Thanks again,
Petronas
 
You might be limiting your records by a date range parameter, but you are actually grouping on the date field (on change of: month). For dates, you might want to go into the customize style tab, select the column, and in the area where it says "Alias for Formulas", replace the default value for the selected column with "Month". Then just reference "Month" in the gridrowcolumnvalue().

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top