The type 'Reports.MyReport' already contains a definition for 'tabl1Datasource'

Stimulsoft Reports.WEB discussion
Post Reply
jay@bplogix.com
Posts: 251
Joined: Fri Feb 04, 2011 11:46 am
Location: San Diego, CA

The type 'Reports.MyReport' already contains a definition for 'tabl1Datasource'

Post by jay@bplogix.com »

I am adding 2 different databases with StiSqlDatabase to a report (in C#). When I run it I get the message
"The type 'Reports.MyReport' already contains a definition for 'tabl1Datasource'" if the 2 completely different databases contain tables that use the same name (that were added with StiSqlSource).

Is it possible for 2 different data sources to different connections to use the same name / alias?
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

The type 'Reports.MyReport' already contains a definition for 'tabl1Datasource'

Post by Andrew »

Hello,
Is it possible for 2 different data sources to different connections to use the same name / alias?
No. Each data source is compiled into a separate class within a report class. There cannot be two classes with identical names in one name space. So, during compilation of a such report, an error occur.

The same aliases do not interfere with the compilation, but create an ambiguity in the report rendering, as the text boxes are not tied to a specific data source, and search them by name/alias.

Thank you.
Post Reply