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)

Problem while passing multiple selected values to SSRS report parameter

(0) ShareShare
ReportReport
Posted on by
Hi All
I'm using Microsoft Dynamicx AX 2012.
I got a code  from http://yasirnedian.blogspot.com/2012/07/how-to-select-multiple-selected-values.html Posted 25th July 2012 by  (Thanks to him)
showReport.png
1- I had assigned the selected values from my custom StringEdit control to a string variable named 'emplDepartment'
2- I have my custom SSRS report which had parameter named 'parmDepartment' and filter to report DataSet named 'Department'
3- The property MultiValue of  'parmDepartment' parameter is set to 'True'
4- The filter 'Department' Value had assigned to 'parmDepartment' parameter value and the Operator is set to 'In'
5- Herewith the line code: controller.parmReportContract().parmRdlContract().setValue("parmDepartment",emplDepartment);
6- When I run line code: controller.runReport(); the system hang on class SrsReportRunUtil\ConvertAnyType2Str at the line: multiValueList = axValue;
Any quick support on this will be highly appreciated.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    István Orosz Profile Picture
    2,137 on at

    Hi,

    As I can understand, you did not modified the report contract class and the UI interface, just built a custom form and tried to pass multiple parameters to the controller? Do you pass your string variable 'emplDepartment' directly to SrsReportRunUtil.ConvertAnyType2Str(), because if multi-value, then it expects value as a List not as string.

    Maybe you can check this article and modify your contract (and UIBuilder classes if needed): AX 2012 R3 SSRS reports to multi select in parameter

    Kind regards,

    István

  • kvnkk Profile Picture
    800 on at

    Hi ,

    I think instead of above link can use below links :-

    dynamicsaxinsight.wordpress.com/.../ax-2012-multi-select-lookup-for-ssrs-report-dialog

    www.dynamics101.com/using-ui-builder-class-to-develop-ssrs-reports-microsoft-dynamics-ax-2012

    dynamicsaxinsight.wordpress.com/.../ax-2012-multi-select-lookup-for-ssrs-report-dialog

    May in your case issue with conversion SrsReportRunUtil\ConvertAnyType2Str system unable convert data in to specif type.. like init,str,ral,int64 etc.. and ConvertAnyType2Str  will be having different switch and in your case none of the case was matched..

  • Community Member Profile Picture
    on at

    Thanks István Orosz for reply and sorry to late I was doing more trials ..

    for your Question the answer is yes I pass my string variable 'emplDepartment' directly to SrsReportRunUtil.ConvertAnyType2Str() .. now how can i convert it to be read as List?

  • kvnkk Profile Picture
    800 on at

    Just read elements from list using ListIterator and combined the string values with comma operator and pass as single string (“s1,s2s,S3”) This will works for you..

  • Community Member Profile Picture
    on at

    Thanks kvnkk, but would you please declare more ..

  • Verified answer
    István Orosz Profile Picture
    2,137 on at

    Hi,

    You can use Global::strSplit(str _stringToSplit, str _delimiters) to split string into a list.

    Kind regards,

    István

  • Community Member Profile Picture
    on at

    Yes, it's working now ..

    Most thanks to István Orosz

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