web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Expression to hide the row in the SSRS report when value is null

(0) ShareShare
ReportReport
Posted on by 320

Hi to All,

             I want to hide the entire row of a table when the value is null .Is there any expression to hide the row, so there will be no white space is visible on the report.Please help

*This post is locked for comments

I have the same question (0)
  • sharabh singh Profile Picture
    320 on at
    RE: Expression to hide the row in the SSRS report when value is null

    thank you DAN for the suggestion

    Firstly I check whether the value is coming on the report or not ,When I get the values .....then this is the expression which I write to hide the table

    =iif(First(Fields!InvoiceType.Value, "SalesInvoiceDS") = "Yes",true,false)

  • Verified answer
    Dan Emreus Profile Picture
    1,162 on at
    RE: Expression to hide the row in the SSRS report when value is null

    Have you tried to just print out your new values in the report so you see that it contains the information needed for your expresssion? Sometimes it does not contain the values that you think depending on data type.

    If your new fields has the values you want I do not see why you cannot hide a whole table.

    /Dan

  • sharabh singh Profile Picture
    320 on at
    RE: Expression to hide the row in the SSRS report when value is null

    thanks for the suggestion

    but I want to make changes in the question instead of row I want to hide whole table and in  table it contains field like gross weight ,qty etc ...........I have tried to add field in the temp table and then make expression for the table visibility ............and tried 3rd point too but it didn't work and invoice type is enum type field...........Please tell me if you got any solution.

  • Denis Macchinetti Profile Picture
    16,444 on at
    RE: Expression to hide the row in the SSRS report when value is null

    Hi Sharabh

    I'm agree with Dan.

    However, the best option is avoid to insert the records in the temp table that should not be printed.

  • Suggested answer
    Dan Emreus Profile Picture
    1,162 on at
    RE: Expression to hide the row in the SSRS report when value is null

    Hi, 

    I see several possible options for this:

    • You can add new field, e.g. RowVisibility, to your table that is populated in the report and then set field based on invoicetype. Then use that value to control row visibility in the report like you did above. I think it is always nice to also create parameters to control visibility.
    • You can do like Nitesh Ranjan says above. Do not insert records if they do not match certain criterias = better performance.
    • Create a new Query with table NumberSequenceGroup with a range on InvoiceType. Then add a new dataset to your report that is based on that query. Use the dataset-value to control row visibility.
    • In previous versions of Ax I created method in C# that called AX-logic and I guess that it is still possible but it is most likely a performance issue.

    /Dan

  • sharabh singh Profile Picture
    320 on at
    RE: Expression to hide the row in the SSRS report when value is null

    Hi denis I need your help,

                   I have another question to ask regarding to hide the lines as the situation is different from the last time,Now the situation is that visibility of line is depend upon the field which is not being used in the report  as we have used that field only for condition For e.g If (NumberSequenceGroup::find(numberSeqGroup).InvoiceType == InvoiceType::ABC ) this condition is true then row should be visible .........Is there any expression for this or any other solution for this problem.

  • sharabh singh Profile Picture
    320 on at
    RE: Expression to hide the row in the SSRS report when value is null

    thanks Nitesh for the help ..yes I am using RDP class... but I want to hide too many rows thats why I want to use  expression

  • Verified answer
    sharabh singh Profile Picture
    320 on at
    RE: Expression to hide the row in the SSRS report when value is null

    thanks for the help Denis but I have gone through that link  before posting the question and I have use that expression but it didn't work instead of that I have use this .... =Fields!Notes.Value = "" ,now it works

  • Community Member Profile Picture
    on at
    RE: Expression to hide the row in the SSRS report when value is null

    I suggest if you are creating report using RDP class then when you are populating data in a temporary table then you can have validation and don't allow inserting records having null value.

    Please verify and let me know if this helps

  • Denis Macchinetti Profile Picture
    16,444 on at
    RE: Expression to hide the row in the SSRS report when value is null

    Hi Sharabh

    If you handle the records within a Tablix, you can use the "Row Visibility" option and show or hide the row according to a expression.

    Have a look at msdn.microsoft.com/.../ms157328.aspx

    Search for "Visibility"

    Additionally, you could handle the visibility with a Datasource query condition.

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#1
Guy Terry Profile Picture

Guy Terry 2 Moderator

#1
Rahul Shah Profile Picture

Rahul Shah 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans