Page 1 of 1

Reporting against SQL Server

Posted: Wed Jul 06, 2011 10:09 am
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

Reporting against SQL Server

Posted: Thu Jul 07, 2011 2:59 am
by Alex K.
Hello Saurabh,

Please check the sample project in attachment.

Thank you.

Reporting against SQL Server

Posted: Thu Jul 07, 2011 3:59 am
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:

Reporting against SQL Server

Posted: Thu Jul 07, 2011 8:05 am
by Andrew
Hello,

Excellent.

Have a nice day!

Reporting against SQL Server

Posted: Fri Jan 06, 2012 12:50 pm
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?

Reporting against SQL Server

Posted: Mon Jan 09, 2012 6:49 am
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.

Reporting against SQL Server

Posted: Fri Jan 13, 2012 3:27 pm
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...

Reporting against SQL Server

Posted: Mon Jan 16, 2012 7:10 am
by Alex K.
Hello,

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

Thank you.