CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Jun 2009
    Posts
    3

    Symbol and Position Formulas not the same in Number and Currency

    Hello,

    Using Crystal Reports 10

    I'm trying to use different formats for different currencies. For example. $15,000 and 15,000EUR.

    I have these two formulas


    For Currency Position
    if {eaSPSelDealPayoutByDateRangeInitialQry;1.Currency } = "USD" Then
    1
    else
    3

    For Currency Symbol
    if {eaSPSelDealPayoutByDateRangeInitialQry;1.Currency } <> 'USD' Then
    {eaSPSelDealPayoutByDateRangeInitialQry;1.Currency }
    else
    '$'


    I have 3 fields that would use this formula, one Numeric and two currencies. The formula works as expected in the Number but not in the Currency.

    Any ideas on why this is happening?

    Thanks!

  2. #2
    Join Date
    May 2003
    Location
    Islamabad, Pakistan
    Posts
    284

    Re: Symbol and Position Formulas not the same in Number and Currency

    put the field on report

    Right Click -> Format Field -> Number Tab -> Customize -> Currency Symbot Tab

    Set the position for the currencies and Currency symboy in the conditional formula of your choice.
    By this you can adjust the currency symbol and its position according to your requirement or choice.
    Attached Images Attached Images  

  3. #3
    Join Date
    Jun 2009
    Posts
    3

    Re: Symbol and Position Formulas not the same in Number and Currency

    Thanks! That is how I was trying to do it, but it wouldn't let me. I couldn't do it so I decided to solve it by using a Formula Field instead of applying the formula to the Currency Field and doing it that way.


    if {eaSPSelDealPayoutByDateRangeInitialQry;1.Currency} = "USD" then
    "$" & cstr({eaSPSelDealPayoutByDateRangeInitialQry;1.ClientEarnings})
    else
    cdbl({eaSPSelDealPayoutByDateRangeInitialQry;1.ClientEarnings}) & " " & {eaSPSelDealPayoutByDateRangeInitialQry;1.Currency}

  4. #4
    Join Date
    May 2003
    Location
    Islamabad, Pakistan
    Posts
    284

    Re: Symbol and Position Formulas not the same in Number and Currency

    Dear I suggest you should use the way I told you.

    I did a sample which worked on my end.

    From today I am onvacation other wise I would send you the sample.

    Attach you report might be some one else could help you.

    It is very simple dear using a shared variable you should set the currency and in the formula you should check the currency symbol and set the symbol position to right or left and as well set the symbol.

    Play little bit with Crystal you can do it.

Tags for this Thread

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured