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)

SSRS Pro Forma Report Design

(0) ShareShare
ReportReport
Posted on by

How can I change the report layout of the pro forma sales invoice? I understand that it shares the same report object as the sales invoice, but currently its printing whatever design is set for the sales invoice. I have two designs in my report object that I would like to use, one for the sales invoice and one for the pro forma invoice, but I cant control the pro forma from my controller extension. 

*This post is locked for comments

I have the same question (0)
  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    you are right.

    In ax actual report design is shared by performa, but you can always do customization to run the design of your choice with if conditions.

    you may have a look at next URL

    community.dynamics.com/.../running-a-different-design-of-a-report-part-1

  • Community Member Profile Picture
    on at

    That worked, thank you Sohaib. Some of the fields on the pro forma are not getting populated though. I am assuming they share the same DP right? I have researched other sources and learned that the CustInvoiceJour record for the pro forma gets thrown away after it is created, its not saved anywhere. I am not sure how to update the fields on the pro forma report. Are there other classes that I need to extend?

  • Community Member Profile Picture
    on at

    Hi Crispin, I have tried your approach and the report is still not printing those fields. Are there any other classes I need to extend?

    [PostHandlerFor(classStr(SalesInvoiceDP), methodstr(SalesInvoiceDP, processReport))]

    public static void tmpTablePostHandler(XppPrePostArgs arguments)

    {

           SalesInvoiceDP dpInstance = arguments.getThis() as SalesInvoiceDP;

           SalesInvoiceHeaderFooterTmp tmpTable = dpInstance.getSalesInvoiceHeaderFooterTmp();

           SalesTable salesTable;

           CustTable custTable;

           InventLocation inventLocation;

           Inventsite inventSite;

           CustInvoiceJour custInvoiceJour;

           while select forUpdate tmpTable

           {

               select firstonly1 CustAccount, InventSiteId, InventLocationId from salesTable

                   where salesTable.SalesId == tmpTable.SalesId;

               CustInvoiceJour = CustInvoiceJour::findRecId(tmpTable.JournalRecId);

               custTable = SalesTable.custTable_CustAccount();

               inventSite = InventSite::find(SalesTable.InventSiteId);

               inventLocation = InventLocation::find(SalesTable.InventLocationId);

       tmpTable.DeliveryAddress = CustTable.address();

               tmpTable.CustName = CustTable.name();

               tmpTable.CustEmail = CustTable.email();

               tmpTable.SiteAddress = InventSite.logisticsPostalAddress().Address;

               tmpTable.WarehouseAddress = InventLocation.logisticsPostalAddress().Address;

       if (CustInvoiceJour.isProforma())

               {

                   tmpTable.SiteAddress = "Just testing address";

               }

               ttsbegin;

               tmpTable.update();

               ttscommit;    

           }    

    }

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