This is a migrated thread and some comments may be shown as answers.

How to change WCF / Report Library Sql Connection strings programatically based on client side information

1 Answer 27 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Deva
Top achievements
Rank 1
Deva asked on 21 Dec 2010, 07:33 PM
I have checked the forums, in particular -
http://www.telerik.com/community/forums/reporting/telerik-reporting/set-report-parameter-connection-string.aspx

http://www.telerik.com/community/forums/reporting/telerik-reporting/changre-report-connectionstring-at-runtime.aspx

The second link seems to be what I want,  In our ui, the user picks what db they want to run the report against, from a dropdown, we can turn that value into a connection string, my issue is that I first started going down the route of adding a parameter to the report, but I cannot cast the silverlight reportviewer.report to my class in the report class library because the library is not silverlight compliant, so then I tried to access the report.datasource - but could not as the report property of the silverlight viewer is a string - please advise as how you would recomend me sending a sql connection string from my front end silverlight ui to the report hosted in a wcf service...

Thanks in advance,

-Deva

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 22 Dec 2010, 06:45 PM
Hello Deva,

The reference to the class library holding your reports should be added as reference to your web application hosting the Silverlight project and not directly to the Silverlight project - please refer to the Visual Studio examples provided with the Telerik Reporting installation.
As you have found the hard way, currently there is no report object exposed on the Silverlight client, meaning that the reports reside on the server and the only way to pass data to it from the Silverlight client is to use the report parameters - more info is available in the Programmatic Initialization of Report Parameter Values in Telerik Reporting Silverlight Viewer.

Kind regards,
Steve
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
Tags
General Discussions
Asked by
Deva
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or