Error CS0103 - The name does not exist in the current context
Posted: Wed Jan 13, 2010 6:46 am
Hello!
After updating to version 2009.2.500.0 I recompiled my C# Project in VS 2008. Then I have started
the Report Designer and I got this error messages:
I'm connecting the DataSource via Code like this:
If I look into the Source-code of the Report-file a saw that the Designer renamed the "to" member variable to "to_".
But if I change this variable name to "to" the designer renames it back to "to_". Very strange. Whats wrong with this report?
After updating to version 2009.2.500.0 I recompiled my C# Project in VS 2008. Then I have started
the Report Designer and I got this error messages:
Code: Select all
c:\Users\User\AppData\Local\Temp\ld58oj0u.0.cs(256,40) : error CS0103: The name 'to' does not exist in the current context
....
Code: Select all
DataTable ll = DB.Query("SELECT....");
ll.TableName = "ll";
DataTable to = DB.Query("SELECT....");
to.TableName = "to";
Stimulsoft.Report.StiReport report = new Stimulsoft.Report.StiReport();
string reportfile = @".\report\Loadinglist.mrt";
report.Load(reportfile);
report.Dictionary.Databases.Clear();
report.Dictionary.DataSources.Clear();
report.Dictionary.Relations.Clear();
DataSet ds = new DataSet("ds");
ds.Tables.Add(ll);
ds.Tables.Add(to);
report.RegData("ds",ds);
report.Dictionary.Synchronize();
report.Design();
//eport.Render();
//report.Show();
But if I change this variable name to "to" the designer renames it back to "to_". Very strange. Whats wrong with this report?
Code: Select all
public llDataSource ll;
public to_DataSource to_; // <--- this should be "to"
Code: Select all
private void InitializeComponent()
{
this.to_ = new to_DataSource(); // <-- this should be "to"
this.ll = new llDataSource();
....