How to modify OrderAck report to show new misc. charge

Hello,

I was asked to add a new Misc Charge, for handling fee, if order is under a certain limit. I called it TRAI as it’s MiscCode.
Works fine.

Now this fee is shown on the SOAck report, as prt of all misc fees at the bottom of the report.
I need to add a line before that, and add the cumulative misc charge with code TRAI, (and consequently remove this amount from the Misc total.
So that the total view would like
Total of order $500
Handling fee $ 50
Misc charge $ 80
taxes $ 75
Total $ 705

Instead of current:
Total of order $500
Misc charge $ 130
taxes $ 75
Total $ 705

I am no expert on report builder and I am strugling on how to first compute this value seperatly so I can compute the misc charge value to substract the handling total from it.

Can anyone provide me with some insights on how to acheive this? howto’s or video?

Thank you.

Pierre

First, you’d have to remove the fields from the SOForm_OrderMscCharge subreport.That’s the easy part

Hard part is that you then have to add the OrderMsc table to the main report dataset (which will cause duping issues that will have to be handled) or a new subreport that just handles totals (which may also cause duping or sum errors).

I personally built a new OrderAck from scratch rather than tweak the existing .rdl. The canned forms are not friendly.

Something that may not be obvious is that you can do all sorts of SQL in the dataset definition, like collecting data into Temp tables and adding that data to the list of returned fields. We did this to get all the misc charges collected and grouped, and we list the groups at the bottom with their totals. You don’t have to stick to having a single statement.

OK. Thanks for the responses.

I can see that OrderMsc is part of the Datasources.

I created a dataset with the dsSOForm as datasource, with the following SQL: called FraisTraitHeader where the sql=

="SELECT OrderNum, OrderLine, MiscCode, FreqCode, Calc_ChargeDesc, DocMiscAmt, FreqCode FROM OHOrderMsc_"& Parameters!TableGuid.Value

Where I added a filter MiscCode = “TRAI”.

I added a text box witth the following expression:

=sum( iif(Fields!FreqCode.Value ="E" , 0,  Fields!DocMiscAmt.Value ),"FraisTraitHeader" )

where I want the sum of the misc amount if freqcode != to each…

running the report, the text box value = 0, even if I do have such amounts totaling 225$.

What am I missing?

thanks

pierre