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)

Conditional grouping in SSRS report based on the enum parameter value

(0) ShareShare
ReportReport
Posted on by 1,215

Hi,

I have to create a report with details of transactions against an ItemID. The report dialog should accept an enum which has values viz. Detail, Consolidated and Last transaction only

Now, the report data design is the same and I have handled "Last transaction only" in the code.

However, in case of "Detail" option, the details for each item should be printed on a separate page whereas the other two options should print the data in continuation (without page break).


I could group the report to create a new page for each new item, but how can I restrict it from doing so when the user selects other than "Detail"

Regards,

Abhinay Tharwal

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    you can group data based on condition e.g

    IIf(MyParameter= 'SomeValue', FIelds!GroupFields1.Value, Nothing)

    see here grouping options

  • Hariharans87 Profile Picture
    3 on at

    Yes. You can use group by expression and build expression based on the parameter selected.

    It is very easy if your report group having aggregation functions like sum, count.

    You may need to work on report section based on the selected parameter. I don't know about your report design.

    If you feel it is difficult to change your design and need to use expression in some fields based on the selected parameter, please use different report design based on the selected parameter and you can change the design from controller class.

  • Abhinay Tharwal Profile Picture
    1,215 on at

    Thank you. That should work. Will post the outcome soon.

  • Abhinay Tharwal Profile Picture
    1,215 on at

    It worked!

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