Fill UserSource in Report Designer Code

Stimulsoft Reports.NET discussion
Post Reply
xss
Posts: 64
Joined: Wed Jun 10, 2009 3:03 am
Location: Austria

Fill UserSource in Report Designer Code

Post 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.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Fill UserSource in Report Designer Code

Post 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.
xss
Posts: 64
Joined: Wed Jun 10, 2009 3:03 am
Location: Austria

Fill UserSource in Report Designer Code

Post by xss »

Thank you,

and how do I add rows to a StiDataSource object?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Fill UserSource in Report Designer Code

Post 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.
xss
Posts: 64
Joined: Wed Jun 10, 2009 3:03 am
Location: Austria

Fill UserSource in Report Designer Code

Post by xss »

Sent an example which should explain in more detail what I would like to do.

Thank you.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Fill UserSource in Report Designer Code

Post by Alex K. »

Hello,

Ok. Thank you.
Post Reply