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

Set report dynamically

3 Answers 198 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alilou
Top achievements
Rank 1
Alilou asked on 20 Mar 2012, 03:02 PM
Hi all,

I try to programmically set the property "Report" but it doesn't work well.

the scenario is :
- i define my reportViewer like this (the Raport Property will not specify) :  

<ctl:ReportViewer x:Name="ReportViewer1"

Grid.Row="0"

Grid.Column="0"

Grid.ColumnSpan="2"

ReportServerUri="../ReportService.svc"

HorizontalContentAlignment="Center"

HorizontalAlignment="Center"

VerticalContentAlignment="Top"

ViewMode="PrintPreview"

Style="{StaticResource ReportViewerStyle1}" />


- i have 3 radio button (each radio button defined a report)
- 1 button, when i click on this button, i take the name of the report : ReportViewer1.Report = "name of Report"

I am using the ReportViewer in Silverlight 5 ( version : Telerik_Reporting_Q1_2012_v6_0_12_215) and I use a ReportService.svc file to generate the report.

Thank you for your help.

3 Answers, 1 is accepted

Sort by
0
Alilou
Top achievements
Rank 1
answered on 21 Mar 2012, 10:55 AM
hi,
I achieve to change the report but The trouble is that when I use two differents reports, the change takes effect but when i use the same report with dynamic parameters (i display the report according to the dynamic parameters), parameters are updated (using extension method to refresh) but not rendering,
 
thx.
0
Hadib Ahmabi
Top achievements
Rank 1
answered on 22 Mar 2012, 04:53 PM
Try to create an empty report (with blank detail section which is really small and nothing on it). Then when you change the reports with the radio button, first apply refresh with the blank report and then apply refresh once again with the real report and the new parameters. It should probably be fast enough for you to not notice the flickering. 
0
Alilou
Top achievements
Rank 1
answered on 22 Mar 2012, 05:39 PM
thank you very much, it work fine
Tags
General Discussions
Asked by
Alilou
Top achievements
Rank 1
Answers by
Alilou
Top achievements
Rank 1
Hadib Ahmabi
Top achievements
Rank 1
Share this question
or