One other weird behavior I've noticed is that this error message does not appear if there exists a tablix on the page with the same dataset (q_products) for some reason, but I don't want a tablix in the middle of a page just to hide a rectangle.
SSRS - Unable to Hide Rectangle with CountRows Expression
Greetings!
I'm trying to hide a rectangle based off on how many rows exist in a dataset but it's indicating that the Hidden Expression has an error. I know it's complaining about security permissions, but I'm pretty sure that is a false flag since the exact same expression works without a problem inside of a text box. The expression I'm trying to use is: "=IIF(CountRows("Q_PRODUCTS")>5, False, True)", has anyone else had the same error message?
3 answers
Sort by: Most helpful
-
-
ZoeHui-MSFT 37,746 Reputation points
2020-09-03T03:27:30.903+00:00 Hi
I did some local test with the expression you mentioned, however I couldn't reproduce your issue.
I assumed it is related with the value of the dataset.
I searched online and the issue occurs when they are using ASP.NET.
Someone also said that when the value is NULL,the error occurs.
You may try like this:
=IIF(isnothing("Q_PRODUCTS") or CountRows("Q_PRODUCTS")>5, False, True)
For reference:https://stackoverflow.com/questions/1097485/ssrs-08-system-security-permissions-securitypermission-error
Hope this helps!
If you have any question, please feel free to let me know.
If your problem has been solved, please mark "accepted answer" on my reply, thank you for your understanding.
Regards,
Zoe
-
Farhan Ahmed 1 Reputation point
2020-09-07T10:11:06.817+00:00 Its a weird error but you can try to run SSRS Report builder as "Run As Administrator" and see if this error exists.