Print price in classic report

ReinhardReinhard Member Posts: 249
Hello,
I want to print the "Unit Price" on a 2012 classic report. And I want it to look like a price. So if the unit price is 12.56 then the report should print out:

$12.56

I have read all the threads on mibuso on this :) ](*,) ](*,)
Even the ones marked as solved did not work.
Anyone have any suggestions?

- Reinhard

Answers

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    May I know what did you try and what did not work?
    You need $ infront of amount,right?
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Reinhard wrote:
    Hello,
    I want to print the "Unit Price" on a 2012 classic report. And I want it to look like a price. So if the unit price is 12.56 then the report should print out:

    $12.56

    In the report, look at the Properties for the Unit Price field, and change it to

    format(round("Unit Price"),0,'$<Integer Thousand><Decimals>')

    That's probably not exactly what you need, but it should get you started in the right direction.
    David Singleton
  • ReinhardReinhard Member Posts: 249
    Hi David,
    Thank you that is a good tip. I was having problems getting the dollar sign in there.
    There is one problem though which is that this is cutting off unnecessary decimals.

    So a $4,000.00 bike in Cronus prints out as $4,000.

    Further attempts + results:

    : FORMAT(ROUND("Unit Price",0.01),0,'$<Integer Thousand><Decimals>')
    => decimals are still omitted

    : FORMAT(ROUND("Unit Price",0.01),0,'$<Integer Thousand><Decimals,2>')
    => decimals are still omitted

    : FORMAT(ROUND("Unit Price",0.01),0,'$<Integer Thousand><Decimals,3>')
    => success! \:D/ \:D/

    OK for a small bit of wrap-up or follow up... why does putting in
    Decimals,3
    end up displaying two decimals? :-k
  • David_SingletonDavid_Singleton Member Posts: 5,479
    I put the ROUND in there because I assumed you wanted unit price down to the nearest penny. You could drop the round completely and just use

    FORMAT("Unit Price",0,'$<Integer Thousand><Decimals>')

    Which might be what you want. But it depends what accuracy you want on the report.
    David Singleton
  • ReinhardReinhard Member Posts: 249
    David:
    It is a price sticker I'm printing out.

    The round works fine. It is necessary otherwise it will have problems if a long decimal price is getting printed.

    I just noticed that Decimals,2 ended up printing 1 decimal, and Decimals,3 ended printing 2 decimals places. (?)

    Thank you for your help on this!

    - Reinhard
  • David_SingletonDavid_Singleton Member Posts: 5,479
    The 3 includes the "."
    David Singleton
Sign In or Register to comment.