Page 1 of 1

Conditionally disabling text components in Table of Contents

Posted: Sat Oct 04, 2014 12:44 am
by Greg_B
Hi, I am building a dynamically sized Table of Contents that could have up to 20 lines of "Contents". I am using the GetAnchorPageNumber(sender.TagValue) method to get the page number of each of the lines of "Contents". To make it dynamically sized I want to disable (hide) the text component for "Page" if the GetAnchorPageNumber(sender.TagValue) values returned are null.

It seems that GetAnchorPageNumber(sender.TagValue) always returns "0" instead of "null" if the AddAnchor tag was not set anywhere in the report.

Below is an image of my Table of Contents.
TOC_problem.jpg
TOC_problem.jpg (29.59 KiB) Viewed 1402 times

I want to hide all the "0" values, but I am unsuccessful using Enable/Disable conditions or text formatting conditions to hide these "0" values. Is this possible?

Re: Conditionally disabling text components in Table of Cont

Posted: Mon Oct 06, 2014 5:57 am
by HighAley
Hello.

Please, try to set the Hide Zeros property to True.
If this does not help we need to see your report template with sample data.

Thank you

Re: Conditionally disabling text components in Table of Cont

Posted: Mon Oct 06, 2014 4:01 pm
by Greg_B
This solution works excellently. Thanks for your prompt support!

Re: Conditionally disabling text components in Table of Cont

Posted: Tue Oct 07, 2014 5:40 am
by HighAley
Hello.

We are always glad to help you.
Let us know if you need any additional help.

Thank you.