web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to show TaxCode and TaxAmount line level on SalesQuotation report? AX 2012 R2

(0) ShareShare
ReportReport
Posted on by 1,813

Hii,

We are customizing SalesQuotation and SalesInvoice reports to show VAT information. At line level requirement is to show TaxCode and TaxAmount for each item. All Tax related setup is done and its calculating correctly at SQ and SO, but dont know how to show on line level for each item.

Where I can get and show TaxCode and TaxAmount in x++ to save in temp tables and then display on to the report.

Thanks,

*This post is locked for comments

I have the same question (0)
  • Verified answer
    István Orosz Profile Picture
    2,137 on at

    Hi,

    If the correct data calculated, then first you have to modify the report tmp tables and insert the fields, fill them in the report DP class, refresh the datasets in VS then insert the fields on the report layout. Rebuild, redeploy, refresh client caches is needed before tests. You can refer to this article: How to: Editing existing SSRS reports in AX2012

    Kind Regards,

    István

  • Rana Anees Profile Picture
    1,813 on at

    Thanks István Orosz,

    Its really helpful article you  shared.

    This part I already done. I have the those fields in temp tables, but not getting where to get the related tax values. What is relation among SalesQuotationTable, SalesQuotationLine with TaxTmpWorkTrans?

    Thanks

  • Verified answer
    Rana Anees Profile Picture
    1,813 on at

    Got it by following code...

            
    	TmpTaxWorkTrans             tmpTax;
        	SalesQuotationTable         salesQuotationTable;
        	SalesQuotationTotals_Sales  salesQuotationTotals;
    
            salesQuotationTable  = SalesQuotationTable::find(custQuotationTrans.origQuotationId);
            salesQuotationTotals = SalesQuotationTotals_Sales::construct(salesQuotationTable);
    
            // Calculate Tax
            salesQuotationTotals.calc();
    
            // Load tmpTaxWorkTrans
            tmpTax.setTmpData(salesQuotationTotals.tax().tmpTaxWorkTrans());
            
            while select tmpTax where tmpTax.InventTransId == custQuotationTrans.InventTransId && tmpTax.Company == custQuotationTrans.dataAreaId 
            {
                info( strFmt('%1 : %2' , tmpTax.TaxCode, -tmpTax.TaxAmount));
                salesQuotationTmp.TaxCode = tmpTax.TaxCode;
                salesQuotationTmp.TaxAmount = -tmpTax.TaxAmount;
            }


    Thanks: https://daxbeginners.wordpress.com/2014/04/04/how-to-get-tax-values-from-sales-quotation/

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans