Telerik Forums
Reporting Forum
1 answer
211 views
A scenario was presented to determine whether or not Telerik Reporting can handle it.  There are several reports that need to load image files that are defined in the database.  For example the database contains six columns that may be populated with a file name for the image that should be displayed on the report.  At this point I know that I can load the images in this fashion by calling a function that returns an image to set the picturebox value property.  Additionally, in cases where an image is not defined or can not be found I can return a default image (blank.png).

Now I need to add six pictureboxes to my report to allow me to define and display all six images.  I would prefer to do this at design time but if it has be done at runtime I can deal with that.  In some cases I might only be displaying three out of the six images.  In this case, we need to be able to hide the images that are not being displayed and center the remaining images in the container (Panel).  Is this something that can be accomplished either by setting properties or by developing code to handle it?
Peter
Telerik team
 answered on 27 Jan 2012
0 answers
133 views
I have a blob image stored in a mySql database. I can render the image just fine via an ahsx handler to display on my webpages using the code:
context.Response.ContentType = "image/jpeg";
byte[] img = businessProvider.GetImage(Convert.ToInt32(id));
context.Response.BinaryWrite(img);
context.Response.End();

I'm also wanting to display the image on a telerik report. I've set the value of the picturebox to the byte[] property on the business object and set the mimetype to "image/jpeg"; When i run the report the picturebox displays an error that reads "invalid image data".

Any ideas what to look for?

Thanks, Donta
Donta
Top achievements
Rank 1
 asked on 27 Jan 2012
1 answer
112 views
In the examples that demonstrate the use of the document map the way in which it is displayed (font size, style, etc) is different.  I am trying to determine how I can change they way this content is rendered but I can not seem to find it.  I am currently looking how to make this work using the Web Viewer.
Steve
Telerik team
 answered on 27 Jan 2012
9 answers
429 views
Does anyone know how to bind a report to a webservice and have it call that service each time the parameters change or the report is refreshed?  I have not seen any answers to this.  I have tried to override the OnNeedDataSource in a base class, handling the NeedDataSource event and according to all the other post this only gets called when the datasource is null which is only once.  Something does not seem right here.  I should be able to update my datasource any time the report needs to be refreshed, or at least have the option.  So if anyone has a complete example how to bind a report to a webservice and send parameters please post a solution.  I am trying to do something like this in the NeedDataSource is my base report:


if (string.IsNullOrEmpty(this.StoredProcedureName))
{
    base.OnNeedDataSource(sender, e);
    return;
}
 
object[] parameters = new object[this.ReportParameters.Count];
for (int index = 0; index < this.ReportParameters.Count; index++)
{
    Telerik.Reporting.ReportParameter trp = this.ReportParameters[index];
    parameters[index] = new object[] { "@" + trp.Name, trp.Value };
}
 
this.DataSource = WebServiceProxy.Execute(StoredProcedureName, parameters);

Thanks for your help,

Jason
Lars
Top achievements
Rank 1
 answered on 27 Jan 2012
4 answers
92 views
I'm trying to generate a report which uses data in a parent-child relationship.  For any Item X, it may have any number of Sub-Items.   I can set this up to work with a subreport, but then the Sub-items will only list vertically, as a subreport cannot be multi-columned. 

Also, the Sub-Items are being generated from a Stored Procedure which takes as a parameter the key of the Item.

I was hoping to overcome this by including a table in the main report which used the Stored Procedure data to list the Sub-Items, but I'm not sure how to execute the stored procedure for each item in the main report.  Can this be done?

Paul
Top achievements
Rank 1
 answered on 26 Jan 2012
8 answers
1.2K+ views
When printing a report i sometimes get this error.
Can you please give me a direction where to start?

Attempted to divide by zero.

---EXCEPTIONS----------

[DivideByZeroException]
Attempted to divide by zero.


---STACK TRACE----------

at System.Drawing.Printing.PageSettings.get_HardMarginX()
at Telerik.Reporting.Processing.ReportPrintDocument.OnBeginPrint(PrintEventArgs e)
at System.Drawing.Printing.PrintDocument._OnBeginPrint(PrintEventArgs e)
at System.Drawing.Printing.PrintController.Print(PrintDocument document)
at System.Drawing.Printing.PrintDocument.Print()
at Telerik.Reporting.Processing.ReportProcessor.PrintReport(IReportDocument reportDocument, PrinterSettings printerSettings)
at CLGroup.Intranet.Purchase.Reporting.RepBolist.PrintDocument(Int32 branchId, PersonalizationFeatureType feature, Report report)
at CLGroup.Intranet.Purchase.Reporting.RepBolist.Send_Click(Object sender, EventArgs e)
Steve
Telerik team
 answered on 26 Jan 2012
2 answers
237 views
I apologize in advance if the question was asked earlier (although I looked through the forum).
I need to completely hide the crosstab when its data source contains no records. All report controls located below should be shifted up on the page. Currently the crosstab header and footer rows are shown when no data is present. I tried to set CanShrink = true for all cells in the crosstab and use the conditional formatting (font size = 0 pt) but anyway the other report controls are on their places, not shifted up.
Nikolay
Top achievements
Rank 1
 answered on 26 Jan 2012
1 answer
520 views
Hi Telerik,

After going through Step by Step guide, I figured out ObjectDataSource is the best fit for my case.

Let me give a brief description

-> I have a wpf window (window1) with DataTable populated which needs to be displayed in the report

-> I created report with just the group header. I tried adding ObjectDataSource from the toolbar and Visual Studio got hanged. So I decided adding it in the code like below.

Telerik.Reporting.ObjectDataSource ods = new Telerik.Reporting.ObjectDataSource();

ods.DataSource = d;

Telerik.Reporting.Report r1 = new Telerik.Reporting.Report();

r1.DataSource = ods;

 

-> All the columns in the DataTable will be created and populated based on the value selected in wpf Window (window1). I would like to add this DataTable as a source to my report. 

-> How to declare the fields and association between my datatable and the display fields.

Is it something like since we know the columnnames in the DataTable we need to specify it as [=Fields.MovieName], and so on. assume MovieName is the columnName in DataTable.

Please let me know.

Thanks,
Mohan

Steve
Telerik team
 answered on 26 Jan 2012
3 answers
440 views
Hello,

I'm having troubles when i try to edit the ReportViewer's template. Basically when i click on edit template -> edit copy in blend i get the template for the ReportViewer but don't get the template for the ToolBar. I did find this template in the forums but when selecting an export option it's not doing anything. Any ideas what I'm doing wrong?

<ControlTemplate x:Key="ReportViewerControlTemplate1" TargetType="{x:Type my:ReportViewer}">
           <Grid x:Name="LayoutRoot">
               <Border BorderBrush="#3FFFFFFF" BorderThickness="1" CornerRadius="6">
                   <Border Margin="0" BorderBrush="Black" BorderThickness="1" CornerRadius="5" Padding="6">
                       <Border.Background>
                           <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                               <GradientStop Color="#FF7E7E7E" Offset="0"/>
                               <GradientStop Color="#FF484848" Offset="1"/>
                               <GradientStop Color="#FF303030" Offset="0.1"/>
                           </LinearGradientBrush>
                       </Border.Background>
                       <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>
                                   <telerik:Office_BlackTheme/>
                               </telerik:StyleManager.Theme>
                               <telerik:RadButton Margin="0,2" Padding="2" Command="{Binding RefreshReportCommand}">
                                   <Image Width="16" Height="16">
                                       <Image.Source>
                                           <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/Refresh.png"/>
                                       </Image.Source>
                                   </Image>
                               </telerik:RadButton>
                               <telerik:RadToolBarSeparator/>
                               <telerik:RadButton Margin="0,2" Padding="2" Command="{Binding MoveToFirstPageCommand}">
                                   <Image Width="16" Height="16">
                                       <Image.Source>
                                           <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/FirstPage.png"/>
                                       </Image.Source>
                                   </Image>
                               </telerik:RadButton>
                               <telerik:RadButton Margin="0,2" Padding="2" Command="{Binding MoveToPreviousPageCommand}">
                                   <Image Width="16" Height="16">
                                       <Image.Source>
                                           <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/PrevPage.png"/>
                                       </Image.Source>
                                   </Image>
                               </telerik:RadButton>
                               <telerik:RadToolBarSeparator/>
                               <TextBox Margin="10,0,0,0" MinWidth="30" VerticalAlignment="Center" IsEnabled="{Binding IsMoveToPageEnabled}" Text="{Binding PageNumber, Mode=TwoWay}" TextAlignment="Center"/>
                               <TextBlock Margin="2,0,10,0" VerticalAlignment="Center" TextAlignment="Center">
                                   <TextBlock.Text>
                                       <Binding Path="PageCount" ConverterParameter="of {0} pages">
                                           <Binding.Converter>
                                               <my:FormatedNumberConverter/>
                                           </Binding.Converter>
                                       </Binding>
                                   </TextBlock.Text>
                               </TextBlock>
                               <telerik:RadToolBarSeparator/>
                               <telerik:RadButton Margin="0,2" Padding="2" Command="{Binding MoveToNextPageCommand}">
                                   <Image Width="16" Height="16">
                                       <Image.Source>
                                           <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/NextPage.png"/>
                                       </Image.Source>
                                   </Image>
                               </telerik:RadButton>
                               <telerik:RadButton Margin="0,2" Padding="2" Command="{Binding MoveToLastPageCommand}">
                                   <Image Width="16" Height="16">
                                       <Image.Source>
                                           <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/LastPage.png"/>
                                       </Image.Source>
                                   </Image>
                               </telerik:RadButton>
                               <telerik:RadToolBarSeparator/>
                               <telerik:RadButton Margin="0,2" Padding="2" Click="PrintButton_Click" > <!-- Command="{Binding PrintReportCommand}"-->
                                   <Image Width="16" Height="16">
                                       <Image.Source>
                                           <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/Print.png"/>
                                       </Image.Source>
                                   </Image>
                               </telerik:RadButton>
                               <telerik:RadComboBox ItemsSource="{Binding Path=RenderingExtensions}" Margin="1,0" Width="45" Height="24" Padding="2,0" IsEnabled="{Binding IsExportEnabled}">
                                   <telerik:RadComboBox.ItemTemplate>
                                       <DataTemplate>
                                           <TextBlock MinWidth="150" Text="{Binding Description}"/>
                                       </DataTemplate>
                                   </telerik:RadComboBox.ItemTemplate>
                                   <telerik:RadComboBox.EmptySelectionBoxTemplate>
                                       <DataTemplate>
                                           <Image HorizontalAlignment="Left" Width="16" Height="16" Visibility="Visible">
                                               <Image.Source>
                                                   <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/Export.png"/>
                                               </Image.Source>
                                           </Image>
                                       </DataTemplate>
                                   </telerik:RadComboBox.EmptySelectionBoxTemplate>
                                   <telerik:RadComboBox.SelectionBoxTemplate>
                                       <DataTemplate>
                                           <Image HorizontalAlignment="Left" Width="16" Height="16" Visibility="Visible">
                                               <Image.Source>
                                                   <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/Export.png"/>
                                               </Image.Source>
                                           </Image>
                                       </DataTemplate>
                                   </telerik:RadComboBox.SelectionBoxTemplate>
                               </telerik:RadComboBox>
                               <telerik:RadToolBarSeparator/>
                               <telerik:RadToggleButton Margin="0,2" Padding="2" IsChecked="{Binding IsDocumentMapVisible, Mode=TwoWay}">
                                   <telerik:RadToggleButton.Visibility>
                                       <Binding Path="HasDocumentMap">
                                           <Binding.Converter>
                                               <my:VisibilityConverter/>
                                           </Binding.Converter>
                                       </Binding>
                                   </telerik:RadToggleButton.Visibility>
                                   <Image Width="16" Height="16">
                                       <Image.Source>
                                           <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/DocumentMap.png"/>
                                       </Image.Source>
                                   </Image>
                               </telerik:RadToggleButton>
                               <telerik:RadToggleButton Margin="0,2" Padding="2" IsChecked="{Binding IsParametersAreaVisible, Mode=TwoWay}">
                                   <telerik:RadToggleButton.Visibility>
                                       <Binding Path="HasParameters">
                                           <Binding.Converter>
                                               <my:VisibilityConverter/>
                                           </Binding.Converter>
                                       </Binding>
                                   </telerik:RadToggleButton.Visibility>
                                   <Image Width="16" Height="16">
                                       <Image.Source>
                                           <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/Parameters.png"/>
                                       </Image.Source>
                                   </Image>
                               </telerik:RadToggleButton>
                           </telerik:RadToolBar>
                           <Border x:Name="ParametersAreaPane" Grid.Row="1">
                               <Border.Visibility>
                                   <Binding Path="IsParametersAreaVisible">
                                       <Binding.Converter>
                                           <my:VisibilityConverter/>
                                       </Binding.Converter>
                                   </Binding>
                               </Border.Visibility>
                               <Grid>
                                   <Grid>
                                       <Grid.ColumnDefinitions>
                                           <ColumnDefinition Width="*"/>
                                           <ColumnDefinition Width="Auto"/>
                                       </Grid.ColumnDefinitions>
                                       <Grid Grid.Column="0">
                                           <my:ReportParametersControl Foreground="White">
                                               <my:ReportParametersControl.ParameterTemplateSelector>
                                                   <my:ReportParameterEditorTemplateSelector>
                                                       <my:ReportParameterEditorTemplateSelector.Templates>
                                                           <DataTemplate>
                                                               <my:ParameterContentControl AvailableValues="False" Multivalue="False" Type="System.Boolean">
                                                                   <my:ParameterContentControl.Style>
                                                                       <Style TargetType="{x:Type ContentControl}">
                                                                           <Setter Property="Template">
                                                                               <Setter.Value>
                                                                                   <ControlTemplate TargetType="{x:Type ContentControl}">
                                                                                       <Grid Margin="5" Height="30">
                                                                                           <Grid.ColumnDefinitions>
                                                                                               <ColumnDefinition MinWidth="100" Width="Auto"/>
                                                                                               <ColumnDefinition Width="Auto"/>
                                                                                               <ColumnDefinition Width="Auto"/>
                                                                                           </Grid.ColumnDefinitions>
                                                                                           <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="0" Foreground="White" Text="{Binding Text}" TextWrapping="Wrap"/>
                                                                                           <ContentPresenter Margin="5,0" VerticalAlignment="Center" Grid.Column="1" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                                                                                           <CheckBox VerticalAlignment="Center" Content="Null" Foreground="White" Grid.Column="2" IsChecked="{Binding IsNull, Mode=TwoWay}">
                                                                                               <CheckBox.Visibility>
                                                                                                   <Binding Path="AllowNull">
                                                                                                       <Binding.Converter>
                                                                                                           <my:VisibilityConverter/>
                                                                                                       </Binding.Converter>
                                                                                                   </Binding>
                                                                                               </CheckBox.Visibility>
                                                                                           </CheckBox>
                                                                                       </Grid>
                                                                                   </ControlTemplate>
                                                                               </Setter.Value>
                                                                           </Setter>
                                                                       </Style>
                                                                   </my:ParameterContentControl.Style>
                                                                   <CheckBox/>
                                                               </my:ParameterContentControl>
                                                           </DataTemplate>
                                                           <DataTemplate>
                                                               <my:ParameterContentControl AvailableValues="True" Multivalue="True" Type="{x:Null}">
                                                                   <my:ParameterContentControl.Style>
                                                                       <Style TargetType="{x:Type ContentControl}">
                                                                           <Setter Property="Template">
                                                                               <Setter.Value>
                                                                                   <ControlTemplate TargetType="{x:Type ContentControl}">
                                                                                       <Grid Margin="5" Height="30">
                                                                                           <Grid.ColumnDefinitions>
                                                                                               <ColumnDefinition MinWidth="100" Width="Auto"/>
                                                                                               <ColumnDefinition Width="Auto"/>
                                                                                               <ColumnDefinition Width="Auto"/>
                                                                                           </Grid.ColumnDefinitions>
                                                                                           <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="0" Foreground="White" Text="{Binding Text}" TextWrapping="Wrap"/>
                                                                                           <ContentPresenter Margin="5,0" VerticalAlignment="Center" Grid.Column="1" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                                                                                           <CheckBox VerticalAlignment="Center" Content="Null" Foreground="White" Grid.Column="2" IsChecked="{Binding IsNull, Mode=TwoWay}">
                                                                                               <CheckBox.Visibility>
                                                                                                   <Binding Path="AllowNull">
                                                                                                       <Binding.Converter>
                                                                                                           <my:VisibilityConverter/>
                                                                                                       </Binding.Converter>
                                                                                                   </Binding>
                                                                                               </CheckBox.Visibility>
                                                                                           </CheckBox>
                                                                                       </Grid>
                                                                                   </ControlTemplate>
                                                                               </Setter.Value>
                                                                           </Setter>
                                                                       </Style>
                                                                   </my:ParameterContentControl.Style>
                                                                   <telerik:RadComboBox Width="200" IsDropDownOpen="{Binding IsDropDownOpen, Mode=TwoWay}">
                                                                       <telerik:RadComboBox.SelectionBoxTemplate>
                                                                           <DataTemplate>
                                                                               <TextBlock HorizontalAlignment="Stretch">
                                                                                   <TextBlock.Text>
                                                                                       <Binding Path="Owner.Value" Mode="OneWay">
                                                                                           <Binding.Converter>
                                                                                               <my:MultivalueParameterConverter/>
                                                                                           </Binding.Converter>
                                                                                       </Binding>
                                                                                   </TextBlock.Text>
                                                                               </TextBlock>
                                                                           </DataTemplate>
                                                                       </telerik:RadComboBox.SelectionBoxTemplate>
                                                                       <telerik:RadComboBox.ItemTemplate>
                                                                           <DataTemplate>
                                                                               <CheckBox Content="{Binding Name}" IsChecked="{Binding IsSelected, Mode=TwoWay}"/>
                                                                           </DataTemplate>
                                                                       </telerik:RadComboBox.ItemTemplate>
                                                                       <telerik:StyleManager.Theme>
                                                                           <telerik:Office_BlackTheme/>
                                                                       </telerik:StyleManager.Theme>
                                                                   </telerik:RadComboBox>
                                                               </my:ParameterContentControl>
                                                           </DataTemplate>
                                                           <DataTemplate>
                                                               <my:ParameterContentControl AvailableValues="True" Multivalue="False" Type="{x:Null}">
                                                                   <my:ParameterContentControl.Style>
                                                                       <Style TargetType="{x:Type ContentControl}">
                                                                           <Setter Property="Template">
                                                                               <Setter.Value>
                                                                                   <ControlTemplate TargetType="{x:Type ContentControl}">
                                                                                       <Grid Margin="5" Height="30">
                                                                                           <Grid.ColumnDefinitions>
                                                                                               <ColumnDefinition MinWidth="100" Width="Auto"/>
                                                                                               <ColumnDefinition Width="Auto"/>
                                                                                               <ColumnDefinition Width="Auto"/>
                                                                                           </Grid.ColumnDefinitions>
                                                                                           <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="0" Foreground="White" Text="{Binding Text}" TextWrapping="Wrap"/>
                                                                                           <ContentPresenter Margin="5,0" VerticalAlignment="Center" Grid.Column="1" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                                                                                           <CheckBox VerticalAlignment="Center" Content="Null" Foreground="White" Grid.Column="2" IsChecked="{Binding IsNull, Mode=TwoWay}">
                                                                                               <CheckBox.Visibility>
                                                                                                   <Binding Path="AllowNull">
                                                                                                       <Binding.Converter>
                                                                                                           <my:VisibilityConverter/>
                                                                                                       </Binding.Converter>
                                                                                                   </Binding>
                                                                                               </CheckBox.Visibility>
                                                                                           </CheckBox>
                                                                                       </Grid>
                                                                                   </ControlTemplate>
                                                                               </Setter.Value>
                                                                           </Setter>
                                                                       </Style>
                                                                   </my:ParameterContentControl.Style>
                                                                   <telerik:RadComboBox Width="200">
                                                                       <telerik:StyleManager.Theme>
                                                                           <telerik:Office_BlackTheme/>
                                                                       </telerik:StyleManager.Theme>
                                                                       <telerik:RadComboBox.ItemTemplate>
                                                                           <DataTemplate>
                                                                               <TextBlock Text="{Binding Name}"/>
                                                                           </DataTemplate>
                                                                       </telerik:RadComboBox.ItemTemplate>
                                                                   </telerik:RadComboBox>
                                                               </my:ParameterContentControl>
                                                           </DataTemplate>
                                                           <DataTemplate>
                                                               <my:ParameterContentControl AvailableValues="False" Multivalue="False" Type="System.DateTime">
                                                                   <my:ParameterContentControl.Style>
                                                                       <Style TargetType="{x:Type ContentControl}">
                                                                           <Setter Property="Template">
                                                                               <Setter.Value>
                                                                                   <ControlTemplate TargetType="{x:Type ContentControl}">
                                                                                       <Grid Margin="5" Height="30">
                                                                                           <Grid.ColumnDefinitions>
                                                                                               <ColumnDefinition MinWidth="100" Width="Auto"/>
                                                                                               <ColumnDefinition Width="Auto"/>
                                                                                               <ColumnDefinition Width="Auto"/>
                                                                                           </Grid.ColumnDefinitions>
                                                                                           <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="0" Foreground="White" Text="{Binding Text}" TextWrapping="Wrap"/>
                                                                                           <ContentPresenter Margin="5,0" VerticalAlignment="Center" Grid.Column="1" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                                                                                           <CheckBox VerticalAlignment="Center" Content="Null" Foreground="White" Grid.Column="2" IsChecked="{Binding IsNull, Mode=TwoWay}">
                                                                                               <CheckBox.Visibility>
                                                                                                   <Binding Path="AllowNull">
                                                                                                       <Binding.Converter>
                                                                                                           <my:VisibilityConverter/>
                                                                                                       </Binding.Converter>
                                                                                                   </Binding>
                                                                                               </CheckBox.Visibility>
                                                                                           </CheckBox>
                                                                                       </Grid>
                                                                                   </ControlTemplate>
                                                                               </Setter.Value>
                                                                           </Setter>
                                                                       </Style>
                                                                   </my:ParameterContentControl.Style>
                                                                   <telerik:RadDatePicker Width="200" IsTabStop="False" DisplayDate="2010-05-01" SelectedDate="{Binding Value, Mode=TwoWay}">
                                                                       <telerik:StyleManager.Theme>
                                                                           <telerik:Office_BlackTheme/>
                                                                       </telerik:StyleManager.Theme>
                                                                   </telerik:RadDatePicker>
                                                               </my:ParameterContentControl>
                                                           </DataTemplate>
                                                           <DataTemplate>
                                                               <my:ParameterContentControl AvailableValues="False" Multivalue="False" Type="{x:Null}">
                                                                   <my:ParameterContentControl.Style>
                                                                       <Style TargetType="{x:Type ContentControl}">
                                                                           <Setter Property="Template">
                                                                               <Setter.Value>
                                                                                   <ControlTemplate TargetType="{x:Type ContentControl}">
                                                                                       <Grid Margin="5" Height="30">
                                                                                           <Grid.ColumnDefinitions>
                                                                                               <ColumnDefinition MinWidth="100" Width="Auto"/>
                                                                                               <ColumnDefinition Width="Auto"/>
                                                                                               <ColumnDefinition Width="Auto"/>
                                                                                           </Grid.ColumnDefinitions>
                                                                                           <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="0" Foreground="White" Text="{Binding Text}" TextWrapping="Wrap"/>
                                                                                           <ContentPresenter Margin="5,0" VerticalAlignment="Center" Grid.Column="1" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                                                                                           <CheckBox VerticalAlignment="Center" Content="Null" Foreground="White" Grid.Column="2" IsChecked="{Binding IsNull, Mode=TwoWay}">
                                                                                               <CheckBox.Visibility>
                                                                                                   <Binding Path="AllowNull">
                                                                                                       <Binding.Converter>
                                                                                                           <my:VisibilityConverter/>
                                                                                                       </Binding.Converter>
                                                                                                   </Binding>
                                                                                               </CheckBox.Visibility>
                                                                                           </CheckBox>
                                                                                       </Grid>
                                                                                   </ControlTemplate>
                                                                               </Setter.Value>
                                                                           </Setter>
                                                                       </Style>
                                                                   </my:ParameterContentControl.Style>
                                                                   <TextBox Width="200" Text="{Binding Value, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True}"/>
                                                               </my:ParameterContentControl>
                                                           </DataTemplate>
                                                       </my:ReportParameterEditorTemplateSelector.Templates>
                                                   </my:ReportParameterEditorTemplateSelector>
                                               </my:ReportParametersControl.ParameterTemplateSelector>
                                               <my:ReportParametersControl.ItemsPanel>
                                                   <ItemsPanelTemplate>
                                                       <Telerik_Windows_Controls_Primitives:RadUniformGrid IsItemsHost="True" Columns="2"/>
                                                   </ItemsPanelTemplate>
                                               </my:ReportParametersControl.ItemsPanel>
                                           </my:ReportParametersControl>
                                       </Grid>
                                       <Grid HorizontalAlignment="Center" VerticalAlignment="Bottom" Grid.Column="1">
                                           <telerik:RadButton Margin="3" Content="Preview" Padding="10,3" Command="{Binding PreviewReportCommand}">
                                               <telerik:StyleManager.Theme>
                                                   <telerik:Office_BlackTheme/>
                                               </telerik:StyleManager.Theme>
                                           </telerik:RadButton>
                                       </Grid>
                                   </Grid>
                                   <my:DialogBox x:Name="UpdateParametersDialog">
                                       <my:DialogBox.Visibility>
                                           <Binding Path="IsUpdatingParameters">
                                               <Binding.Converter>
                                                   <my:VisibilityConverter/>
                                               </Binding.Converter>
                                           </Binding>
                                       </my:DialogBox.Visibility>
                                       <Grid Margin="20">
                                           <Grid.RowDefinitions>
                                               <RowDefinition/>
                                               <RowDefinition Height="Auto"/>
                                           </Grid.RowDefinitions>
                                           <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding UpdateParametersProgress}"/>
                                           <telerik:RadProgressBar Grid.Row="1" Maximum="100">
                                               <telerik:StyleManager.Theme>
                                                   <telerik:Office_BlackTheme/>
                                               </telerik:StyleManager.Theme>
                                               <telerik:RadProgressBar.Style>
                                                   <Style TargetType="{x:Type telerik:RadProgressBar}">
                                                       <Setter Property="IsIndeterminate" Value="True"/>
                                                       <Setter Property="Height" Value="10"/>
                                                       <Setter Property="Margin" Value="0,10,0,0"/>
                                                       <Setter Property="IsTabStop" Value="False"/>
                                                   </Style>
                                               </telerik:RadProgressBar.Style>
                                           </telerik:RadProgressBar>
                                       </Grid>
                                   </my:DialogBox>
                               </Grid>
                           </Border>
                           <Grid Grid.Row="3">
                               <Grid.ColumnDefinitions>
                                   <ColumnDefinition Width="Auto"/>
                                   <ColumnDefinition Width="*"/>
                               </Grid.ColumnDefinitions>
                               <Border x:Name="DocumentMapPane" Width="200" Grid.Column="0">
                                   <Border.Visibility>
                                       <Binding Path="IsDocumentMapVisible">
                                           <Binding.Converter>
                                               <my:VisibilityConverter/>
                                           </Binding.Converter>
                                       </Binding>
                                   </Border.Visibility>
                                   <Border Margin="0,0,6,0" Grid.Column="2" BorderBrush="#66FFFFFF" BorderThickness="1" CornerRadius="4">
                                       <Border Margin="0" Background="White" BorderBrush="Black" BorderThickness="1" CornerRadius="3">
                                           <telerik:RadTreeView x:Name="DocumentMapTreeView" Background="White" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" IsVirtualizing="False" TextDropAfter="Drop after " TextDropBefore="Drop before " TextDropIn="Drop in " TextDropRoot="Drop as root">
                                               <telerik:RadTreeView.ItemTemplate>
                                                   <HierarchicalDataTemplate AlternationCount="0" ItemBindingGroup="{x:Null}" ItemContainerStyle="{x:Null}" ItemContainerStyleSelector="{x:Null}" ItemStringFormat="{x:Null}" ItemTemplate="{x:Null}" ItemTemplateSelector="{x:Null}" ItemsSource="{Binding Children}">
                                                       <TextBlock Text="{Binding Label}"/>
                                                   </HierarchicalDataTemplate>
                                               </telerik:RadTreeView.ItemTemplate>
                                               <telerik:RadTreeView.Style>
                                                   <Style TargetType="{x:Type telerik:RadTreeView}">
                                                       <Setter Property="IsEnabled" Value="{Binding IsMoveToPageEnabled}"/>
                                                       <Setter Property="SelectedItem" Value="{Binding SelectedDocumentMapNode, Mode=TwoWay}"/>
                                                       <Setter Property="ItemsSource" Value="{Binding DocumentMapNodes}"/>
                                                   </Style>
                                               </telerik:RadTreeView.Style>
                                               <telerik:StyleManager.Theme>
                                                   <telerik:Office_BlackTheme/>
                                               </telerik:StyleManager.Theme>
                                           </telerik:RadTreeView>
                                       </Border>
                                   </Border>
                               </Border>
                               <Border Grid.Column="2" BorderBrush="#66FFFFFF" BorderThickness="1" CornerRadius="4">
                                   <Border Margin="0" Background="White" BorderBrush="Black" BorderThickness="1" CornerRadius="3">
                                       <Grid>
                                           <ScrollViewer x:Name="PageScrollViewer" BorderThickness="0" Visibility="Visible" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Visible">
                                               <Border x:Name="PageBorder" Margin="10" Width="{Binding PageWidth}" Height="{Binding PageHeight}" Background="White" BorderBrush="DarkGray" BorderThickness="1">
                                                   <Telerik_Windows_Controls_Primitives:LayoutTransformControl x:Name="PageContainer" Content="{Binding PageRoot}" IsTabStop="False" LayoutTransform="{Binding PageTransform}"/>
                                               </Border>
                                           </ScrollViewer>
                                           <my:DialogBox x:Name="ViewerProgressMessage">
                                               <my:DialogBox.Visibility>
                                                   <Binding Path="IsInProgress">
                                                       <Binding.Converter>
                                                           <my:VisibilityConverter/>
                                                       </Binding.Converter>
                                                   </Binding>
                                               </my:DialogBox.Visibility>
                                               <Grid Margin="20">
                                                   <Grid.RowDefinitions>
                                                       <RowDefinition/>
                                                       <RowDefinition Height="Auto"/>
                                                   </Grid.RowDefinitions>
                                                   <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding ProgressMessage}"/>
                                                   <telerik:RadProgressBar Grid.Row="1" Maximum="100">
                                                       <telerik:StyleManager.Theme>
                                                           <telerik:Office_BlackTheme/>
                                                       </telerik:StyleManager.Theme>
                                                       <telerik:RadProgressBar.Style>
                                                           <Style TargetType="{x:Type telerik:RadProgressBar}">
                                                               <Setter Property="IsIndeterminate" Value="True"/>
                                                               <Setter Property="Height" Value="10"/>
                                                               <Setter Property="Margin" Value="0,10,0,0"/>
                                                               <Setter Property="IsTabStop" Value="False"/>
                                                           </Style>
                                                       </telerik:RadProgressBar.Style>
                                                   </telerik:RadProgressBar>
                                               </Grid>
                                           </my:DialogBox>
                                           <TextBox x:Name="ViewerError" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="White" BorderThickness="0" FontFamily="Verdana" Foreground="Gray" Padding="20" Text="{Binding Error}" TextAlignment="Center" TextWrapping="Wrap" IsReadOnly="True">
                                               <TextBox.Visibility>
                                                   <Binding Path="HasError">
                                                       <Binding.Converter>
                                                           <my:VisibilityConverter/>
                                                       </Binding.Converter>
                                                   </Binding>
                                               </TextBox.Visibility>
                                           </TextBox>
                                           <my:DialogBox x:Name="ExportDialog">
                                               <my:DialogBox.Visibility>
                                                   <Binding Path="ShowExportDialog">
                                                       <Binding.Converter>
                                                           <my:VisibilityConverter/>
                                                       </Binding.Converter>
                                                   </Binding>
                                               </my:DialogBox.Visibility>
                                               <Grid Width="300" Height="120">
                                                   <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
                                                       <Grid.RowDefinitions>
                                                           <RowDefinition Height="70"/>
                                                           <RowDefinition Height="50"/>
                                                       </Grid.RowDefinitions>
                                                       <StackPanel VerticalAlignment="Bottom" Grid.Row="0" Orientation="Vertical">
                                                           <TextBlock HorizontalAlignment="Center" FontWeight="Bold" Text="{Binding ExportProgress}"/>
                                                           <telerik:RadProgressBar x:Name="ExportProgressBar" HorizontalAlignment="Center" Width="260" Maximum="100">
                                                               <telerik:StyleManager.Theme>
                                                                   <telerik:Office_BlackTheme/>
                                                               </telerik:StyleManager.Theme>
                                                               <telerik:RadProgressBar.Style>
                                                                   <Style TargetType="{x:Type telerik:RadProgressBar}">
                                                                       <Setter Property="IsIndeterminate" Value="True"/>
                                                                       <Setter Property="Height" Value="10"/>
                                                                       <Setter Property="Margin" Value="0,10,0,0"/>
                                                                       <Setter Property="IsTabStop" Value="False"/>
                                                                   </Style>
                                                               </telerik:RadProgressBar.Style>
                                                           </telerik:RadProgressBar>
                                                       </StackPanel>
                                                       <telerik:RadButton VerticalAlignment="Center" Width="100" Content="Cancel" Grid.Row="2" Command="{Binding CancelExportCommand}">
                                                           <telerik:StyleManager.Theme>
                                                               <telerik:Office_BlackTheme/>
                                                           </telerik:StyleManager.Theme>
                                                       </telerik:RadButton>
                                                   </Grid>
                                               </Grid>
                                           </my:DialogBox>
                                       </Grid>
                                   </Border>
                               </Border>
                           </Grid>
                           <Grid Grid.Row="5">
                               <Grid.ColumnDefinitions>
                                   <ColumnDefinition Width="*"/>
                                   <ColumnDefinition Width="Auto"/>
                               </Grid.ColumnDefinitions>
                               <StackPanel VerticalAlignment="Center" Grid.Column="1" Orientation="Horizontal">
                                   <telerik:RadSlider VerticalAlignment="Center" Width="200" IsEnabled="True" Maximum="100" Minimum="-100" SmallChange="10" EnableSideTicks="True" HandlesVisibility="Visible">
                                       <telerik:RadSlider.Value>
                                           <Binding Path="Zoom" Mode="TwoWay">
                                               <Binding.Converter>
                                                   <my:ScaleFactorConverter/>
                                               </Binding.Converter>
                                           </Binding>
                                       </telerik:RadSlider.Value>
                                       <telerik:StyleManager.Theme>
                                           <telerik:Office_BlackTheme/>
                                       </telerik:StyleManager.Theme>
                                   </telerik:RadSlider>
                                   <telerik:RadComboBox IsTabStop="False">
                                       <telerik:StyleManager.Theme>
                                           <telerik:Office_BlackTheme/>
                                       </telerik:StyleManager.Theme>
                                       <telerik:RadComboBox.Style>
                                           <Style TargetType="{x:Type telerik:RadComboBox}">
                                               <Setter Property="Margin" Value="10,0,3,0"/>
                                               <Setter Property="Width" Value="70"/>
                                               <Setter Property="HorizontalAlignment" Value="Center"/>
                                               <Setter Property="VerticalAlignment" Value="Center"/>
                                               <Setter Property="IsEditable" Value="True"/>
                                               <Setter Property="IsTextSearchEnabled" Value="False"/>
                                               <Setter Property="MaxDropDownHeight" Value="300"/>
                                               <Setter Property="ItemsSource">
                                                   <Setter.Value>
                                                       <Binding Path="AvailableZoomValues">
                                                           <Binding.Converter>
                                                               <my:ZoomConverter/>
                                                           </Binding.Converter>
                                                       </Binding>
                                                   </Setter.Value>
                                               </Setter>
                                               <Setter Property="Text">
                                                   <Setter.Value>
                                                       <Binding Path="Zoom" Mode="TwoWay">
                                                           <Binding.Converter>
                                                               <my:ZoomConverter/>
                                                           </Binding.Converter>
                                                       </Binding>
                                                   </Setter.Value>
                                               </Setter>
                                           </Style>
                                       </telerik:RadComboBox.Style>
                                   </telerik:RadComboBox>
                               </StackPanel>
                           </Grid>
                       </Grid>
                   </Border>
               </Border>
           </Grid>
       </ControlTemplate>

Thanks much,
~Boots
Ristogod
Top achievements
Rank 2
 answered on 25 Jan 2012
8 answers
802 views
I'm creating a project in VisualStudio 2005 that uses a WebForms ReportViewer.  It runs just fine locally when debugging with VS.  I deployed it to a server and can bring up the page with the ReportViewer just fine.  And I know it's connecting to the database OK because one of the parameters populates via a stored procedure, and quite quickly.  The stored procedure that drives the report itself also should return quickly - it does when I run it directly with the parameters the report would send it.  But when I try to run the report it hangs for about 30 seconds and then displays this:
An error has occured while processing Report '': 
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. 


Steve
Telerik team
 answered on 25 Jan 2012
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?