I have been trying to make changes to the default Epicor report “Sales Tax Report”.

The issue I have encountered is adding the field “TaxRegionCode” to the form causes the dollar values given by the calculated fields to be multiplied by the number of lines on the invoice.

That particular invoice has 5 lines on it, and is 5x as large as it should be. Every other invoice on the report follows this same logic. 10 lines = 10x mult, so on and so forth.

My RDD is identical to the original with the exception of my added data sources and their corresponding relationships.

Original:

Duplicate:

Relationships are both in correctly I think as well, relation is output as definition only provided no data.

And finally my corresponding dataset query in SSRS.

That query would return the total tax amount on each row it returns. You’re using the SUM(T3.Calc_TaxAmt), so it’s adding up the value on each row. Since you’re already grouping this, I would just remove the SUM() aggregate functions, and group by those fields.

It looks right from here. It’s kind of hard to tell using a screencap instead of the text. I’m not sure why it’s coming through empty. I’d try going back to the original and changing one of those fields at a time, to see if one in particular is messing it up.

I’ll give changing them separately a try. Here’s the actual text, if it is of any value. Only the second half seems to embed properly however, not sure why - so the first section is plaintext.

="SELECT T1.InvoiceDate,T1.InvoiceNum,T1.LegalNumber,T1.Calc_Custid,T1.Calc_CustomerName,T3.TaxCode,T1.FiscalPeriod,T1.FiscalYear,T3.Calc_ReportableAmt as Calc_ReportableAmt,T3.Calc_TaxableAmt as Calc_TaxableAmt,T3.Calc_TaxAmt as Calc_TaxAmt,T3.Calc_taxdesc,T5.TaxRegionCode,T6.Description

FROM InvcTax_" + Parameters!TableGuid.Value + " T3
INNER JOIN InvcHead_" + Parameters!TableGuid.Value + " T1
ON T3.Company = T1.Company AND T3.InvoiceNum = T1.InvoiceNum
INNER JOIN InvcDtl_" + Parameters!TableGuid.Value + " T5
ON T1.Company = T5.Company AND T1.InvoiceNum = T5.InvoiceNum
INNER JOIN TaxRgn_" + Parameters!TableGuid.Value + " T6
ON T5.Company = T6.Company AND T5.TaxRegionCode = T6.TaxRegionCode
GROUP BY T1.InvoiceDate,T1.InvoiceNum,T1.LegalNumber,T1.Calc_Custid,T1.Calc_CustomerName,T3.TaxCode,T3.Calc_taxdesc,T1.FiscalPeriod,T1.FiscalYear,T5.TaxRegionCode,T6.Description,T3.Calc_ReportableAmt,T3.Calc_TaxableAmt,T3.Calc_TaxAmt"

Well, for anyone who finds this thread - I gave up on editing Epicor’s default form and just ended up making my own from scratch. Works perfectly and I don’t have to bother with working around their default queries or premade RDDs. Not really sure if I should mark this as the solution since I didn’t so much as solve the problem as I did simply begin anew.