Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Ally72
Starting Member
5 Posts |
Posted - 2011-07-06 : 11:00:05
|
HiI'm new to Report Builder and we're using version 2.0. Have set up some reports with tables and it's set up to have a page break after each table. But when there's no data returned (which will be quite frequently), it continues onto the next table and doesn't put in a page break until there is data.I have also looked at trying to hide the table if there's no data, but haven't managed to work that one out.Is anyone able to help please?Thank you.Ally |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-07-06 : 13:53:41
|
you can hide table by setting expression for hidden property likeIIF (CountRows("Yourtablename")=0,"True","false")------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
Ally72
Starting Member
5 Posts |
Posted - 2011-07-19 : 05:26:44
|
Thank you for your reply. I'll try that. (Sorry for the delay - didn't realise I had any replies and only checked today). |
|
|
Ally72
Starting Member
5 Posts |
Posted - 2011-07-20 : 06:40:58
|
I've just tried this a couple of times - I've put it in the: Tablix Properties > Visibility > Show or hide based on an expression > put the expression in via the button: =iif(CountRows("tabNoArrivalDate2")=0,"True","False"But I get a "failed to preview report" error:"The Visibility.Hidden expression for the tablix ‘tabNoArrivalDate2’ contains an error: [BC30198] ')' expected."Do you have any ideas please?Thanks - Ally |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-07-20 : 07:20:37
|
it should be=iif(CountRows("tabNoArrivalDate2")=0,True,False)------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
Ally72
Starting Member
5 Posts |
Posted - 2011-08-03 : 04:22:55
|
Thank you. I was hoping I would get emails when I get a reply but it's not doing that hence the delay.In the meantime, I've sorted the problem by using a rectangle around each table forcing a page break after that which appears to be working, but I will try the code again.Thanks for coming back.Ally |
|
|
|
|
|