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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Multiple SSRS report in one report viewer

(0) ShareShare
ReportReport
Posted on by 303

Hi experts,

I have the payment journal line report which executes according to each line of the payment. E.g when I select one line and print the report it gets the data of the payment line on the report on one single page. And when I select other line and print the report it opens another report viewer related to that line which is fine yet. Now I have the requirements in which user want to see all payment line reports in one report viewer. E.g if there are 10 lines in the payment journal then there should be one SSRS report viewer open with 10 pages; 1 page for each payment line.

So how we can achieve this and what is the best way to perform these type of requirements?

Thanks

I have the same question (0)
  • Suggested answer
    GirishS Profile Picture
    27,827 Moderator on at

    Hi Muhammad Nauman Rashid,

    You need to modify the code in the dp class to get the payment journal lines against the journal number. So if you filter with payment journal number you got all the payment journal lines related to that.

    For example you have "LedgerJournalTable" and "LedgerJournalTrans".

    Now you have added relation between this tables and also journal number as range. So it will loop through all the payment lines.

    if there are 10 lines in the payment journal then there should be one SSRS report viewer open with 10 pages - 1 page for each payment line - To achieve this, in a temp table you need to insert the "LedgerJournalTrans" table RecId. Now in the report design you add that RecId field as group by. Also in the group by property >> Page breaks >> Check the "Between each instance of a group".

    So it will print each line in separate page.

    Thanks,

    Girish S.

  • Suggested answer
    Arunraj Rajasekar Profile Picture
    1,743 on at

    Hi Muhammad,

    It is possible, but you may need to create a separate menu item to generate the report.

    The current report generates a report for each line; however, the new requirement is to query the selected records from the grid, which requires the use of the multiselecthelper class. Pass this query to the report class and make the report design changes mentioned by Girish.

  • M.Nauman Rashid Profile Picture
    303 on at

    Thanks Girish i think it will work but want to know if there are header and footer involved those also have LedgerJournalTrans records and the tablix is just involved in the body section not in header and footer then how we can print it on multiple pages?

    For example we have 10 lines in LedgerJournalTrans table having different vendor id's and these vendor id need to populate on the header section. So we want to have separate vendor id on each page having related LedgerJournalTrans records in body section.

  • Martin Dráb Profile Picture
    237,817 Most Valuable Professional on at

    Then the information about vendor etc. needs to be in the report body, not in the page header (or foooter).

  • GirishS Profile Picture
    27,827 Moderator on at

    Yes, As per Martin suggestion - It must be in the report body.

    Thanks,

    Girish S.

  • M.Nauman Rashid Profile Picture
    303 on at

    okay so here is the scenario, I have one datasource 'xyz' having ledgerjournaltrans records and invoice records. Consider it like one ledgerjournaltrans record having multiple invoices (1:m relation). Now i am able to used the ledgerjournaltrans records (vendor id, method of payment, payment id etc.) as group by which actually did the page break part but I also have to show the invoice details in same report in body which can be multiple because the invoices can be multiple of each ledgerjournaltrans line. So i think tablix will not work here due to grouping so i add subreport and use the same datasource 'xyz' which actually have invoice detail also.

    Now i want to add and filter subreport through main report by giving payment id as a parameter. When i use payment id parameter in the report it gives me error "Subreport could not be shown" whereas if I removes the parameter then it shows me all the records of the datasource without the filteration of payment id which is incorrect because it need to be filtered according to the payment id. Please advice what we need to do to achieve this.

  • Martin Dráb Profile Picture
    237,817 Most Valuable Professional on at

    Why exactly do you think that a tablix wouldn't work? Is it because you aren't aware of the support for grouping at all, or do you have a problem with it that you don't know how to resolve?

    I would avoid the subreport completely, but if you decide to insist on using it, we'll need more information about what you did.

  • M.Nauman Rashid Profile Picture
    303 on at

    Please see the below green highlighted design and comments and let me know your thoughts? May be this can give the clear understanding what I need to do.

    3051.report.png

    Thanks

  • M.Nauman Rashid Profile Picture
    303 on at

    Hi Girish and Martin,

    I used the subreport to achieve this functionality but the problem is I am getting the error "Subreport could not be shown" whenever I execute the parent report through AX.

    1- I have created the another DP and contract class for the subreport with one parameter i.e. payment id

    2- Then i have added that parameter to the Subreport -> Properties -> Add with the parent report value

    but still getting same error ("Subreport could not be shown" ). Can you please advise that I am missing here?

  • Suggested answer
    AhmedRazaAttari786 Profile Picture
    51 on at

    Hi Muhammad Nauman,

    I recently achieved this requirement by using Tablix..

    your complete design which you want to repeat should be Tablix based.. and add row group  "Voucher No" on Tablix.. Uusing this approach you can repeat your design for every Voucher..

    Thanks,

    Ahmed Raza

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 512 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 291 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans