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!

Grid Row Column Value 1

Status
Not open for further replies.

Chumley40

Programmer
Jan 24, 2005
71
US
I am trying to format my number in a crosstab based on the column field name. Does anyone know how I can do that?

For example BP - no decimal, temp - 2 decimal.
Thanks!
 
Right click on the crosstab field->format field->number->customize->decimals->x+2 and use a formula like the following where "table.vitals" is your column field with the curly brackets removed:

if GridRowColumnValue ("table.vitals") = "BP" then 0 else
if GridRowColumnValue ("table.vitals") = "temp" then 2 else 0 //or your default

-LB
 
Worked perfectly---Thank you very much. Another question, can I insert a text object (/) at the end of one column but not the others in a crosstab?
Thanks again!
 
Do you mean at the end of a column name/label? What would be the condition? What is the column name?

-LB
 
The column name is Systolic BP, If it is possible, I would like it to return a number (space) then a /. Like this:

Systolic Diastolic Pulse Respirations Temp
BP BP
120 / 70 70 18 99.6

Thanks
 
You can't really tack that onto the value since it would become a string and you would lose your ability to calculate with it. Instead you could recreate the crosstab, using the same row and column field, and for the summary, use the following formula:

whilereadingrecords;
if {table.vitals} = "Systolic BP" then "/" else ""

Then go to the customize format tab and check "Suppress row totals"->check "suppress column totals". Then click on "format grid lines"->uncheck "show grid lines". Then in preview or design mode, suppress both the column and the row labels. Place the second crosstab directly over the first one so that the slash mark fits at the end of the first column (You'll have to format the slash mark to be right justified).

-LB
 
I think that might work. Makes sense, thanks,
Toni
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top