One Report, Different Datasources (Local: Dataset, Remote: SqlServer)
Posted: Sat Jul 21, 2007 5:11 am
Hello all,
I am using StimulReport 2007.1 for .NET 1.1 and have to solve
following situation.
1. I have do design a Report - the underlaying datasource is
a dataset with an inline-scheme and inline-information about
relations as shown in your samples.
ds = new DataSet( "DataSetName" );
r = new StiReport();
r.Load( reportFile );
r.DataSources.Clear();
r.DataStore.Clear();
ds.ReadXml( , XmlReadMode.ReadSchema );
r.RegData( "AnyName", ds );
r.Design( );
This works very well. I am able to design the report and because
of the data within the dataset I can do a preview too!
No problem so far... But now the problems came up...
2. I have to connect the Report to Remote Datasources.
Sample:
server=;database=;trusted_connection=yes
The Server (of course), and the DatabaseName can change. It is guaranteed
that the Tables/Relations are the same - with other data of course - but
the scheme is the same.
How can I solve this?
r = new StiReport();
r.Load( reportFile );
r.DataSources.Clear();
r.Dictionary.Clear();
r.Dictionary.Databases.Add(new StiSqlDatabase("AnyName", ));
I am getting the following Errormessage:
error CS0246: The type or namespace name 'Mis_Kunde'
could not be found (are you missing a using directive or an assembly reference?)
'Mis_Kunde' is a table in the datasource which is available and readable.
Can you point me in the right direction or are the better ways to solve such an issue.
Thank you in advance for your help, Günther
I am using StimulReport 2007.1 for .NET 1.1 and have to solve
following situation.
1. I have do design a Report - the underlaying datasource is
a dataset with an inline-scheme and inline-information about
relations as shown in your samples.
ds = new DataSet( "DataSetName" );
r = new StiReport();
r.Load( reportFile );
r.DataSources.Clear();
r.DataStore.Clear();
ds.ReadXml( , XmlReadMode.ReadSchema );
r.RegData( "AnyName", ds );
r.Design( );
This works very well. I am able to design the report and because
of the data within the dataset I can do a preview too!
No problem so far... But now the problems came up...
2. I have to connect the Report to Remote Datasources.
Sample:
server=;database=;trusted_connection=yes
The Server (of course), and the DatabaseName can change. It is guaranteed
that the Tables/Relations are the same - with other data of course - but
the scheme is the same.
How can I solve this?
r = new StiReport();
r.Load( reportFile );
r.DataSources.Clear();
r.Dictionary.Clear();
r.Dictionary.Databases.Add(new StiSqlDatabase("AnyName", ));
I am getting the following Errormessage:
error CS0246: The type or namespace name 'Mis_Kunde'
could not be found (are you missing a using directive or an assembly reference?)
'Mis_Kunde' is a table in the datasource which is available and readable.
Can you point me in the right direction or are the better ways to solve such an issue.
Thank you in advance for your help, Günther