Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

SSRS fetchxml allow null values only when All selected

(0) ShareShare
ReportReport
Posted on by 7,316

Hi,

I have a report with fetchxml query like this:

       <filter type="or">
  <condition attribute="new_typeofcase" operator="in"  value="@CaseType" />
      <condition attribute="new_typeofcase" operator="null" />
                          </filter>

This is the only way I can think of to get null values as well when 'All' is selected in the filter. Please let me know if there is another approach.

But using this approach, when a particular value is selected from the filter, it retrieves the desired rows along with null value rows. So, to avoid this, I am thinking in the Tablix properties, I should probably write some expression to detect whether All is selected, so that only then bring null value rows otherwise don't! How do I achieve this?

Not sure if this is possible... but please let me know if I am thinking it right or if there is a better approach.

Thanks for any help!

  • meenoo Profile Picture
    meenoo 7,316 on at
    RE: SSRS fetchxml allow null values only when All selected

    Any help is appreciated.

    I tried adding an expression to Tablix filter:

    =IIF(Parameters!CaseType.Count>1,Fields!typeofcase.Value,Parameters!CaseType.Value)

    This is working fine for false part. I am not sure how to handle 'True' part.

    When only one value selected from casetype filter, I get accurate results(no nulls).

    But when I select 'All' from the filter, I am getting inaccurate results. I am sure I have the 'True' part all wrong in my expression.

    All I need is to figure out how to specify in the expression that, when 'all' is selected, bring everything including null value records.

    Anybody please provide some guidance. Thanks.

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

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,969 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,842 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans