Conditionally disabling text components in Table of Contents

Stimulsoft Reports.NET discussion
Post Reply
Greg_B
Posts: 3
Joined: Fri Oct 03, 2014 11:47 pm

Conditionally disabling text components in Table of Contents

Post 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 1403 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?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Conditionally disabling text components in Table of Cont

Post 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
Greg_B
Posts: 3
Joined: Fri Oct 03, 2014 11:47 pm

Re: Conditionally disabling text components in Table of Cont

Post by Greg_B »

This solution works excellently. Thanks for your prompt support!
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Conditionally disabling text components in Table of Cont

Post by HighAley »

Hello.

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

Thank you.
Post Reply