Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Answered

SSRS multi records

(0) ShareShare
ReportReport
Posted on by 118
Hello all,
 
I have an SSRS which supports multi records. Currently it is showing last selected data in single pdf file. When I debugged, it is looping all the records, but showing the last one only. I want all records in multiple files, because the file that is generating, is being named after the record.
 
PS., It is printing one SSRS report, and then fetching the attachments from the record and printing them also within this SSRS only.
 
So what I need is, 1st it prints one record and it's attachments, then 2nd record and it's attachments, and so on.
 
How can I achieve this? where should I put my for loop in main, prePromtModifyContract or any other method? 
 
Thanks,
Bhagyashree Dave
 
  • Verified answer
    Bhagyashree Dave Profile Picture
    Bhagyashree Dave 118 on at
    SSRS multi records
    Hi Martin,
     
    thanks for the reply.
    I actually figured out the issue and it's working now.
     
    Regards,
    Bhagyashree Dave
  • Martin Dráb Profile Picture
    Martin Dráb 230,848 Most Valuable Professional on at
    SSRS multi records
    I'm sorry, but it's impossible to say what is the right place for your code without knowing what your code does.
     
    prePromtModifyContract() is a good place for modifying a contract before showing users the dialog where they can change parameters. For example, you initialize some default values of parameters and allows users to change them, if they wish.
     
    But it's not the place where the actual data gets prepared. It doesn't happen in the controller class at all. If the report uses a report data provider (RDP) class, that's the place where the contract (= input parameters) is used to actually fetch data. Note that this may happen much later, even months after preparing the parameters, because the report may be printed on schedule.
     
    Also, you mentioned that you loop through all records, but that doesn't necessarily mean that you process them correctly. For example, you may be overwriting the same value, so you end up with the values from the last record only.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Congratulations to the January Top 10 leaders!

Check out the January community rock stars...

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,979 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,848 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans