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 :
Microsoft Dynamics AX (Archived)

A question about binding query ranges to static parameters in an SSRS report.

(0) ShareShare
ReportReport
Posted on by 2,007

Hello all.

I tried finding a solution for this online, but the documentation on this is sketchy. 

Here's my scenario: I have an SSRS report that gets its data from a query. I have been asked to modify the report in such a way that a certain section of it needs to be hidden if our customer wants an emailed version of the report from Print Management that is not relevant to them. I figured out by adding a new range to the query, I could use that range value to determine if it needs to hide the tablix or not. However, the report as designed uses a dynamic range and in order to access the parameter more efficiently, I changed the parameters from dynamic to static. Now when I run the report, it times out. I added three text boxes to pass the parameter values into and they all came up blank. So I am pretty certain the reason the report is bombing is because it is now running wide open and the base table has too much data.

Am I right in thinking that in order to bind the ranges to the static parameters I need to override the data contract for the report to use something custom instead of the base data contract class? If this is the case, can anyone think of an easier way to tell the report to hide the tablix if we are running the report in a certain context? We want to run this report with and without print management, so we actually have two controller classes that call the report (One that extends SRSReportRunController and another that extends SRSPrintMgmtController) so if there was a way I could figure out what controller is calling it, maybe I could hide the tablix that way as well.

Any suggestions greatly appreciated.

Brandt

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    You want a new option in the report to decide if the tablix needs to be hide or no?

    If that is the case, you can add a new parameter in the contract class or in the controller modified, and in the DP pass this value, then add the condition in the tablix.

  • Brandt Fundak Profile Picture
    2,007 on at

    Tatiana,

    Thanks for the response, but this report does not use a DP, and I am not going to create one as that would force us to redesign the report. (If it used a DP, I likely would have done something like you suggested.)

    Since my original post, I have been able to narrow down this issue to the fact that I changed the parameters from static to dynamic. Once I reset it to dynamic, the report works as expected.

    I believe that my supposition that I need to override the contract here is the correct one. I think there are examples of overriding the data contract for a report that uses a query for its data source in AX...just got to find it.

    Thanks again for the response.

    Brandt

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans