
is this possible
-
- Posts: 21
- Joined: Tue Aug 28, 2012 12:28 pm
is this possible

- Attachments
-
- UCAF.mrt
- report
- (1.15 MiB) Downloaded 216 times
Re: is this possible
Hello,
You can use the following code.
New connection string:
Add DataSources:
Add Columns:
Thank you.
You can use the following code.
New connection string:
Code: Select all
report.Dictionary.Databases.Clear();
report.Dictionary.Databases.Add(new Stimulsoft.Report.Dictionary.StiSqlDatabase("Connection", newConnectionString));
Code: Select all
StiSqlSource DS1 = new StiSqlSource("Connection", "DS1", "DS1", "SELECT * FROM DS1", true, false);
report.Dictionary.DataSources.Add(DS1);
Code: Select all
foreach (DataColumn col in dataTableDS1.Columns)
{
DS1.Columns.Add(col.ColumnName, col.DataType);
}
-
- Posts: 21
- Joined: Tue Aug 28, 2012 12:28 pm
Re: is this possible
Can i Add a Sql Dataset in StiSqlSource or can i execute a stored procedure and pass parameters instead of using a select command ??
-
- Posts: 21
- Joined: Tue Aug 28, 2012 12:28 pm
Re: is this possible
this all is done but how can i bind data with it via a dataset when report has to be viewed
-
- Posts: 21
- Joined: Tue Aug 28, 2012 12:28 pm
Re: is this possible
remember that in my report the fields are done as "{sp_CustomForms_UCAF.AccountName}" so the name of the datasource should be -sp_CustomForms_UCAF and i am till now doing the following it is opening the report in reportviewer without loading loading any data please help
sp_CustomForms is the dataset which contains the feilds and data
Dim Con As String = "Data Source=.;Initial Catalog=Standard_Hospital; Asynchronous Processing=true ;User ID=sa"
Rep.Dictionary.Databases.Clear()
Rep.Dictionary.Databases.Add(New Stimulsoft.Report.Dictionary.StiSqlDatabase("Connection", Con))
Dim sp_CustomForms_UCAF = New StiSqlSource("Connection", "sp_CustomForms_UCAF", "sp_CustomForms_UCAF", "execute sp_CustomForms_UCAF", True, False)
Rep.Dictionary.DataSources.Add(sp_CustomForms_UCAF)
For Each col In sp_CustomForms.Columns
sp_CustomForms_UCAF.Columns.Add(col.ColumnName, col.DataType)
Next
Rep.RegData("Connection", ds)
Rep.Compile()
Me.StiWebViewer1.Report = Rep
sp_CustomForms is the dataset which contains the feilds and data
Dim Con As String = "Data Source=.;Initial Catalog=Standard_Hospital; Asynchronous Processing=true ;User ID=sa"
Rep.Dictionary.Databases.Clear()
Rep.Dictionary.Databases.Add(New Stimulsoft.Report.Dictionary.StiSqlDatabase("Connection", Con))
Dim sp_CustomForms_UCAF = New StiSqlSource("Connection", "sp_CustomForms_UCAF", "sp_CustomForms_UCAF", "execute sp_CustomForms_UCAF", True, False)
Rep.Dictionary.DataSources.Add(sp_CustomForms_UCAF)
For Each col In sp_CustomForms.Columns
sp_CustomForms_UCAF.Columns.Add(col.ColumnName, col.DataType)
Next
Rep.RegData("Connection", ds)
Rep.Compile()
Me.StiWebViewer1.Report = Rep
Re: is this possible
Hello,
Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?
Thank you.
Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?
Thank you.