trouble removing data sources
Posted: Wed May 04, 2011 2:44 pm
Hi I have a report with 2 data sources, and creating a new blank report, I need to delete existing data sources
for this command to call the method sig. when I select new report
void StiDesigner_CreatedReport(object sender, EventArgs e)
{
StiDataSourcesCollection sCollect = new StiDataSourcesCollection(new StiDictionary());
foreach (StiDataSource source in report.Dictionary.DataSources)
{
if (!source.Name.Contains("reporte"))
sCollect.Add(source);
}
report.Dictionary.DataSources = sCollect;
}
but I only open a blank layout but the sources did not delete them
I hope I can explain how pls
for this command to call the method sig. when I select new report
void StiDesigner_CreatedReport(object sender, EventArgs e)
{
StiDataSourcesCollection sCollect = new StiDataSourcesCollection(new StiDictionary());
foreach (StiDataSource source in report.Dictionary.DataSources)
{
if (!source.Name.Contains("reporte"))
sCollect.Add(source);
}
report.Dictionary.DataSources = sCollect;
}
but I only open a blank layout but the sources did not delete them
I hope I can explain how pls