Telerik Forums
Reporting Forum
7 answers
286 views
Hi All,
We are designing an report which uses storeprocedure to fetch data from database,We created one dataset which get correctly filled
with data (we confirm It by using viewdata tool),however during rendering  it gives following error,

An error has occured while processing Report '':
Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.

Same storeprocedure we are using with RDLC report which is working fine.

Please suggest,
Thanks,
Tejas.
Adam
Top achievements
Rank 1
 answered on 26 Sep 2012
0 answers
104 views
Is there a way to debug the reportgenerator, and look into the values of the returned SQL dataset?
Peter
Top achievements
Rank 1
 asked on 26 Sep 2012
3 answers
745 views

Hello Telerik Team,

I'm facing a problem with exporting a TextBox to excell file. Please take a look at the attached picture. I've created simple table with header and row. In that row I put numeric value of "1.222222" and I set up Format to {0:N2}. Now after exporting to excell file I got information "Number Stored as Text".

My question is: Is it possible to export this numeric value into excell file as a properly formatted number (1.22 stored as a number not as a text)?

Thanks in advance for your help.

Steve
Telerik team
 answered on 26 Sep 2012
3 answers
800 views
Hi

I have a report, based on a sqlDataSource. Some textboxes get their values from this datasource.

In the same report, I have a few tables (with only one row and one column) which get the data from different sqlDataSources than the main one.

The question is... I want to add a textbox to the report, and the value it holds has to be calculated from the values on the tables... but I can“t find how to reference those textboxes inside those tables in order to fill the value in this new textbox... no matter what I do i get an error.

For example I want to reference the value held in table2 wich has a textbox named textbox14, if I reference it like- table2.textbox14.Value, or textbox14.Value or ReportItem.table2.textbox14.Value or ReportItem.table2.textbox14.Value I always get the same error "The expression contains object "table2/textbox14" that is not defined in the current context"

Can someone help me on this?

Thanks in advance.
John
Top achievements
Rank 1
 answered on 25 Sep 2012
3 answers
916 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
128 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
129 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
121 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
174 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
159 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
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?