Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2004
    Posts
    53

    Question Unanswered: How do divide ALL my numbers by 1000 without having to create separate formulas?

    Subject is self-explanatory, but I will provide more details.

    I have created a set of reports and my client now wants to see all figures in thousands. Dividing the amounts at the data source is not an option, before this is suggested. Long story.

    I have had no choice but to create ONE FORMULA PER NUMBER on my report and divide by 1000. Actually, I created a function called {@Scale} that only returns 1000 and I am dividing by that function instead, just in case they change their minds. I could always go change the value of my {@Scale} formula.

    This is an extremelly tedious job, to say the least. I have created 80+ formulas in one of my reports and I still have many more reports to go. Obviously, this increases the margin for errors.

    Can you recommend an alternate solution to this problem?

    TIA!

  2. #2
    Join Date
    Sep 2006
    Posts
    7
    I think you could use the Disply String formula on the Common Tab of the Format Field dialog.

    ToText(CurrentFieldValue/{@Scale})

    You'd still have to edit all of your fields, but you wouldn't have to create a bunch of formulas. Or you could change the formatting for numbers in the options, then delete and re-add all of your numeric fields.

  3. #3
    Join Date
    Jul 2004
    Posts
    53
    Quote Originally Posted by scarlett
    I think you could use the Disply String formula on the Common Tab of the Format Field dialog. You'd still have to edit all of your fields, but you wouldn't have to create a bunch of formulas.
    I like that solution, although, to be honest, I don't know whether I'd prefer to create the formulas or do this. Granted, this would probably be less work when creating the report. A bit. But then it would be a pain to maintain. Even worse than the formulas.

    Quote Originally Posted by scarlett
    Or you could change the formatting for numbers in the options, then delete and re-add all of your numeric fields.
    I like this solution better, although I went to the options (File|Options), Fields tab and then Number button, but I don't see anything there that can help me achieve this.

    Can you please give me more details on this last solution?

    Thanks a lot! Especially when I see this is only your second post and you are already helping others.

  4. #4
    Join Date
    Jul 2004
    Posts
    53
    scarlet, on second thought, you are my hero(in)!

    When I saw your formula, I thought "CurrentFieldValue" was your way of saying the name of whichever field I was formatting, and that I was going to have to change the format of each one of the fields one by one and replace this "CurrentFieldValue" by the actual field value.

    But then I got a hunch, as I have been wondering for a long time if Crystal had such a function that will return the value of the current field without having to explicitly specify it, so I went to my formatting function for one of these fields, typed "CurrentFieldValue" and voila! The word turned blue!

    This is it! All I have to do is highlight all of my numbers, go to the Common field properties and customize my display string to:

    ToText (Round (CurrentFieldValue / {@Scale}, 0), 0, ",")

    Thanks a whole bunch!!!!!!!!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •