Izenda, LLC

Ad Hoc Reports & Dashboards for ASP.NET Apps

Free Trial

Izenda Reports is licensed on a "per user" or "per server" basis. Please complete this form to receive a price quote.

All fields are required.

The live demo demonstrates Izenda reports with the Northwind Sample database. To login, please register below.

All fields are required.

Please register to try Izenda reports on your data today.

All fields are required.

How do I check to see if it is safe to add a hidden filter?

Expand / Collapse
 

How do I check to see if it is safe to add a hidden filter?


If you have a lot of views, best practice would be to check to see if any of your data sources in any reports contain a field with a certain name like "CustomerID". The code sample below is an example of how to accomplish this.


public bool FindColumn(ReportSet reportSet, String columnName)
        {
            foreach (JoinedTable jt in reportSet.JoinedTables)
            {
                if (AdHocContext.Driver.DatabaseSchema.FindColumn(jt.TableName   ".["   columnName   "]") != null)
                    return true;
            }
            return false;
        }
       
        // Customize a report on the fly prior to execution on a per user basis
        public override void PreExecuteReportSet(Izenda.AdHoc.ReportSet reportSet)
        {
            bool found = FindColumn(reportSet, "ProductName");
        }



Details
Type: FAQ
Options