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)

ssrs report - parameters

(0) ShareShare
ReportReport
Posted on by

Hello,

1. In ssrs report - how can I send parameter to report which is main datatset is query (not sending range - just a parameter)?

2. How can I use in the above parameter in business logic (method) sending the same parameter to business logic function?

3. How can I use ax container object in business logic function?

Need sample code, please.

Thanks :)

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mohammad Raziq Ali Profile Picture
    2,486 on at

    Hi Eitan Mizrahi,

    For Passing parameters to Rdp class, please follow the link of my blog and let me know if you have any concerns 

    mfmujahidmim.wordpress.com/.../simple-rdp-class-with-contract-class-in-ax-2012

    you can use ax container object as you use different data types in ax 2012.

    Container has different methods such as follows

    conIns() is used for insert values into container object

    conPeek() will retreive the values from the container which is at specific address

    conLen() will show the container length.

    you can store different datatypes values in containers

    eg., container cr2 = [1, "blue", true];

    or you can convert your container object into string, List, Array using con2Str(), con2List(), con2ArraySource().

    If you want to know about container in detail, follow this link 

    msdn.microsoft.com/.../aa874816.aspx

  • syed baber Profile Picture
    11,633 on at

    Regarding your question 1: You can add report parameters in Visual Studio only and not part of any ranges in the query. These parameters will appear on report dialog when you run the report.

    Why you want to refer report parameters in business logic methods? Can you please further elaborate what you are trying to achieve, may be there is an easy way to achieve that?

  • Community Member Profile Picture
    on at

    No - It's another attitude.
    What I ment is passing parameters from ax to ssrs whenever the datasource in ssrs report is query - not data provider.

    Also - I need using that parameter. That mean I use methods in ssrs (used by business logic datasource) and I need to get those parameters.

    For ax container - I need the function in business logic (that's C#using business connector. Not x++).

    Thanks :)

  • Community Member Profile Picture
    on at

    Baber.

    Thank you.

    I need passing queries, since queries are playing major role in some project (I created some parsers for excel, json - for mobile, based on same classes and queries). Data providers need temporary table and I don't need that overhead.

    Also, I need running function in ax used by some methods (by business connector).

    For farther progress, I need knowing that solution because not I may use another reporting tool, such as Crystal report. Complicated enough, so need practice some basics.

    I succeed running report from EP, and using function from ax. The current case is not EP, but using some simmiliar attitudes.

    Thanks.

  • Community Member Profile Picture
    on at

    OK. Found.

    Just adding a a parameter to datamethod automatically adding global parameter in report.

    I can declare a value to that parameter, and bounded it to another datasource, but I run into a problem: when connecting to recid, which type I shall declare for parameter. It is System.Int64, but the available types are very limited (I have only 5 options : string, long, float, etc), so compiler giving me error of wrong types (System.Int64 ...).

    Still, I don't know how passing a container.

    Thanks :)

  • Suggested answer
    Community Member Profile Picture
    on at

    OK - everything is solved.

    I got confuse, because I had the error:

    Error while setting server report parameters. Error message: The DefaultValue expression for the report parameter ‘AX_CompanyName’ contains an error: Request for the permission of type 'System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. (rsRuntimeErrorInExpression)

    Due the above error, I could not continue.

    But the above was solved as: blogs.msdn.com/.../microsoft-dynamics-ax-2012-reporting-extensions-error-system-security-permissions-environmentpermission-while-running-report.aspx

    For container, solution on: stackoverflow.com/.../how-to-convert-from-ax-data-container-to-c-sharp-collection

    For any business-logic, everything worked fine. The linked as I have mentioned is OK.

    Thanks, anyway :)

  • Ivan Bahatka Profile Picture
    15 on at

    Newer link cloudblogs.microsoft.com/.../

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
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans