Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

SSRS report paramater is not working in AX 2012 R3

(0) ShareShare
ReportReport
Posted on by 6

Hi Team,

I have added check box in SSRS report as parameter.

3187.P1.jpg

For this , I have wrote code in Contract class and DP class to get the value.

Contract class - 

2063.P2.jpg

DP - ProcessReport method

6332.P3.jpg

4130.P5.jpg

Requirement - 

FormTextType - HandOverReport >> Txt =  ABCDE

FormTextType - Invent >> Txt =  123BCCDDE

If the checkBox in report parameter is YES, then it should print the Txt in report ABCDE else 123BCCDDE

Issue is -

If the check box is YES , It always print Txt 123BCCDDE , for Yes , it should print ABCDE always

When i debugged that issue - with check box YES , It goes to correctly in if condition and print ABCDE

P6.jpg

BUT when i run the report without debugging with parameter YES then it goes to  always else condition . It should go If condition NOT else

I have restart AOS, SSRS report services, Usage data clear and FULL Incremental CIL but still getting same issue.

Kindly let me know how will resolve this issue

  • @rp@n Profile Picture
    6 on at
    RE: SSRS report paramater is not working in AX 2012 R3

    thank you Girish , let me try.

    Is there any issue with particular design in VS for Txt field ? as i posted before the expression

  • GirishS Profile Picture
    27,823 Moderator on at
    RE: SSRS report paramater is not working in AX 2012 R3

    Yeah, If there is issue with code means it should reflect in debugger. I don't have any other idea on this.

    One more work around will be converting enum to int value.

    lrc2TermsAndConditions = enum2int(contract.parmTermsAndConditions2());

    if(lrc2TermsAndConditions  == 0)

    {

      //

    }

    else

    {

         //

    }

    Also try restarting the server.

    Thanks,

    Girish S.

  • @rp@n Profile Picture
    6 on at
    RE: SSRS report paramater is not working in AX 2012 R3

    yes during debugging it is taking correct value based on if condition. but surprised when i ran the report normally i mean without debugging it is not return proper output based on condition.

    I really surprised , why this happened. If suppose something wrong in my code, it should impact in debugging also right?

  • GirishS Profile Picture
    27,823 Moderator on at
    RE: SSRS report paramater is not working in AX 2012 R3

    Have you debugged the code with enum value set to "Old terms" on the parameter screen and see which condition is executing(If or else) in the processReport method.

    Thanks,

    Girish S.

  • @rp@n Profile Picture
    6 on at
    RE: SSRS report paramater is not working in AX 2012 R3

    No Girish, I tried with both check box and enum , for both having same result.

    business preferred with the enum only. So, i tried with that

    I really don't know why this happened. try my best from my end to resolve. Please guide me

    please give me more shed on this

  • GirishS Profile Picture
    27,823 Moderator on at
    RE: SSRS report paramater is not working in AX 2012 R3

    Hi @rp@n ,

    On the report parameter its showing custom enum.

    But in code you have checked the parameter value with "Noyes" enum.

    Can i know the reason?

    Thanks,

    Girish S.

  • @rp@n Profile Picture
    6 on at
    RE: SSRS report paramater is not working in AX 2012 R3

    Girish, sorry for delay response. I tried with the same.

    2553.a1.png

    3806.a2.jpg

    for both selection, headerTmp.Txt is returned "New Terms and conditions" only.

    is this the reason because the  base enum is >> New term is the 1st element ?

    6076.a3.jpg

    Please give me more shed on this

  • @rp@n Profile Picture
    6 on at
    RE: SSRS report paramater is not working in AX 2012 R3

    sure, Let me try and will update you

  • GirishS Profile Picture
    27,823 Moderator on at
    RE: SSRS report paramater is not working in AX 2012 R3

    This issue is weird. So try this below scenario.

    Assign the parameter value to header text on both if and else statement and see what is printing on the report without debugging.

    headerTmp.txt = enum2str(lrcTermsAndConditions2);

    Thanks,

    Girish S.

  • @rp@n Profile Picture
    6 on at
    RE: SSRS report paramater is not working in AX 2012 R3

    yes, we have

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,280 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,038 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans