Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Answered

Problem while passing multiple selected values to SSRS report parameter

Posted on by Microsoft Employee
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.
Categories:
  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Problem while passing multiple selected values to SSRS report parameter

    Yes, it's working now ..

    Most thanks to István Orosz

  • Verified answer
    István Orosz Profile Picture
    István Orosz 2,137 on at
    RE: Problem while passing multiple selected values to SSRS report parameter

    Hi,

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

    Kind regards,

    István

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Problem while passing multiple selected values to SSRS report parameter

    Thanks kvnkk, but would you please declare more ..

  • kvnkk Profile Picture
    kvnkk 790 on at
    RE: Problem while passing multiple selected values to SSRS report parameter

    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
    Community Member Microsoft Employee on at
    RE: Problem while passing multiple selected values to SSRS report parameter

    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
    kvnkk 790 on at
    RE: Problem while passing multiple selected values to SSRS report parameter

    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..

  • Suggested answer
    István Orosz Profile Picture
    István Orosz 2,137 on at
    RE: Problem while passing multiple selected values to SSRS report parameter

    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

Helpful resources

Quick Links

Can you answer this forum question?

You could make someone's day!

Community Newsletter - May 2024

Kudos to our community stars!

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 283,663 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 224,741 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,146

Featured topics

Product updates

Dynamics 365 release plans