Reporting against SQL Server

Stimulsoft Reports.Silverlight discussion
Locked
saurabhd
Posts: 4
Joined: Fri Dec 10, 2010 7:03 am
Location: london

Reporting against SQL Server

Post by saurabhd »

Hi all,
I am currently evaluating the Silverlight Report Designer and Silverlight Report Viewer. I have a few questions -

1)How do I design a report that will use SQL Server as a data source?
2)Will the SQL query reside within the report file (.mrt) or do I need to externally query and supply the dataset to the report?

If you have a sample uses AdventureWorks or something similar that would be great.

thanks,
Saurabh
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Reporting against SQL Server

Post by Alex K. »

Hello Saurabh,

Please check the sample project in attachment.

Thank you.
Attachments
1131.WebDesignerSL.zip
(17.45 KiB) Downloaded 532 times
saurabhd
Posts: 4
Joined: Fri Dec 10, 2010 7:03 am
Location: london

Reporting against SQL Server

Post by saurabhd »

Brilliant. I could get it work. I like the way how the UI brings up a list of available tables to report against.:biggrin: :biggrin:
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Reporting against SQL Server

Post by Andrew »

Hello,

Excellent.

Have a nice day!
gustavo
Posts: 16
Joined: Fri Jan 06, 2012 11:23 am

Reporting against SQL Server

Post by gustavo »

Can you share some silverlight sample doing this from server-side?

Dim db As New Stimulsoft.Report.Dictionary.StiSqlDatabase("NovaConexao", "NovaConexao")
db.ConnectionString = "Data Source=MyServer;Initial Catalog=MyDataBaseName;Persist Security Info=True;User ID=sa;Password=pass"
oReport.Dictionary.Databases.Add(db)

Dim dataSource As New Stimulsoft.Report.Dictionary.StiSqlSource("DataBase", "Orders", "DataBaseAlias", "SELECT * FROM dbo.Orders")
dataSource.Columns.Add("ID", "Order Id", GetType(Int32))
oReport.Dictionary.DataSources.Add(dataSource)

but no success!
why?

Is there any silverlight sample doing this in runtime?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Reporting against SQL Server

Post by HighAley »

Hello.

We checked your code in the Client/Server Silverlight version. It works.
Due to the Silverlight restrictions this code won't work in the Native Silverlight.

Thank you.
gustavo
Posts: 16
Joined: Fri Jan 06, 2012 11:23 am

Reporting against SQL Server

Post by gustavo »

I founded why...
Just insert this code before InitializeComponent()

Code: Select all

Stimulsoft.Report.StiOptions.Silverlight.WCFService.UseWCFService = True
and then it appears at the Dictionary sources...
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Reporting against SQL Server

Post by Alex K. »

Hello,

Ok.
Let us know if you need any additional help.

Thank you.
Locked