Page 1 of 1

How to hide certain columns of Data source?

Posted: Tue Dec 10, 2013 6:03 pm
by theregister
If my Data source has 10 fields, 5 of which are calculated columns, and the other 5 are the ones used to calculate the calculated columns, I want to only show the calculated ones on the Data source on the dictionary. I want the other 5 to remain hidden if possible, not gone, but hidden, is this possible?

Re: How to hide certain columns of Data source?

Posted: Wed Dec 11, 2013 12:26 pm
by Alex K.
Hello,

You can use the following code:

Code: Select all

report.Dictionary.Restrictions.Add("ColumnName", StiDataType.DataColumn, StiRestrictionTypes.DenyShow)
Thank you.

Re: How to hide certain columns of Data source?

Posted: Thu Dec 12, 2013 10:52 pm
by theregister
It is not necessary to specify the data source? What if 2 different data sources have the same name column, and only one of them needs to be hidden?

Re: How to hide certain columns of Data source?

Posted: Fri Dec 13, 2013 7:12 am
by Alex K.
Hello,

You can use the following code, as example:
report.Dictionary.Restrictions.Add("Categories.CategoryID", StiDataType.DataColumn, StiRestrictionTypes.DenyShow);

Thank you.

Re: How to hide certain columns of Data source?

Posted: Thu Dec 26, 2013 6:08 pm
by theregister
What is this supposed to do? I can still see the column after I've applied this DenyShow restriction on the report, it's still on the dictionary and on the report if I select it.

Re: How to hide certain columns of Data source?

Posted: Fri Dec 27, 2013 7:04 am
by Alex K.
Hello,

Please send us a sample project with test data which reproduce the issue for analysis.

Thank you.

Re: How to hide certain columns of Data source?

Posted: Fri Dec 27, 2013 7:13 am
by HighAley
Hello.

This code works right. We have checked it once again. Maybe you do something wrong.
Could you send us more information about this issue?

Thank you.