set datasource
set datasource
hello, I use your suggesstion "use several data table and set to the a data set then regdata(dataset) in the code", but I have a problem that don't show me the report with some table when I use a table, this suggesstion is useful, but for 2 or up this is not useful.would u help me?
set datasource
Hello,
Please try to use the following code:
Thank you.
This issue occurs due to because deleted and then created relations have new names.the problem is not running in the designer but running in the csharp application
I append the code
Please try to use the following code:
Code: Select all
report.Dictionary.Databases.Clear();
//report.Dictionary.DataSources.Clear();
report.RegData("Doku", ds);
//report.Dictionary.Synchronize();
report.Show();
Thank you.
Re: set datasource
I use ypur suggestion but don't show any thing in report, my code is here and i attached my report, can you say me, where is my problem,
thanks for your attention.
Code: Select all
DataSet ds = new DataSet();
ds.Tables.Add(dtreport);
ds.Tables.Add(dtItm);
ds.Tables.Add(dtItmType);
report.Dictionary.Clear();
report.DataSources.Clear();
report.RegData("PoolItem", ds);
report.Compile();
if (dtGridItm.Rows.Count != 0)
{
report.Show();
}
- Attachments
-
- poolDeliveriItm.mrt
- (27.32 KiB) Downloaded 328 times
Re: set datasource
Hello.
Please, check if TableName property of adding Table correspond ones in the report.
Try to call report.Design() and check it in the Designer.
Thank you.
Please, check if TableName property of adding Table correspond ones in the report.
Try to call report.Design() and check it in the Designer.
Thank you.
-
- Posts: 74
- Joined: Fri Dec 07, 2012 11:35 am
Re: set datasource
Yes I also hav issue here, I have multiple datasource on mrt template, and Parameters like;
report1.CompiledReport.DataSources["DS1"].Parameters["@ID"].ParameterValue = id;
report.RegData("DS2", dataset1);
and I have one datasource that needed to connected with c# I want to assign datatable object to Stimulsoft DS.
will it possible...
report1.CompiledReport.DataSources["DS1"].Parameters["@ID"].ParameterValue = id;
report.RegData("DS2", dataset1);
and I have one datasource that needed to connected with c# I want to assign datatable object to Stimulsoft DS.
will it possible...
Re: set datasource
Hello,
Please try to set the parameters value before compile report and after RegData method.
Thank you.
Please try to set the parameters value before compile report and after RegData method.
Thank you.
Re: set datasource
Hello.
Please, read next article in our Knowledge base. http://stimulsoft.helpserve.com/index.p ... ticleid=69
Thank you.
Please, read next article in our Knowledge base. http://stimulsoft.helpserve.com/index.p ... ticleid=69
Thank you.
-
- Posts: 74
- Joined: Fri Dec 07, 2012 11:35 am
Re: set datasource
Can I add c# dataset or datatable in place of querry, here...
StiSqlSource DS1 = new StiSqlSource("Connection", "DS1", "DS1", "SELECT * FROM DS1", true, false);
report.Dictionary.DataSources.Add(DS1);
it is fine but I want to add my datatable (with values) to datasource, its run but no data found on report.
StiSqlSource DS1 = new StiSqlSource("Connection", "DS1", "DS1", "SELECT * FROM DS1", true, false);
report.Dictionary.DataSources.Add(DS1);
it is fine but I want to add my datatable (with values) to datasource, its run but no data found on report.
Re: set datasource
Hello,
You can use the following code:
New connection string:
Code:
report.Dictionary.Databases.Clear();
report.Dictionary.Databases.Add(new Stimulsoft.Report.Dictionary.StiSqlDatabase("Connection", newConnectionString));
Add DataSources:
Code:
StiSqlSource DS1 = new StiSqlSource("Connection", "DS1", "DS1", "SELECT * FROM DS1", true, false);
report.Dictionary.DataSources.Add(DS1);
Add Columns:
Code:
foreach (DataColumn col in dataTableDS1.Columns)
{
DS1.Columns.Add(col.ColumnName, col.DataType);
}
You can use the following code:
New connection string:
Code:
report.Dictionary.Databases.Clear();
report.Dictionary.Databases.Add(new Stimulsoft.Report.Dictionary.StiSqlDatabase("Connection", newConnectionString));
Add DataSources:
Code:
StiSqlSource DS1 = new StiSqlSource("Connection", "DS1", "DS1", "SELECT * FROM DS1", true, false);
report.Dictionary.DataSources.Add(DS1);
Add Columns:
Code:
foreach (DataColumn col in dataTableDS1.Columns)
{
DS1.Columns.Add(col.ColumnName, col.DataType);
}
-
- Posts: 74
- Joined: Fri Dec 07, 2012 11:35 am
Re: set datasource
Thankyou its good.