Page 1 of 1

filter query after rendered report

Posted: Tue Jul 07, 2009 8:20 pm
by Geroge
in c# web or winforms,I need to filter conditions(all fields in a listbox) after rendered report,any ideas?
for example :
string str_filter="";
ArrayList col_list = new ArrayList();
StiReport report = new StiReport();
report.Load("c:\\test_list.mrt");
report.RegData(ds);
report.Render();
for (int i = 0; i < report.DataSources.Count; i++) //get all columns
{
for (int j = 0; j < report.DataSources.Columns.Count; j++)
{
col_list.Add(report.DataSources.Columns[j].Name);
}
}
col_list.Insert(0, "");
combox_col.DataSource = col_list;
str_filter=combox_col.items[0].toString()+"='abc'";

1.how to pass the str_filter to report???

2.in report design , it have a conditions dialog that can add conditons by user ,How to open the dialog using c# code?

thanks:feelgood: