Telerik Forums
Reporting Forum
3 answers
894 views
Hello

I have a report  that looks like:

col1 value 1
col1  value 2
col1 value 3

I'd like to show col1 only once. If I use the group header for this it will add an extra row like:

col1
value 1
value 2
value 3

Is there any way to have it like:

col1  value 1
  value 2
value 3

Thanks
Mihai
Cristian
Top achievements
Rank 1
 answered on 25 Sep 2012
1 answer
123 views
Close button of Report Viewer not working in Silverlight.

 xmlns:telerikControl="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
 xmlns:telerik1="clr-namespace:Telerik.ReportViewer.Silverlight;assembly=Telerik.ReportViewer.Silverlight"    
 xmlns:Telerik_ReportViewer_Silverlight="clr-namespace:Telerik.ReportViewer.Silverlight;assembly=Telerik.ReportViewer.Silverlight"
 xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation

     <Style x:Key="ReportViewerStyle" TargetType="Telerik_ReportViewer_Silverlight:ReportViewer">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Telerik_ReportViewer_Silverlight:ReportViewer">
                        <Grid x:Name="LayoutRoot" DataContext="{x:Null}">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="ExportReportStateGroup">
                                    <VisualStateGroup.Transitions>
                                        <VisualTransition GeneratedDuration="0"/>
                                    </VisualStateGroup.Transitions>
                                    <VisualState x:Name="ExportNoExportState"/>
                                    <VisualState x:Name="ExportInProgressState">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ExportDialog">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ExportProgressBar">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="ExportCompleteState">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ExportDialog">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="PrintReportStateGroup">
                                    <VisualStateGroup.Transitions>
                                        <VisualTransition GeneratedDuration="0"/>
                                    </VisualStateGroup.Transitions>
                                    <VisualState x:Name="PrintNoPrintState"/>
                                    <VisualState x:Name="PrintInProgressState">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PrintDialog">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PrintProgressBar">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="PrintCompleteState">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PrintDialog">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="ViewerStateGroup">
                                    <VisualStateGroup.Transitions>
                                        <VisualTransition GeneratedDuration="0"/>
                                    </VisualStateGroup.Transitions>
                                    <VisualState x:Name="ViewerPageState"/>
                                    <VisualState x:Name="ViewerErrorState">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ViewerError">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="PageScrollViewer">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="ViewerWorkInProgressState">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="ViewerProgressMessage">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Visible</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border BorderBrush="{StaticResource OuterControlBorderBrush}" BorderThickness="1" CornerRadius="6">
                                <Border BorderBrush="{StaticResource InnerControlBorderBrush}" BorderThickness="1" Background="{StaticResource ControlBackgroundBrush}" CornerRadius="5" Margin="0" Padding="6">
                                    <Grid>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="auto"/>
                                            <RowDefinition Height="auto"/>
                                            <RowDefinition Height="6"/>
                                            <RowDefinition Height="*"/>
                                            <RowDefinition Height="6"/>
                                            <RowDefinition Height="auto"/>
                                        </Grid.RowDefinitions>
                                        <telerik:RadToolBar Grid.Row="0" telerik:StyleManager.Theme="{StaticResource Theme}" IsEnabled="True">
                                            <telerik:RadComboBox DisplayMemberPath="LocalizedName" Height="24" ItemsSource="{Binding RenderingExtensions}" IsEnabled="{Binding IsExportEnabled}" Margin="1,0" MaxDropDownHeight="300" Padding="2,0" SelectedItem="{Binding SelectedRenderingExtension, Mode=TwoWay}" Width="45">
                                                <telerik:RadComboBox.EmptySelectionBoxTemplate>
                                                    <DataTemplate>
                                                        <Image HorizontalAlignment="Left" Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/Export.png" Width="16"/>
                                                    </DataTemplate>
                                                </telerik:RadComboBox.EmptySelectionBoxTemplate>
                                                <ToolTipService.ToolTip>
                                                    <ToolTip Content="{Binding TextResources.ExportToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                                                </ToolTipService.ToolTip>
                                            </telerik:RadComboBox>
                                            <telerik:RadButton x:Name="PrintButton" BorderThickness="0" Command="{Binding PrintReportCommand}" Margin="0,2" Padding="2" telerik:StyleManager.Theme="{StaticResource Theme}">
                                                <ToolTipService.ToolTip>
                                                    <ToolTip Content="{Binding TextResources.PrintToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                                                </ToolTipService.ToolTip>
                                                <Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/Print.png" Width="16"/>
                                            </telerik:RadButton>
                                            <telerik:RadToolBarSeparator/>
                                            <telerik:RadButton x:Name="CloseButton" Command="{Binding NavigateBackCommand}" Margin="0" Padding="2" Height="20"
                                                               Content="Close" Click="ReportViewerCloseButton_Click" telerik:StyleManager.Theme="{StaticResource Theme}">
                                                <ToolTipService.ToolTip>
                                                    <ToolTip Content="{Binding TextResources.BackToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                                                </ToolTipService.ToolTip>
                                            </telerik:RadButton>
                                            <telerik:RadToolBarSeparator Height="20" Margin="2,0"/>
                                            <telerik:RadComboBox HorizontalAlignment="Center" IsEditable="True" ItemsSource="{Binding AvailableZoomValues}" IsTextSearchEnabled="False" Margin="10, 0, 3, 0" MaxDropDownHeight="300" Text="{Binding ZoomText, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" VerticalAlignment="Center" Width="70">
                                                <ToolTipService.ToolTip>
                                                    <ToolTip Content="{Binding TextResources.ZoomToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                                                </ToolTipService.ToolTip>
                                            </telerik:RadComboBox>
                                            <telerik:RadSlider HandlesVisibility="Visible" Maximum="100" Minimum="-100" SmallChange="10" telerik:StyleManager.Theme="{StaticResource Theme}" Value="{Binding Zoom, Converter={StaticResource ScaleFactorConverter}, Mode=TwoWay}" VerticalAlignment="Center" Width="137">
                                                <ToolTipService.ToolTip>
                                                    <ToolTip Content="{Binding TextResources.ZoomToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                                                </ToolTipService.ToolTip>
                                            </telerik:RadSlider>
                                            <telerik:RadToolBarSeparator/>
                                            <telerik:RadButton Command="{Binding MoveToFirstPageCommand}" Margin="0,2" Padding="2">
                                                <ToolTipService.ToolTip>
                                                    <ToolTip Content="{Binding TextResources.FirstPageToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                                                </ToolTipService.ToolTip>
                                                <Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/FirstPage.png" Width="16"/>
                                            </telerik:RadButton>
                                            <telerik:RadButton Command="{Binding MoveToPreviousPageCommand}" Margin="0,2" Padding="2">
                                                <ToolTipService.ToolTip>
                                                    <ToolTip Content="{Binding TextResources.PreviousPageToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                                                </ToolTipService.ToolTip>
                                                <Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/PrevPage.png" Width="16"/>
                                            </telerik:RadButton>
                                            <telerik:RadToolBarSeparator/>
                                            <Telerik_ReportViewer_Silverlight:TextBoxEx Telerik_ReportViewer_Silverlight:KeyDown.Command="{Binding NavigateToSpecificPageCommand}" IsEnabled="{Binding IsMoveToPageEnabled}" Margin="10, 0, 0, 0" MinWidth="30" TextAlignment="Center" Text="{Binding PageNumberModel, Mode=TwoWay}" VerticalAlignment="Center">
                                                <ToolTipService.ToolTip>
                                                    <ToolTip Content="{Binding TextResources.CurrentPageToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                                                </ToolTipService.ToolTip>
                                            </Telerik_ReportViewer_Silverlight:TextBoxEx>
                                            <TextBlock Margin="2, 0, 10, 0" TextAlignment="Center" Text="{Binding PageCount, ConverterParameter=of \{0\} pages, Converter={StaticResource FormatedNumberConverter}}" VerticalAlignment="Center">
                                            <ToolTipService.ToolTip>
                                                <ToolTip Content="{Binding TextResources.TotalPagesToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                                            </ToolTipService.ToolTip>
                                            </TextBlock>
                                            <telerik:RadToolBarSeparator/>
                                            <telerik:RadButton Command="{Binding MoveToNextPageCommand}" Margin="0,2" Padding="2">
                                                <ToolTipService.ToolTip>
                                                    <ToolTip Content="{Binding TextResources.NextPageToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                                                </ToolTipService.ToolTip>
                                                <Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/NextPage.png" Width="16"/>
                                            </telerik:RadButton>
                                            <telerik:RadButton Command="{Binding MoveToLastPageCommand}" Margin="0,2" Padding="2">
                                                <ToolTipService.ToolTip>
                                                    <ToolTip Content="{Binding TextResources.LastPageToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                                                </ToolTipService.ToolTip>
                                                <Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/LastPage.png" Width="16"/>
                                            </telerik:RadButton>
                                            <telerik:RadToolBarSeparator/>
                                            <telerik:RadButton Command="{Binding RefreshReportCommand}" Margin="0,2" Padding="2">
                                                <ToolTipService.ToolTip>
                                                    <ToolTip Content="{Binding TextResources.RefreshToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                                                </ToolTipService.ToolTip>
                                                <Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/Refresh.png" Width="16"/>
                                            </telerik:RadButton>
                                            <telerik:RadToolBarSeparator/>
                                            <telerik:RadButton Command="{Binding NavigateBackCommand}" Margin="0,2" Padding="2" Visibility="Collapsed">
                                                <ToolTipService.ToolTip>
                                                    <ToolTip Content="{Binding TextResources.BackToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                                                </ToolTipService.ToolTip>
                                                <Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/NavBack.png" Width="16"/>
                                            </telerik:RadButton>
                                            <telerik:RadButton Command="{Binding NavigateForwardCommand}" Margin="0,2" Padding="2" Visibility="Collapsed">
                                                <ToolTipService.ToolTip>
                                                    <ToolTip Content="{Binding TextResources.ForwardToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                                                </ToolTipService.ToolTip>
                                                <Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/NavForward.png" Width="16"/>
                                            </telerik:RadButton>
                                            <telerik:RadToggleButton IsChecked="{Binding IsDocumentMapVisible, Mode=TwoWay}" IsEnabled="{Binding IsToggleDocumentMapEnabled}" Margin="0,2" Padding="2" Visibility="{Binding HasDocumentMap, Converter={StaticResource VisibilityConverter}}">
                                                <ToolTipService.ToolTip>
                                                    <ToolTip Content="{Binding DocumentMapToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                                                </ToolTipService.ToolTip>
                                                <Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/DocumentMap.png" Width="16"/>
                                            </telerik:RadToggleButton>
                                            <telerik:RadToggleButton IsChecked="{Binding IsParametersAreaVisible, Mode=TwoWay}" IsEnabled="{Binding IsToggleParametersAreaEnabled}" Margin="0,2" Padding="2" Visibility="{Binding HasParameters, Converter={StaticResource VisibilityConverter}}">
                                                <ToolTipService.ToolTip>
                                                    <ToolTip Content="{Binding ParametersToolTip}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                                                </ToolTipService.ToolTip>
                                                <Image Height="16" Source="/Telerik.ReportViewer.Silverlight;component/images/Parameters.png" Width="16"/>
                                            </telerik:RadToggleButton>
                                        </telerik:RadToolBar>
                                        <Border x:Name="ParametersAreaPane" Grid.Row="1" Visibility="{Binding IsParametersAreaVisible, Converter={StaticResource VisibilityConverter}}">
                                            <Grid>
                                                <Grid>
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="*"/>
                                                        <ColumnDefinition Width="Auto"/>
                                                    </Grid.ColumnDefinitions>
                                                    <Grid Grid.Column="0">
                                                        <Telerik_ReportViewer_Silverlight:ReportParametersControl Foreground="{StaticResource ForegroundBrush}" IsTabStop="False" ItemsSource="{Binding ParameterModels}" ParameterTemplateSelector="{StaticResource ReportParameterEditorTemplateSelector}">
                                                            <Telerik_ReportViewer_Silverlight:ReportParametersControl.ItemsPanel>
                                                                <ItemsPanelTemplate>
                                                                    <telerik:RadUniformGrid Columns="2"/>
                                                                </ItemsPanelTemplate>
                                                            </Telerik_ReportViewer_Silverlight:ReportParametersControl.ItemsPanel>
                                                        </Telerik_ReportViewer_Silverlight:ReportParametersControl>
                                                    </Grid>
                                                    <Grid Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Bottom">
                                                        <telerik:RadButton Content="Preview" Command="{Binding ApplyReportParametersCommand}" Margin="3" Padding="10, 3" telerik:StyleManager.Theme="{StaticResource Theme}" Visibility="{Binding IsPreviewButtonVisible, Converter={StaticResource VisibilityConverter}}"/>
                                                    </Grid>
                                                </Grid>
                                            </Grid>
                                        </Border>
                                        <Grid Grid.Row="3">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="{Binding DocumentMapWidth, Mode=TwoWay}"/>
                                                <ColumnDefinition Width="auto"/>
                                                <ColumnDefinition Width="*"/>
                                            </Grid.ColumnDefinitions>
                                            <Border x:Name="DocumentMapPane" Grid.Column="0" HorizontalAlignment="Stretch" Visibility="{Binding IsDocumentMapVisible, Converter={StaticResource VisibilityConverter}}" VerticalAlignment="Stretch">
                                                <Border BorderBrush="{StaticResource OuterViewerAreaBorderBrush}" BorderThickness="1" CornerRadius="4" Margin="0, 0, 0, 0">
                                                    <Border BorderBrush="{StaticResource InnerViewerAreaBorderBrush}" BorderThickness="1" Background="{StaticResource InnerViewerAreaBackground}" CornerRadius="3" Margin="0">
                                                        <telerik:RadTreeView x:Name="DocumentMapTreeView" Background="{StaticResource InnerViewerAreaBackground}" ItemsSource="{Binding DocumentMapNodes}" SelectedItem="{Binding SelectedDocumentMapNode, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}">
                                                            <telerik:RadTreeView.ItemTemplate>
                                                                <telerik:HierarchicalDataTemplate telerik:ContainerBinding.ContainerBindings="{StaticResource DocumentMapItemBindingsCollection}" ItemsSource="{Binding Children}">
                                                                    <TextBlock Text="{Binding Text}"/>
                                                                </telerik:HierarchicalDataTemplate>
                                                            </telerik:RadTreeView.ItemTemplate>
                                                        </telerik:RadTreeView>
                                                    </Border>
                                                </Border>
                                            </Border>
                                            <sdk:GridSplitter Background="Transparent" Grid.Column="1" HorizontalAlignment="Center" Opacity="0" ShowsPreview="True" Visibility="{Binding IsDocumentMapVisible, Converter={StaticResource VisibilityConverter}}" VerticalAlignment="Stretch" Width="3"/>
                                            <Border BorderBrush="{StaticResource OuterViewerAreaBorderBrush}" BorderThickness="1" Grid.Column="2" CornerRadius="4">
                                                <Border BorderBrush="{StaticResource InnerViewerAreaBorderBrush}" BorderThickness="1" Background="{StaticResource InnerViewerAreaBackground}" CornerRadius="3" Margin="0">
                                                    <Grid>
                                                        <ScrollViewer x:Name="PageScrollViewer" BorderThickness="0" telerik:ScrollViewerExtensions.EnableMouseWheel="True" HorizontalScrollBarVisibility="Auto" telerik:StyleManager.Theme="{StaticResource Theme}" Visibility="Visible" VerticalScrollBarVisibility="Visible">
                                                            <ContentControl x:Name="PageContentControl">
                                                                <ContentControl.Resources>
                                                                    <ControlTemplate x:Key="PrintPreviewTemplate">
                                                                        <Border x:Name="PageBorder" BorderBrush="{StaticResource PageBorderBorderBrush}" BorderThickness="1" Background="{StaticResource PageBorderBackground}" Height="{Binding PageHeight}" Margin="10" Width="{Binding PageWidth}">
                                                                            <ContentPresenter/>
                                                                        </Border>
                                                                    </ControlTemplate>
                                                                    <ControlTemplate x:Key="InteractiveTemplate">
                                                                        <ContentPresenter HorizontalAlignment="Left" Margin="10" VerticalAlignment="Top"/>
                                                                    </ControlTemplate>
                                                                </ContentControl.Resources>
                                                                <telerik:LayoutTransformControl x:Name="PageContainer" Content="{Binding PageRoot}" LayoutTransform="{Binding PageTransform}"/>
                                                            </ContentControl>
                                                        </ScrollViewer>
                                                        <Telerik_ReportViewer_Silverlight:DialogBox x:Name="ViewerProgressMessage" Visibility="Collapsed">
                                                            <Grid Margin="20">
                                                                <Grid.RowDefinitions>
                                                                    <RowDefinition/>
                                                                    <RowDefinition Height="auto"/>
                                                                </Grid.RowDefinitions>
                                                                <TextBlock HorizontalAlignment="Center" Text="{Binding ProgressMessage}" VerticalAlignment="Center"/>
                                                                <telerik:RadProgressBar Grid.Row="1" Style="{StaticResource ProgressBarStyle}"/>
                                                            </Grid>
                                                        </Telerik_ReportViewer_Silverlight:DialogBox>
                                                        <customControl:CTextBox x:Name="ViewerError" BorderThickness="0" Background="{StaticResource InnerViewerAreaBackground}" Foreground="{StaticResource ErrorMessageForeground}" FontFamily="Verdana" HorizontalAlignment="Stretch" IsReadOnly="True" Padding="20" TextAlignment="Center" TextWrapping="Wrap" Text="{Binding Error}" Visibility="Collapsed" VerticalAlignment="Stretch"/>
                                                        <Telerik_ReportViewer_Silverlight:DialogBox x:Name="ExportDialog" Visibility="Collapsed">
                                                            <Grid Width="270">
                                                                <Grid.RowDefinitions>
                                                                    <RowDefinition Height="100"/>
                                                                    <RowDefinition Height="auto"/>
                                                                </Grid.RowDefinitions>
                                                                <Grid HorizontalAlignment="Stretch" Margin="20" VerticalAlignment="Center">
                                                                    <Grid.RowDefinitions>
                                                                        <RowDefinition/>
                                                                        <RowDefinition Height="auto"/>
                                                                    </Grid.RowDefinitions>
                                                                    <TextBlock HorizontalAlignment="Center" Text="{Binding ExportProgress}" VerticalAlignment="Center"/>
                                                                    <telerik:RadProgressBar x:Name="ExportProgressBar" Grid.Row="1" Style="{StaticResource ProgressBarStyle}" Visibility="Collapsed"/>
                                                                </Grid>
                                                                <Grid Grid.Row="1">
                                                                    <Grid.ColumnDefinitions>
                                                                        <ColumnDefinition Width="*"/>
                                                                        <ColumnDefinition Width="auto"/>
                                                                        <ColumnDefinition Width="auto"/>
                                                                    </Grid.ColumnDefinitions>
                                                                    <telerik:RadButton Content="Save" Grid.Column="1" Command="{Binding SaveExportCommand}" Margin="5" Padding="10, 3" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                                                                    <telerik:RadButton Content="Cancel" Grid.Column="2" Command="{Binding CancelExportCommand}" Margin="5" Padding="10, 3" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                                                                </Grid>
                                                            </Grid>
                                                        </Telerik_ReportViewer_Silverlight:DialogBox>
                                                        <Telerik_ReportViewer_Silverlight:DialogBox x:Name="PrintDialog" Visibility="Collapsed">
                                                            <Grid Width="270">
                                                                <Grid.RowDefinitions>
                                                                    <RowDefinition Height="100"/>
                                                                    <RowDefinition Height="auto"/>
                                                                </Grid.RowDefinitions>
                                                                <Grid HorizontalAlignment="Stretch" Margin="20" VerticalAlignment="Center">
                                                                    <Grid.RowDefinitions>
                                                                        <RowDefinition/>
                                                                        <RowDefinition Height="auto"/>
                                                                    </Grid.RowDefinitions>
                                                                    <TextBlock HorizontalAlignment="Center" TextAlignment="Center" Text="{Binding PrintProgress}" VerticalAlignment="Center"/>
                                                                    <telerik:RadProgressBar x:Name="PrintProgressBar" Grid.Row="1" Style="{StaticResource ProgressBarStyle}" Visibility="Collapsed"/>
                                                                </Grid>
                                                                <Grid Grid.Row="1">
                                                                    <Grid.ColumnDefinitions>
                                                                        <ColumnDefinition Width="*"/>
                                                                        <ColumnDefinition Width="auto"/>
                                                                        <ColumnDefinition Width="auto"/>
                                                                    </Grid.ColumnDefinitions>
                                                                    <telerik:RadButton Content="Print" Grid.Column="1" Command="{Binding PrintDocumentCommand}" Margin="5" Padding="10, 3" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                                                                    <telerik:RadButton Content="Cancel" Grid.Column="2" Command="{Binding CancelPrintDocumentCommand}" Margin="5" Padding="10, 3" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                                                                </Grid>
                                                            </Grid>
                                                        </Telerik_ReportViewer_Silverlight:DialogBox>
                                                    </Grid>
                                                </Border>
                                            </Border>
                                        </Grid>
                                        <Grid Grid.Row="5">
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="*"/>
                                                <ColumnDefinition Width="auto"/>
                                            </Grid.ColumnDefinitions>
                                            <StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center"/>
                                        </Grid>
                                    </Grid>
                                </Border>
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>


Report Viewer

  <telerik1:ReportViewer  x:Name="ReportViewerControl" Visibility="Visible"
                               ReportServiceUri="../ReportService.svc" Style="{StaticResource CityLawReportViewerStyle}" DataContext="{Binding}" ViewMode="PrintPreview" UseNativePrinting="False" />


Everything works fine in report viewer apart of close button. Close button is always going to display in Disable due to some internal setting of Silverlight Report viewer. I want to close Reportviewer screen(Want to add own code) on Close button click.

Please guide me for the same.
Steve
Telerik team
 answered on 25 Sep 2012
3 answers
119 views
I've got an interesting problem where I cannot get my Xaxis labels to display as a string! The values are usually numeric but are also occasionally alpha/numeric. I've searched and searched and cannot figure out why it would be behaving this way. I've got a bar graph and, for example, if the label data is "X1500" for a given column it is displaying as "0". It looks to me like reporting is trying to parse it as an int...? Also, if the value is supposed to be "00018" the graph is displaying that value as simply "18" (dropping the leading zeros)...
 
Also, I'm using the exact same field as label text in another part of my report and it is displaying properly there.

HELP! Thanks.
Steve
Telerik team
 answered on 25 Sep 2012
3 answers
115 views
Hello,

I have this issue that I set the XAxis label Rotation through the property "PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle" but this value is ignored.

I've managed to find what makes this annoying bug, it seems that when I set an skin this issue appears, and the way that I found to have the rotation and the look of the skin is to comment or delete the line that sets the skin name like the one below:
this.chart1.Skin = "Telerik";

Is this an known issue? The thing is that I don't have the latest version, I use the Q3 2010 and the company is not thinking to buy right now the latest version.

Thanks!
Tiago Ribeiro
Steve
Telerik team
 answered on 25 Sep 2012
3 answers
172 views
When generating PDF I get a whitespace/gap between the two mentioned sectioned, which I don't know the source of.
There is no grouping applied in the report. I am using a trial version of Telerik Reporting version 6.1.12.820. 

Did anyone come across this problem?

Roland
Steve
Telerik team
 answered on 25 Sep 2012
1 answer
136 views
After the most recent update to Reporting, a NullReferenceException is thrown when a ReportViewer is loaded without setting the ReportSource. When I load the the view that contains the viewer, I'm seeing this exception which I can't catch and suppress. My particular use case is in a Application that dynamically creates reports based on user input and then sets the source through data binding. This is a show stopper for a release I have to meet next week, so any quick help that can be provided would be much appreciated.My particular use case is in an MVVM Application where I dynamically create reports based on user input and then set the source through data binding.  

Here is the stack trace: 

Telerik.ReportViewer.Wpf.dll!Telerik.ReportViewer.Wpf.ReportViewerModel.CreateReportSourceSnapshot() + 0x26 bytes Telerik.ReportViewer.Wpf.dll!Telerik.ReportViewer.Wpf.ReportViewerModel.RefreshReportInternal(bool reloadParameters, Telerik.ReportViewer.Common.LogHistoryRecord logHistory, bool resetCachedResults) + 0xb5 bytes
Telerik.ReportViewer.Wpf.dll!Telerik.ReportViewer.Wpf.ReportViewer.RefreshReport() + 0x4c bytes
Telerik.ReportViewer.Wpf.dll!Telerik.ReportViewer.Wpf.ReportViewer.OnLoaded(object sender, System.Windows.RoutedEventArgs e) + 0x26 bytes
PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs) + 0x78 bytes
PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised) + 0xbe bytes
PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args) + 0x79 bytes
PresentationCore.dll!System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs e) + 0x17 bytes
PresentationFramework.dll!System.Windows.BroadcastEventHelper.BroadcastEvent(System.Windows.DependencyObject root, System.Windows.RoutedEvent routedEvent) + 0x149 bytes
PresentationFramework.dll!System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(object root) + 0xa9 bytes
PresentationCore.dll!MS.Internal.LoadedOrUnloadedOperation.DoWork() + 0x16 bytes

Steve
Telerik team
 answered on 25 Sep 2012
2 answers
267 views
Hi.

Within my details section, I wish some of the reportitem properties to be written out as a table.
The data source is ObjectDataSource (clr object).

If I have a datasource like this

class DetailObject
{
public int Prop1 {get;set;}
public int Prop2 {get;set;} 
public int Prop3 {get;set;} 
public int Prop4 {get;set;} 
public int Prop5 {get;set;} 
public int Prop6 {get;set;}  
}

I want properties 1,2 and 4 to be written out as a table within the details section and 3 and 5 in another table.
I am faced with the problem that tables need to be bound to collections. Leaving the datasource empty or binding to "= ReportItem" causes the table not to render at all (instead of rendering one and allow direct access to reportitem properties).

The workaround appears to be to create a value object that matches the the table layout and fake a list. Like this:

class Table1Values
{
public int DetailProp1 {get;set;}
public int DetailProp2 {get;set;} 
public int DetailProp4 {get;set;}  
}

class Table2Values
{
public int DetailProp3 {get;set;}
public int DetailProp5 {get;set;} 
} 

And then expand my DetailObject class with an Enumerable like this:

class DetailObject
{ 
// ( all the other stuff) 

public IEnumerable Table1Data {
get {
yield return new Table1Values
{ DetailProp1 = Prop1, 
DetailProp2 = Prop2,
DetailProp4 = Prop4
};
}};
}

Then it is possible to bind a table datasource to "=Fields.Table1Data" and binding cells to DetailProp1, DetailProp2 and DetailProp4. 

Am I missing something obvious, or is this how one should go about creating a table within the details section where the table is a table layout of predetermined individual ReportItem properties?
Tormod
Top achievements
Rank 1
 answered on 25 Sep 2012
16 answers
1.5K+ views
Hi - 
I'm trying out Telerik Reporting for the first time (I have used SSRS for a few years before). 

There's a few useful expressions that I've used in SSRS, which I have trouble reproducing in Telerik reports...

1) Referencing a dataset with the Exec() function:
 - I have a table "TableA", and a TextBox outside of the table
 - I would like the TextBox value to be the Sum() from TableA =  Exec('TableA', Sum(Fields.Column1))
 - unfortunately this is not supported...  Any plans to have it in the future?  What's the cleanest workaround?

2) Referencing the value from another TextBox:
 - I have 2 Textboxes, "TextBoxA" and "TextBoxB"
 - I would like TextBoxB value to equal the value from TextBoxA (in SSRS I would do: ReportItems!TextBoxA.Value )
 - this doesn't seem to be supported...  Any plans to have it in the future?  What's the cleanest workaround?

3) ColumnNumber() function:
 - I was trying to use ColumnNumber() in a header for some business scenario
 - the function always returned "1"...

thanks for your help!
 - bash
Ubuntu
Top achievements
Rank 1
 answered on 24 Sep 2012
13 answers
2.9K+ views
What is the method for setting the data source for subreports?

I currently have a report with 2 subreports. At runtime I set the report's data source to a DataSet. I also set the data source for the 2 subreports to the same DataSet. No data appears to be getting to the subreports.

public PeakReport(DataSet ds)
{
            /// <summary>
            /// Required for telerik Reporting designer support
            /// </summary>
            InitializeComponent();

            DataSource = ds;

            subAMDaily.Report.DataSource = ds;
            subPMDaily.Report.DataSource = ds;
}
Elian
Telerik team
 answered on 24 Sep 2012
4 answers
253 views
Hello,
 I am new in telerik. I would like to figure data + collection in one Report from my Bussiness object.

for example (it is only example but it describes my situation):

I have this classes:

public  class  Thing
{
     public string Name {get; set;}
     public string Price {get; set;}
}

public class  Person
{
 public string Name {get; set;}
 public string SurName{get; set;}
 public List<Thing> Things{get; set;}
}

result should be something like this:
--------------------------
name + surname  John Novak
things
 Car $100
 Toilet paper 42
 Mask $20
--------------------------

My question is, how do I figure out information about one person and person's things at the one report. I investigated "Telerik reporting tep by step" guide, but it deals only with database.

I am creating PDF from my bussiness object and I really don't know how to bind subreport.  I investigated that I can use subreports: Master report will show name + surname and subreport will show things.
Question is how to fill DataSource of  subreport.

My method for creating report is :

 

var dp = new DataProvider();

 

 

var myReport = new Report1();

 

myReport.DataSource = dp;
//!!!! Is tehere way, how to say, that Report2 (which is subreport in Report 1) will be filled by dp.SomeCollection

 

string mimType = string.Empty;

 

 

string extension = string.Empty;

 

 

Encoding encoding = null;

 

 

byte[] buffer = Telerik.Reporting.Processing.ReportProcessor.Render(

 

 

"PDF", myReport, null, out mimType, out extension, out encoding);

 

 

FileStream fs = new FileStream("c:\\reportWithExternalDataSource.pdf", FileMode.Create);

 

fs.Write(buffer, 0, buffer.Length);

fs.Flush();

fs.Close();


I hope I described my problem. Can anybody help me please.


thanks

kure256

Kalpesh
Top achievements
Rank 1
 answered on 24 Sep 2012
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?