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 CRM (Archived)

SSRS hide textbox based on tablix

(0) ShareShare
ReportReport
Posted on by

Hi all

I thought this would be easy but i can't seem to get it to work. I'm trying to hide a text box based if a table has a 0 count. This is what i thought would work but it doesn't

= Iif (CountRows("Tablix20") > 0, false, true)

Regards

Dan

*This post is locked for comments

I have the same question (0)
  • Thomas David Dayman Profile Picture
    11,323 on at

    Have you put the expression into:

    • Properties of TextBox>Visibility>Hidden
  • ashlega Profile Picture
    34,477 on at

    Hi,

     I'm not sure, but you may have to pass a dataset there.. not a tablix.. tablix may have some rows either way (headers etc)

  • Community Member Profile Picture
    on at

    Hi

    Thank you for your replies. I thought that might be the case. But I've had a think the tablix has a filter to get data based on if the dataset has a certain value in a field so I will just use similar logic to hide the textbox

    Regards

    Dan

  • Thomas David Dayman Profile Picture
    11,323 on at

    This thread could help: [View:http://stackoverflow.com/questions/6279704/how-do-i-set-the-visibility-of-a-text-box-in-ssrs-using-an-expression:750:50]

    Have your tried formatting your expression like this: =Iif ((CountRows("Tablix20") > 0), false, true)

  • Community Member Profile Picture
    on at

    Based on Dataset might be a better approach.

  • Suggested answer
    Community Member Profile Picture
    on at

    Use the CountRows function. For example

    =IIf((CountRows("MyDataset") > 0),False,True)

  • Community Member Profile Picture
    on at

    Hi all

    Thank you for your replies. I have been looking at this and can't seem to get it to work at all. in the tablix with the rowcount and even creating a new dataset that returns nothing it will not hide the text box below is what i'm using for the text box and will use the same on the tablix once working

    =iif((countrows("EPHide")>1),false,true)

    Any ideas why this won't work i'm using VS2012 for the reports

    Regards

    Dan

  • Community Member Profile Picture
    on at

    I guess we need to see your design, wonder if you putting the expression to the correct box...

  • Community Member Profile Picture
    on at

    Hi.

    On the textbox properties I click on visibility and then expression. I think this is the correct place

    Regards

    Dan

  • Community Member Profile Picture
    on at

    Did you try put TRUE and see what happens?

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 CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans