i just started to use the Stimulsoft Software and need a little bit of help.
I wanna make a template of a Report with the Designer, and fill this Template through a DataTable (or something similar that allows me to collect Data from a Sql Database)
I´ve created a "Report.mrt" and saved it as .dll
The Report contains just a DataBand and 2 Text Elements so far. They have a datasource named "DataSource1"
Now im trying to fill this Elements with Data from a Datatable.
My Code looks like this so far:
Code: Select all
Dim table As New DataTable
table.Columns.Add()
table.Columns.Add()
Dim Row1 As DataRow = table.NewRow
Dim Row2 As DataRow = table.NewRow
Dim Row3 As DataRow = table.NewRow
Row1.ItemArray = New String() {"1", "One"}
Row2.ItemArray = New String() {"2", "Two"}
Row3.ItemArray = New String() {"3", "Three"}
table.Rows.Add(Row1)
table.Rows.Add(Row2)
table.Rows.Add(Row3)
Dim report As StiReport = StiReport.GetReportFromAssembly("C:\ReportTest\Report.dll")
report.ScriptLanguage = StiReportLanguageType.VB
report.RegData("Datasource1", table)
report.Dictionary.Synchronize()
report.Dictionary.DataSources.Item(0).Name = "Datasource1"
report.Dictionary.DataSources.Item(0).Alias = "Datasource1"
report.Render()
report.Show()
What am i missing to add the data from the DataTable to my Databand/Text Components?