Method Community

 

Currency change to Euros

Last post 05-27-2015 12:27 PM by Method_Audisho. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 05-26-2015 2:27 PM

    Currency change to Euros

    Hi,

    I have a database that needs to display Euros at all times. I have gone into the customize tab and changed the default currency symbol in display to EUR. However, my forms are still showing $. I have looked at the formatstring of the fields in report designer but I do not see other currency symbol options. I know that c2 will change the currency depending on the location, but I need it to display Euros even for people using the account in the US. How can I make this change so that it stays EUROS for everyone in all screens/forms?

    Thanks,

    Conner

  • 05-26-2015 2:49 PM In reply to

    Re: Currency change to Euros

    Hi Conner,

    Use the format string “{0:€0.00}” to force euro as the currency symbol. This format string uses whatever symbol you include as the currency symbol and formats the number to 2 decimal places.

    I hope this helps.

    -Audisho

    Audisho Sada
    Product Manager
    Method:CRM
    a.sada@method.me
    Toll Free: 1.888.925.6238
    Local & Overseas: 416.847.0400
    Fax: 416.640.6027
  • 05-26-2015 6:01 PM In reply to

    Re: Currency change to Euros

    When I change it and then click preview I am getting the error "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name:Index." After clicking ok on that I get the error "The following error occured when the script in procedure xrItemPrice.OnBeforePrint:Conversion from string "€5210.00" to type "Double' is not valid. Procedure xrItemPrice.OnBeforePrint was executed, it will not be called again."

    Is something wrong with the form is the preview just messing up?

    Thanks,

    Conner

  • 05-27-2015 8:54 AM In reply to

    Re: Currency change to Euros

    Hi Conner,

    I’ve tested this myself and it works fine for me. Allow me to ask a few questions for clarification.

    Are you customizing a stock report or building your own from scratch? 

    Are you running any custom scripts on the report? 

    What data type is the field you are trying to apply this to? 

    I’m unable to replicate this error. It seems that even if I apply the format string to an incorrect data type, Report Designer is intelligent enough to remove it or simply ignore it.

    You can try having report designer build the format string for you. If you select the ellipsis ‘…’ button, the FormatString Editor will be displayed. Select Currency > Custom and enter “€0.00”. This simply builds the format string the I provided you previously.

    -Audisho

    Audisho Sada
    Product Manager
    Method:CRM
    a.sada@method.me
    Toll Free: 1.888.925.6238
    Local & Overseas: 416.847.0400
    Fax: 416.640.6027
  • 05-27-2015 9:46 AM In reply to

    Re: Currency change to Euros

    Hey, to answer your questions: I am customizing the stock estimate report, and I am not running any scripts that I know ofThe data I am applying this to is the estimateline.rate, estimateline.amount, and estimateline.totalamount. I know it has to do with this because when I change it back from €0.00 to $0.00 it no longer gives me the error. When I choose currency/custom and enter in €0.00 and then come back it is selected as a number instead of a currency, could this be the issue?

  • 05-27-2015 9:54 AM In reply to

    Re: Currency change to Euros

    After testing it out further, the error only occurs when i add € to the EstimateLine.calcAmount column. I have also tried EstimateLine.Amount in this area too. I went into the script for estimateline.calctotalamount and clicked the default script button and it seems to work now. Not sure what I did, but I am no longer getting the error.

  • 05-27-2015 12:27 PM In reply to

    Re: Currency change to Euros

    Answer

    Hi Conner,

    There is a script on the rate field directly to the left of the amount field that is causing this issue. It seems that .NET is able to convert a currency string to a double for calculations as long as it is a common format. Since “€0.00” isn’t a common format (at least according to .NET), this conversion fails and the error is thrown.

    A script is needed to calculate the cost per item on the estimate print template because this may differ from the item cost after markup is added. You can find this script by selecting the Rate field (xrItemPrice) and opening the OnBeforePrint.

    I’ve done some testing and you can fix this by using a calculated field for the rate instead of a script. Delete the current rate field and replace it with a calculated field with the expression “[Estimate.EstimateLine.Estimate.Amount] / [Estimate.EstimateLine.Estimate.Quantity]”. Then drag the calculated field onto your template in place of the rate field. This will allow you to use the format string “{0:€0.00}” on all of your fields without error including this new calculated field.

    I hope this helps.

    -Audisho

    Audisho Sada
    Product Manager
    Method:CRM
    a.sada@method.me
    Toll Free: 1.888.925.6238
    Local & Overseas: 416.847.0400
    Fax: 416.640.6027
Page 1 of 1 (7 items)