Solved

multiple formats in Cross-tab Crystal reports 2008

Posted on 2013-11-04
5
417 Views
Last Modified: 2014-01-06
I have yet to find the answer to this question so I will throw it out there.

I am working on a cross tab in Crystal the problem is that some of the numbers will be formatted as percents and some of the others will be in whole numbers or dollars. The problem is when I try to format based on the 'data' I want to change it changes all of the formats for all of the fields not just that 'column' The amount of columns is dynamic but I do have a field name so ideally if I can format 'if field name is avg products' leave alone, 'if field name is total loans' make dollar sign  and finally 'if field name penetration rate' format %.

hope this makes sense.
0
Comment
Question by:gilweber3
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 39621852
Have you looked at using the Grid Value Functions?

The CurrentColumnIndex returns the column number of the cell
GetIndexOf("FieldName","ColumnName  to Find")

mlmcc
0
 

Author Comment

by:gilweber3
ID: 39621863
I am assuming what this means is you put in a 'name of the field' it returns the index number( column number) based on that you run something like this:

f (CurrentColumnIndex  = 2) = 0 then
"%" else ""
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 39621888
Something more like

If (CurrentColumnIndex = GetIndexOf("ColumnField","Penetration Rate") then
    CStr(CurrentGridValue,2) & "%"
Else
    CStr(CurrentGridValue)

mlmcc
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question