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

Merging documents in SSRS report

(0) ShareShare
ReportReport
Posted on by

I have a report which has 2 components , SSRS + attachment stored in Docref table.

When a user prints the report, the report prints via the printer user chooses in the print medium window , for example Printer A.

However the attachment prints via Printer B which is default printer in user's system.

Also when user prints multiple reports , all the SSRS stuff prints 1st & then all the documents from Docref  table.

Please let me know what can i do to achieve the following.

1 . Both SSRS & Docref attachments prints through 1 printer which user chooses in print medium window, i.e. all via Printer A & nothing prints to Printer B.

2. When multiple reports are printed it prints like report1+ attachments for report 1, report 2 + attachment for report 2  & not like report 1  + report 2 + attachments 1 + attachments2..

I was thinking of making attachment as file object in SSRS report, but then that would be altogether different problem as attachments could spill unevenly across pages, plus read multiple articles suggesting not to include attachment as file object in SSRS report.

I think most probably i will have to print  & store the report 1st as PDF & then print this PDF to printer followed by related attachments, however unsure how to get this technically done in X++.

Please suggest a solution.

Thanks & Stay safe.

Mav

I have the same question (0)
  • Blue Wang Profile Picture
    on at

    Hi Mav,

    Have you tried to use SRSPrintDestinationSettings class?

    printDestinationSetting.printerName(printer);

  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Mav,

    I think printing to PDF it good idea, than you can print all pdf to printer via .net (write own library and it to ax) or winapi.

    docs.microsoft.com/.../system.drawing.printing.printdocument

    www.theaxapta.com/.../print-pdf-files-from-ax-x-code.html

  • Mav Profile Picture
    on at

    I found a thread but with no solution :-( .

    dynamicsuser.net/.../how-to-change-the-defalut-windows-printer-from-ax

    This is exactly what i want to do but issue is that my report prints through the printer user chooses in printer window & the documents from doc ref table uses standard funtionality to print via [tag:ShellExePrint] which always uses system default printer. Requirement is to print both the report & docuref document to printer user chooses to print the report from.

    Any ideas?

  • Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Mav,

    By the way, check if this solution can help you to print files to needed printer

    www.artofcreation.be/.../

  • D365 Developer Profile Picture
    215 on at

    Hi Mav,

    Could you let me know how you managed to print SSRS report +Docuref table attachment. I have a similar requirement.

    Thanks!

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 663 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 348 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans