Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Hiding Query Parameters in AX 2012 SSRS Report Dialog

(0) ShareShare
ReportReport
Posted on by

Hi,

I want to hide the dynamic query parameters in a AX 2012 SSRS report dialog.

The report datasource is a query, which has a  few predefined ranges. But in the report dialog, I just want to see the printer select box and not the query range fields with their predefined values. I set the status of the query ranges to hide, but ist had no effect on the dialog.

Is it possible to hide all the parameters at once for the report dialog?

Thx, Markus     

*This post is locked for comments

  • venkatesh vadlamani Profile Picture
    3,180 on at
    RE: Hiding Query Parameters in AX 2012 SSRS Report Dialog

    Hi ,

    There is a reason why controller is needed in query based reports to update the dialog query.

    Just take an example where you have a set of users who can view list of vendors and not their open transactions, and few other users who can view both.

    Its impossible to secure the report in such a scenario with your approach.

    Controller gives you flexibility to transfer the information from form to report without undermining the object based security.

    I understand your need for simplicity and ease of getting things done , but there is a reason why patterns are followed in report development. I agree that your approach will work but when security is a concern it cannot be used.

    I was only confused why do you need a menu item button since you are not pointing to any menu item in its properties. Directly overriding the click event implementation can be achieved in normal button.

  • Joanna Demetriou Profile Picture
    355 on at
    RE: Hiding Query Parameters in AX 2012 SSRS Report Dialog

    Hi venkatesh

    Here's example:

    I create a custom query-based SSRS report to display the vendor info.

    I add it as a menu item button on the Vendor form.

    Obviously, when the button in clicked I want to pass the Vendor's Account Num as a range on my report as it should display the info for the specific vendor I have selected.

    I do that as shown below:

    void clicked()

    {

       SRSReportRun    srsReportRun = new SRSReportRun(ssrsReportStr(myVendorInfo_SRS, PrecisionDesign1));

       ;

       //init report run

       if(srsReportRun.init())

       {

    //reset the query so that any previously set ranges are gone
    srsReportRun.resetQueries();

    //set value for parameter "Printing Date" to today
    srsReportRun.reportParameter(identifierStr(PrintingDate)).value(systemDateGet());

    //set range on vendor Account num
    SysQuery::findOrCreateRange(srsReportRun.reportQuery("").datasourceTable(tableNum(VendTable)), fieldNum(VendTable, AccountNum)).value(VendTable.AccountNum);

    //run report
    srsReportRun.run();

       }

    else

    warning("Report could not be executed. Please contact your system administrator");

    }

  • venkatesh vadlamani Profile Picture
    3,180 on at
    RE: Hiding Query Parameters in AX 2012 SSRS Report Dialog

    Need to understand that i am not validating any requirement.

    Question was for query based report where dialog query needs to be hidden from the user.

    The thing you mentioned about writing the logic in menu item button , could you share if you have any example as such,

  • Joanna Demetriou Profile Picture
    355 on at
    RE: Hiding Query Parameters in AX 2012 SSRS Report Dialog

    That's the whole purpose of a query based report! That you don't need to create any classes, temporary tables or any other objects..

    We are trying to minimize the work required for a simple report.

    In the click method of the menu item button we just add a range to the report's query. As simple as that. I don't see where your surprise comes from.

    The suggested approach to hide the query from the user simply makes the report non-usable. How often is it that you need to run a report that doesn't apply any filtering what so ever?

  • Joanna Demetriou Profile Picture
    355 on at
    RE: Hiding Query Parameters in AX 2012 SSRS Report Dialog

    That's the whole purpose of a query based report! That you don't need to create any classes, temporary tables or any other objects.

    We are trying to minimize the work required for a simple report.

    In the click method of the menu item button we just add a range to the report's query. As simple as that. I don't see where your surprise comes from.

    The suggested approach to hide the query from the user simply makes the report non-usable. How often is it that you need to run a report that doesn't apply any filtering what so ever?

  • venkatesh vadlamani Profile Picture
    3,180 on at
    RE: Hiding Query Parameters in AX 2012 SSRS Report Dialog

    How do you plan to use the query from x++ code when you have a query based report and you are reluctant to write a controller?

    Making query invisible to user is already explained, create a controller and override the showQueryValues method in the initial reply, please browse the initial replies.

    For other queries please use a different thread

  • Joanna Demetriou Profile Picture
    355 on at
    RE: Hiding Query Parameters in AX 2012 SSRS Report Dialog

    It seems that setting the "Dynamic Filters" option to False is not really the solution..

    Doing so the query object cannot be accessed at all in X++ code.

    The opposite doesn't seem to work either: If we set the "Dynamic Filters" option to True and try to make the query/query run non-interactive on the AX side doesn't seem to have any effect when running the report.

    What we need a solution that:

    - Makes the query options invisible to the user (Select button and query values)

    - The query can be updated in X++ code (e.g. set a range)

    I believe this is a typical scenario and there must be a sufficient way to achieve.. (e.g. print a report for a Vendor. The Vendor's account num must be set as a range)

    Expecting your feedback.

    Thanks

    Joanna

  • Suggested answer
    nagaraj Profile Picture
    2,340 on at
    RE: Hiding Query Parameters in AX 2012 SSRS Report Dialog

    you can set Datset properties > Dynamic filters = false in visual studio.

  • nagaraj Profile Picture
    2,340 on at
    RE: Hiding Query Parameters in AX 2012 SSRS Report Dialog

    Thank you Venkatesh, it is working fine.

  • venkatesh vadlamani Profile Picture
    3,180 on at
    RE: Hiding Query Parameters in AX 2012 SSRS Report Dialog

    Allow dynamic filtering false and remove the dynamic parameter. redeploy the report and refresh the user cache.

    This should do

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics AX (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 100 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 48

#3
shanawaz davood basha Profile Picture

shanawaz davood basha 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans