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 :
Finance | Project Operations, Human Resources, ...
Unanswered

SSRS report paramater is not working in AX 2012 R3

(0) ShareShare
ReportReport
Posted on by 30

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

I have the same question (0)
  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    If I understand it correctly, you're saying that your code works correctly when debugging, therefore there is nothing wrong in it.

    There is no "FULL Incremental CIL". You either use the incremental build, or the full build. But before that, make sure that X++ is fully compiled - CIL generation depends on it. The safest way is compiling the whole application and then generating full CIL.

    Do you run the report in exactly the same way (interactive or batch, company etc.) with and without debugging?

    How do you test what the code if you don't debug it? Don't you have a problem in this procedure?

  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Just bu the way (it's not related to your problem), I would avoid the code duplication in your if/else blocks. In fact, I would elimate them completely:

    FormTextType textType = lrcTermsAndCondition2 ? FormTextType::xxxHandoverReport : FormTextType::Invent;
    headerTmp.Txt = FormLetterRemarks::find(CompanyInfo::languageId(), textType).Txt;

  • @rp@n Profile Picture
    30 on at

    Hi Martin, thanks for response quickly.

    Yes, with debugging it is working fine. I forgot to tell , I have also done Increamental CIL. And I run the report without batch simply with check box yes or no

    Please advise me.

  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    I think that you screenshot shows the AX debugger, not Visual Studio. Am I right? If so, then your code must run as X++, not CIL, and we can ignore CIL generation for a moment. But compile the application (X++) to be sure that everything is updated.

    Now please anwer the question how you test your code when you don't debug it. For example, if you look at what's get printed, your problem may be caused by a bug in the report, instead of a problem with the data provider.

  • GirishS Profile Picture
    27,827 Moderator on at

    Hi @rp@n,

    What is the expression you given for header text in report design?

    Also if the report temp table has table type set to "Temp Db"?

    Thanks,

    Girish S.

  • @rp@n Profile Picture
    30 on at

    hI Girish,

    Txt expression - 

    P9.jpg

    Yes table has TempDB.

    Please give me more shed on this.

  • GirishS Profile Picture
    27,827 Moderator on at

    So in the expression you have given First(field value). First of function will return the value on the 1st record of the table.

    Does the report data has multiple lines?

    If the report data has multiple lines then for all the lines value should be same(Which is 1st record in the temp table).

    Thanks,

    Girish S.

  • @rp@n Profile Picture
    30 on at

    hI Girish,

    See the Txt will print once in header. yes the report has multiples lines

  • GirishS Profile Picture
    27,827 Moderator on at

    So do you have separate temp table for header and line?

    Thanks,

    Girish S.

  • @rp@n Profile Picture
    30 on at

    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

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 503 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 434 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans