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.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Report Builder (2.0) - Page Break issue

Author  Topic 

Ally72
Starting Member

5 Posts

Posted - 2011-07-06 : 11:00:05
Hi

I'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 like

IIF (CountRows("Yourtablename")=0,"True","false")

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

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).
Go to Top of Page

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
Go to Top of Page

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 MVP
http://visakhm.blogspot.com/

Go to Top of Page

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
Go to Top of Page
   

- Advertisement -