Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Answered

How to show bank account Information in Process report method in SSRS Report

Posted on by 115

BankDetail.jpg

I try to develop " Customized SALES TAX Invoice Report "  of SSRS RDP Report .

in this , i need Join to  CustinvoiceLine with BankDetails Table(something)    ,

so , my question is , what is the exact code , to retrive bank account Information ,Related to custInvoiceLine table   in the process report method ..

my current process report code is below

select * from custInvoiceTable  where custInvoiceTable.OrderAccount == custAccount
     && custInvoiceTable.InvoiceDate >= _FromDate && custInvoiceTable.InvoiceDate <= _Todate
        join custInvoiceLine
        where custInvoiceLine.ServiceAccountingCodeTable_IN == ServiceAccountingCodeTable_IN.RecId
        join ServiceAccountingCodeTable_IN 
       ;
         {
             
                TaxInvoiceTmp.InvoiceId            =      custInvoiceTable.InvoiceId;
                TaxInvoiceTmp.Name                 =      custInvoiceTable.Name;
                TaxInvoiceTmp.InvoiceDate          =      custInvoiceTable.InvoiceDate ;
               TaxInvoiceTmp.GSTIN               =      taxinfo.GSTIN ;
                 TaxInvoiceTmp.PanNo               =      TaxInformationCustTable_IN::findByCustTable( RAMA_TaxInvoiceTmp.InvoiceId ).PANNumber;
                 TaxInvoiceTmp.SAC                 =      ServiceAccountingCodeTable_IN.SAC ;
                 TaxInvoiceTmp.SacDescription      =      ServiceAccountingCodeTable_IN.Description ;
                //  TaxInvoiceTmp.BankName             =    
                //  TaxInvoiceTmp.BankAcNo             =  
                 // TaxInvoiceTmp.BankBranch           = 
                 // TaxInvoiceTmp.RTGS   
                 TaxInvoiceTmp.insert() ;
                 
        }

  • Verified answer
    PK mishra Profile Picture
    PK mishra 115 on at
    RE: How to show bank account Information in Process report method in SSRS Report

    I got solution from below code , thanks  

    select * from CompanyBankAccountTableData where CompanyBankAccountTableData.AccountID==CompanyInfo::find().Bank;

                            {

                               TaxInvoiceTmp.BankAcNo       =   CompanyBankAccountTableData.AccountNum;

                               TaxInvoiceTmp.BankBranch     =   CompanyBankAccountTableData.TEC_BankBranch;

                               TaxInvoiceTmp.RTGS           =   CompanyBankAccountTableData.TEC_IFSC;

                               TaxInvoiceTmp.BankName       =   CompanyBankAccountTableData.Name;

                               TaxInvoiceTmp.Bank_Swift     =   CompanyBankAccountTableData.SWIFTNo;

                             }

  • PK mishra Profile Picture
    PK mishra 115 on at
    RE: How to show bank account Information in Process report method in SSRS Report

    Yes

    Will....

  • WillWU Profile Picture
    WillWU 22,344 on at
    RE: How to show bank account Information in Process report method in SSRS Report

    Hi Praveen,

    Have you considered taking the report based on CustInvoiceJour/CustInvoiceTrans to get the information of all posted invoices.

    See the thread:

    community.dynamics.com/.../getting-physical-customer-information

  • PK mishra Profile Picture
    PK mishra 115 on at
    RE: How to show bank account Information in Process report method in SSRS Report

    There is No any Error ,

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 225,490 Super User on at
    RE: How to show bank account Information in Process report method in SSRS Report

    Does the information really exist on lines at all? Isn't the bank account defined on the header only, in CustInvoiceTable.CustBankAccountId?

  • Blue Wang Profile Picture
    Blue Wang on at
    RE: How to show bank account Information in Process report method in SSRS Report

    Hi Praveen,

    so, my question is, what is the exact code, to retrive bank account Information, Related to custInvoiceLine table in the process report method ..

    Debug your code, are there any errors or other problems? Please share with us, thank you.

  • Martin Dráb Profile Picture
    Martin Dráb 225,490 Super User on at
    RE: How to show bank account Information in Process report method in SSRS Report

    Let me start by formatting your code, so it's easier to read:

    select custInvoiceTable
        where custInvoiceTable.OrderAccount == custAccount
           && custInvoiceTable.InvoiceDate >= _fromDate
           && custInvoiceTable.InvoiceDate <= _todate
        join custInvoiceLine
        join serviceAccountingCodeTable_IN
            where serviceAccountingCodeTable_IN.RecId = custInvoiceLine.ServiceAccountingCodeTable_IN;
          
    taxInvoiceTmp.InvoiceId         = custInvoiceTable.InvoiceId;
    taxInvoiceTmp.Name              = custInvoiceTable.Name;
    taxInvoiceTmp.InvoiceDate       = custInvoiceTable.InvoiceDate ;
    taxInvoiceTmp.GSTIN             = taxInfo.GSTIN ;
    taxInvoiceTmp.PanNo             = TaxInformationCustTable_IN::findByCustTable(RAMA_taxInvoiceTmp.InvoiceId).PANNumber;
    taxInvoiceTmp.SAC               = serviceAccountingCodeTable_IN.SAC ;
    taxInvoiceTmp.SacDescription    = serviceAccountingCodeTable_IN.Description;
    
    taxInvoiceTmp.insert();

    Now there is an obvious bug - you joined custInvoiceLine to custInvoiceTable but you forgot to specify any join condition.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans