Page 1 of 1

Fill UserSource in Report Designer Code

Posted: Wed Oct 06, 2010 6:15 am
by xss
Hi,

is there a way to fill a UserSource (or maybe something else) in the report code? We will need this, because we got a lot of reports with the same data structure, but in some cases, we will need another tables with additional data to group by - a table with date ranges for example. So we will be able to decide in the report whether to group the data by day/weekday/month/... anything.

Thanks in advance.

Fill UserSource in Report Designer Code

Posted: Thu Oct 07, 2010 7:03 am
by Alex K.
Hello,

You can try use in the report code next expressions:

Code: Select all

this.Dictionary.Clear();
this.Dictionary.DataSources.Add();
etc.

Thank you.

Fill UserSource in Report Designer Code

Posted: Thu Oct 07, 2010 7:48 am
by xss
Thank you,

and how do I add rows to a StiDataSource object?

Fill UserSource in Report Designer Code

Posted: Thu Oct 07, 2010 8:12 am
by Alex K.
Hello,
and how do I add rows to a StiDataSource object?

Code: Select all

this.Dictionary.DataSources["DataSourceName"].Columns.Add(new StiDataColumn("NewColumn", "NewColumn", "NewColumn", typeof(int)));
Can you send a report sample with data and explain the problem in more detail, so that we can give some advice on this question.

Thank you.

Fill UserSource in Report Designer Code

Posted: Fri Oct 08, 2010 12:47 am
by xss
Sent an example which should explain in more detail what I would like to do.

Thank you.

Fill UserSource in Report Designer Code

Posted: Fri Oct 08, 2010 2:54 am
by Alex K.
Hello,

Ok. Thank you.