Crete report with code vb.net

Stimulsoft Reports.WEB discussion
Post Reply
jserret
Posts: 23
Joined: Mon May 09, 2016 10:51 am

Crete report with code vb.net

Post by jserret »

Hello,


I need to create the structure attached to this post with code in vb.net

Is possible?


Could you send me an example of how to add new DataSources containing sql using code?

Thanks.
Attachments
PruebaStimulsoft.png
PruebaStimulsoft.png (11.28 KiB) Viewed 2499 times
Lech Kulikowski
Posts: 6263
Joined: Tue Mar 20, 2018 5:34 am

Re: Crete report with code vb.net

Post by Lech Kulikowski »

Hello,

You can find sample code in the following topic:
viewtopic.php?f=13&t=4873&p=152401

Thank you.
jserret
Posts: 23
Joined: Mon May 09, 2016 10:51 am

Re: Crete report with code vb.net

Post by jserret »

Hello,

Thank you very much, but I have another problem.

I have made the thread code but Data does not appear, I believe that the Datasource and Database are incorrectly connected, I attach capture where it seems that it is not well linked.
Attachments
PruebaStimulsoft2.png
PruebaStimulsoft2.png (84.14 KiB) Viewed 2459 times
Lech Kulikowski
Posts: 6263
Joined: Tue Mar 20, 2018 5:34 am

Re: Crete report with code vb.net

Post by Lech Kulikowski »

Hello,

Please send us a sample project which reproduces the issue for analysis.

Thank you.
jserret
Posts: 23
Joined: Mon May 09, 2016 10:51 am

Re: Crete report with code vb.net

Post by jserret »

Lech Kulikowski wrote: Tue Feb 12, 2019 9:41 am Hello,

Please send us a sample project which reproduces the issue for analysis.

Thank you.
I use this code.

report.Dictionary.Databases.Clear()

Dim newConnectionString As String = "DEMO"

report.Dictionary.Databases.Add(New Stimulsoft.Report.Dictionary.StiOracleDatabase("directOracle", "directOracle", newConnectionString))
Dim sql As String = "select * from hola"

Dim DS1 As StiSqlSource = New StiSqlSource("directOracle", "ETACIV", "ETACIV", sql, True, False)

DS1.Columns.Add("ETCNOM", "ETCNOM", System.Type.GetType("System.String"))

report.Dictionary.DataSources.Add(DS1)


This is the resulting MRT. I have changed the sql and the Data Source connector for confidentiality
Attachments
ReportDemoCode.mrt
(23 KiB) Downloaded 142 times
Lech Kulikowski
Posts: 6263
Joined: Tue Mar 20, 2018 5:34 am

Re: Crete report with code vb.net

Post by Lech Kulikowski »

Hello,

Your data source is StiSqlSource but should be StiOracleSource. Please check your code.

Thank you.
Post Reply