How to change price to another currency if other customer?

Hi. I normally use ? (Euro) as currency on my reports, but I also have an U.K. customer where I need to create the report with ?(GBP). I have changed the format of the string, so it is showing the correct symbol, but how can I recalculate the price on the items used?
On the xrNetWOTotal I can get the correct result if I say: xrNetWOTotal = xrNetWOTotal*7.45/8.5 (not sure about the naming) The 7.45 is the Euro rate and 8.5 is the GBP rate. The rate is set in customer contracts(outside Ayanova) so it will not change, so it is not a problem that it is hardcoded.

I have attached my report. The field I want to change is “XrTableCell 14”. LT_WorkorderItemPart_label_price.

Is it possible?

Best regards
Thomas

Hello Thomas

Just a heads up that xrTableCell14 is a label field with the preset text of “Service Rate” that is located in the DetailReportItemLabor area.
I believe the field you are referring to is actually xrTableCell71 where presently it has a Text Data binding to the LT_WorkorderItemPart_label_price in the WorkorderItemWorkorderItemPart dataset.

how can I recalculate the price on the items used?
The suggestion would be to remove the existing Data Binding, and instead use a script to obtain the price per from AyaNova to display in the Price Per label with do your additional Euro and GBP stuff

The forum topic Manual-muliplication-of-quantity-by-part-price-via-scripts gives examples of using a script to get the value of the original price of the part and multiply it by the quantity to display in a field that is for Net; keeping a running total of that for the groupfooter, and keeping a running total of those for the report footer.

As you just want Price Per, your script would be just to get the value of the original price of the part (with the addition of your Euro/GBP stuff) and display in that field.

So instead of:

//this gets the value of the original price of the part and multiples it by the quantity to display in this field what the Net
//amount would be with no markup
xrTableCell98.Text = string.Format("{0:c2}", (Convert.ToDouble(DetailReportItemPart.GetCurrentColumnValue(“LT_WorkorderItemPart_Label_Price”))) * (Convert.ToDouble(DetailReportItemPart.GetCurrentColumnValue(“LT_WorkorderItemPart_Label_Quantity”))));

You would do something like (I have not included your Euro/GBP stuff):

//this gets the value of the original price of the part to display in this field for Price Per
xrTableCell98.Text = string.Format("{0:c2}", (Convert.ToDouble(DetailReportItemPart.GetCurrentColumnValue(“LT_WorkorderItemPart_Label_Price”))));

Let me know that points you in the direction needed.

  • Joyce