Problem Creating Report in Code

Stimulsoft Reports.NET discussion
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Problem Creating Report in Code

Post by Vital »

You can use following code:

Code: Select all

foreach (StiDataSource dataSource in report.Dictionary.Datasources)
foreach (StiDataColumn dataColumn in report.Dictionary.Columns)
{
......
}
For also you can get build from 13 June (when it will be available). This build automatically check all column name on equaling to keywords.

Thank you.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Problem Creating Report in Code

Post by Edward »

Sorry for my previous automatically error.

The code above in my previous post should be the following:

Code: Select all

(Categories.Columns["CategoryID"] as StiDataColumn).Name = "MyDate";
// Since the name of 'CategoryID' column is changed we should refer to it as 'MyDate' instead of 'CategoryID'
(Categories.Columns["MyDate"] as StiDataColumn).NameInSource = "Date";
Please let us know if we should clear up something in that direction.

Thank you.
spv123
Posts: 26
Joined: Mon Oct 02, 2006 8:07 am
Location: Sheffield, UK

Problem Creating Report in Code

Post by spv123 »

Thanks, that works fine :grinder:
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

Problem Creating Report in Code

Post by Edward »

Thank you for working above the issue.

Together we've fixed it.

Also we recommend you to download the latest prerelease version from June 13. We've made additional improvements in that field.

Thank you.
Post Reply