web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Modifying ranges in a report data provider query when an SSRS report is called from code

(0) ShareShare
ReportReport
Posted on by 2,734

Hi,

I have a custom SSRS report (not developed by myself) that I wish to run via code.

The report has been developed with a data contract and a data provider class.

The report is via menu item and users can enter data into two parameters from the data contract.  There is also a query attached to the data provider class.

I want to be able to access the range in this provider class via code and change some of the data by sending some parameters across.

I don't want to have to create actual parameters in the data contract, I simply want to make the code changes to the data provider class and call the data provider class to be manipulated via the use of SRSReportRunController class.

Can someone please advise on how this can be achieved? 

Thank you

*This post is locked for comments

I have the same question (0)
  • Vilmos Kintera Profile Picture
    46,149 on at

    Can you please explain the idea behind your requirements in a bit more detail that why do you want to implement query manipulation in such a specific way?

  • Kauto Profile Picture
    2,734 on at

    Hi Vilmos,

    I don't want to add additional parameters and change the existing report set up as I don't want to confuse users that are used to using the query selection that is available currently.

    I have tried adding in an additional parameter to the data contract but even though it appears set up correctly I can't seem to be able to receive it in the data provider class.  Is there no way to intercept or call the data provider class and send it values for processing?

  • Kauto Profile Picture
    2,734 on at

    I want to be able to launch the report from a button on a form which will pass in an itemId from the form to the report.  I then want to add this itemId to a range in the query being run by the report which is in the data provider

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    Have a look at this discussion:

    community.dynamics.com/.../235467

  • Kauto Profile Picture
    2,734 on at

    Thanks Crispin I had just remembered I needed to redeploy the report to get the new parameters to work - the report doesn't have a custom controller class so I am not able to modify the preRunModifiyContract method

  • Verified answer
    Kauto Profile Picture
    2,734 on at

    We have to develop a custom controller class for the report as this didn't exist.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 16

#2
GiacomoRovai Profile Picture

GiacomoRovai 4

#3
Douglas Noel Profile Picture

Douglas Noel 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans