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

Silverlight ReportViewer Questions

8 Answers 566 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 13 Nov 2009, 04:23 AM
Hi,

I'm reviewing the Silverlight ReportViewer to see if it will be a good fit for my project.  Looking through the documentation and using .Net Reflector to look at the object model more closely I don't see a way to make calls to the report service via HTTPS, at least I don't see an obvious way.  Is there a sample application which demonstrates how to do this?  

Also I'd like to be able to pass parameters to the report but I don't want the parameters to be displayed to or entered by the end user.  Is there a way to do this?  If so, a sample application demonstrating how to do so would be most appreciated.

Thanks!

Michael


8 Answers, 1 is accepted

Sort by
0
Svetoslav
Telerik team
answered on 18 Nov 2009, 01:53 PM
Hi Michael,

Thank you for your interest in our tool
 
Please check the latest Telerik Reporting internal build that fixes the HTTPS shortcoming and brings some improvements in the Silverlight viewer's model. Although you can now access the parameters on the client side (ref. ReportViewerModel.Parameters property) there is no easy way to understand (from outside of the ReportViewerModel) when the parameter definitions are retrieved from the server (that is when the asynchronous service operations are completed) or when their values will be send back to the server. This is what we are currently working on.

Anyway we would appreciate if you can share with us your particular scenario and explain in more detail your goals and how would you like to pass values for the report parameters besides using the built-in UI. Your feedback will help us with this feature quite a bit.
 

Sincerely yours,
Svetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Iurie Coroban
Top achievements
Rank 1
answered on 01 Dec 2009, 08:59 AM
Hi, Svetoslav!
    Could you,please, provide an example,that shows how exactly to pass parameters to the report from Silvrlight application.
0
Gerardo
Top achievements
Rank 1
answered on 01 Dec 2009, 08:31 PM
Hi Everybody,

I need help for send parameter in the silverlight Reportviewer, I can show the report with parameters but I need send parameters values by programing.

I see thah exist a <telerik:ReportParametersControl but how is function? somebody can showme an example? or somebody knows another way to do.
0
Chris Gillies
Top achievements
Rank 1
answered on 02 Dec 2009, 01:10 PM
As far as I understand from Svetoslav's reply here and in this other thread (http://www.telerik.com/community/forums/reporting/telerik-reporting/passing-parameters-to-reportservice-from-silverlight-viewer.aspx), it is currently not possible to pass parameters from the Silverlight application to the viewer and Telerik are working on that for upcoming release.

Cheers
0
Mike Lyncheski
Top achievements
Rank 1
answered on 04 Dec 2009, 10:14 PM
I also have a critical need to pass parameters from the Silverlight client application to the report server and then have these passed into my report control for retrieving data.  This seems like a very basic need and, if this is truly not available, a huge shortcoming.

Thanks for listening.

Mike
0
Moises Casusol
Top achievements
Rank 1
answered on 04 Dec 2009, 11:25 PM
Hi,

   I have the same scenario, i need to pass parameters to the reportviewer but like it says it is not possible by the moment. Now its that possible if i use the htmlplaceholder and the WEB ReportViewer?, i mean, To pass some parameters from a silverlight application to the htmlplcaholder so the Web ReportViewer can use them to make the report.


Best Regards,
Moises
0
Peter Staev
Top achievements
Rank 1
answered on 06 Dec 2009, 10:16 PM
Actually it is possible to pass parameters from the code to the reportviewer. Here is how to make it work.
In my scenario i'm hosting the SL reportviewer in a RadWindow. In the window i have a flag named m_bOverwriteReportParameters that is used to know whether the parameters need to be changed or not. Then in the constructor of RadWinow I add the following handler:
AddHandler CType(SLReportViewer.DataContext, ReportViewerModel).PropertyChanged, AddressOf ReportViewerModelPropertyChanged 
 

The real change happens in the ReportViewerModelPropertyChanged handler :
Private Sub ReportViewerModelPropertyChanged(ByVal sender As ObjectByVal e As PropertyChangedEventArgs) 
    'Hide the parameter area of the ReportViewer 
    If e.PropertyName = "IsParametersAreaVisible" _ 
    AndAlso CType(SLReportViewer.DataContext, ReportViewerModel).IsParametersAreaVisible _ 
    Then 
        CType(SLReportViewer.DataContext, ReportViewerModel).IsParametersAreaVisible = False 
    End If 
 
    If e.PropertyName = "Parameters" Then 
        'Make sure the ReportViewerModel has the parameters initialized from the service 
        If CType(SLReportViewer.DataContext, ReportViewerModel).Parameters IsNot Nothing _ 
        AndAlso CType(SLReportViewer.DataContext, ReportViewerModel).Parameters.Count > 0 _ 
        Then 
            If m_bOverwriteReportParameters _ 
            Then 
                'Here set the parameters you need to change programatically 
                CType(SLReportViewer.DataContext, ReportViewerModel).Parameters(0).Value = "Parameter1" 
                CType(SLReportViewer.DataContext, ReportViewerModel).Parameters(1).Value = "Parameter2" 
                 
                'Raise the flag, so we do not get into and endless loop of applying the parameters 
                m_bOverwriteReportParameters = False 
                 
                'Call the ApplyReportParametersCommand so the report can be refreshed with the new parameters 
                CType(SLReportViewer.DataContext, ReportViewerModel).ApplyReportParametersCommand.Execute(Nothing
            Else 
                m_bOverwriteReportParameters = True 
            End If 
        End If 
 
    End If 
End Sub 
 

Making the above will allow the reportviewer to work correctly with the overriden parameters in the code. There is somehow a minor glitch that the reportviewer first renders the report with the default parameters values, show the generated report, and then goes "Rendering Report" again, and shows the report again but this time with the real parameters. But this is better than nothing, right :)

Hope this was helpful.

0
Svetoslav
Telerik team
answered on 08 Dec 2009, 09:51 AM
Hi guys,

Please check the Programmatic Initialization of Report Parameter Values in Telerik Reporting Silverlight Viewer blog we have just published that describes the latest changes of the Silverlight ReportViewer's API and provides some guidelines how to pass parameters from client application.

Kind regards,
Svetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Michael
Top achievements
Rank 1
Answers by
Svetoslav
Telerik team
Iurie Coroban
Top achievements
Rank 1
Gerardo
Top achievements
Rank 1
Chris Gillies
Top achievements
Rank 1
Mike Lyncheski
Top achievements
Rank 1
Moises Casusol
Top achievements
Rank 1
Peter Staev
Top achievements
Rank 1
Share this question
or