Compiler-warning in C#-code of .cs-report

Stimulsoft Reports.NET discussion
Post Reply
Dave Canto
Posts: 18
Joined: Mon Jan 22, 2007 11:51 am
Location: Belgium

Compiler-warning in C#-code of .cs-report

Post by Dave Canto »

After saving my report "ProductFileCD" as a cs-file (instead of the mrt-format) and using it in my VS2005 Project, I get the following warning from the compiler:

CDReports\ProductFileCD.cs(9200,35): warning CS0108: 'Reports.rptProductFileCD.tblReportValues0DataSource.Name' hides inherited member 'Stimulsoft.Report.Dictionary.StiDataSource.Name'. Use the new keyword if hiding was intended.

What can I do to avoid this warning?
Dave Canto
Posts: 18
Joined: Mon Jan 22, 2007 11:51 am
Location: Belgium

Compiler-warning in C#-code of .cs-report

Post by Dave Canto »

Dave wrote:After saving my report "ProductFileCD" as a cs-file (instead of the mrt-format) and using it in my VS2005 Project, I get the following warning from the compiler:

CDReports\ProductFileCD.cs(9200,35): warning CS0108: 'Reports.rptProductFileCD.tblReportValues0DataSource.Name' hides inherited member 'Stimulsoft.Report.Dictionary.StiDataSource.Name'. Use the new keyword if hiding was intended.

What can I do to avoid this warning?
Today I did a fresh rebuild of my entire VS2005 Project and now this warning has gone. Seems that the problem fixed itself?!
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Compiler-warning in C#-code of .cs-report

Post by Vital »

This problem occurs because we create inherited from StiDataSource class for each datasource in report dictionary. If your datasource have column with name "Name" then for this column (for each column) in inherited class creates property with name "Name". But datasource alredy have property name. And compiler generate this warnings.

I latest build we add some code to avoid this problem. If you use latest build this code help.

Thank you.
Post Reply