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");
}