Switching between reports from combobox

Let's suppose that we have "bookPriceList" and "report2" reports on the server side and we need to switch between them from the client side application.
Adding combobox and "render" button sounds a good solution for the problem.
So, a little designing and our XAML will look like in the markup below:

<UserControl x:Class="SampleApplicationSL5.MainPage"
             xmlns:ssr="clr-namespace:PerpetuumSoft.Reporting.Silverlight.Client;assembly=PerpetuumSoft.Reporting.Silverlight.Client"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">
 
 
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="20"/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid Grid.Row="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <ComboBox x:Name="comboReports">
                    <ComboBox.Items>
                        <ComboBoxItem Content="bookPriceList"/>
                        <ComboBoxItem Content="report2"/>
                    </ComboBox.Items>
                </ComboBox>
                <Button Grid.Column="1"  Content="Render" Click="Button_Click" ></Button>
            </Grid>
            <ssr:ReportViewer
                Grid.Row="1"
                ServiceUrl="http://localhost:5555/ReportService.svc"
                x:Name="reportViewer"
                ReportName="{Binding ElementName=comboReports, Path=SelectedValue.Content}">               
            </ssr:ReportViewer>
        </Grid>
    </Grid>
</UserControl>

So, we have combobox with our report list and reportviewer ReportName is bounded to selected item.
In the codebehind we just need to call rendering:

private void Button_Click(object sender, RoutedEventArgs e)
{
    if (!string.IsNullOrEmpty(reportViewer.ReportName))
    {                       
        reportViewer.RenderDocument();
    }
}

Here are you can see what we receive in the result application:

Add Feedback