Adding Data to an .dll

Stimulsoft Reports.NET discussion
Post Reply
MSeibert
Posts: 1
Joined: Wed Jul 24, 2013 6:40 pm

Adding Data to an .dll

Post by MSeibert »

Hello,

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()
So far the report Shows no Data at all.
What am i missing to add the data from the DataTable to my Databand/Text Components?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Adding Data to an .dll

Post by Alex K. »

Hello,

Please try to load the report template.
Please see the following video:
http://www.stimulsoft.com/en/videos?tags=quickstart

Thank you.
Post Reply