Telerik Forums
Reporting Forum
1 answer
186 views
Hello,

I have run into an issue where a RadComboBox does not display any items when clicked in a WPF 4 application (Reporting Version 5.3.11.1116). The combobox itself lies within a RadToolBar in a ReportViewer. A small sliver of a dropdown is displayed (see image, same width as the RadComboBox) as though there is nothing in it. Even if there were no items to display, I would expect the combobox's dropdown to respect the MinWidth="150" seen below.

<telerik:RadToolBar Grid.Row="0">
    <!--<telerik:RadButton Command="{Binding NavigateBackCommand}" InnerCornerRadius="0" Margin="0,2" Padding="2">
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/NavBack.png"/>
            </Image.Source>
        </Image>
    </telerik:RadButton>
    <telerik:RadButton Command="{Binding NavigateForwardCommand}" InnerCornerRadius="0" Margin="0,2" Padding="2">
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/NavForward.png"/>
            </Image.Source>
        </Image>
    </telerik:RadButton>
    <telerik:RadToolBarSeparator/>-->
    <telerik:RadButton Command="{Binding RefreshReportCommand}" InnerCornerRadius="0" Margin="0,2" Padding="2">
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/Refresh.png"/>
            </Image.Source>
        </Image>
    </telerik:RadButton>
    <telerik:RadToolBarSeparator/>
    <telerik:RadButton Command="{Binding MoveToFirstPageCommand}" InnerCornerRadius="0" Margin="0,2" Padding="2">
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/FirstPage.png"/>
            </Image.Source>
        </Image>
    </telerik:RadButton>
    <telerik:RadButton Command="{Binding MoveToPreviousPageCommand}" InnerCornerRadius="0" Margin="0,2" Padding="2">
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/PrevPage.png"/>
            </Image.Source>
        </Image>
    </telerik:RadButton>
    <telerik:RadToolBarSeparator/>
    <TextBox IsEnabled="{Binding IsMoveToPageEnabled}" Margin="10,0,0,0" MinWidth="30" TextAlignment="Center" Text="{Binding PageNumber, Mode=TwoWay}" VerticalAlignment="Center"/>
    <TextBlock Margin="2,0,10,0" TextAlignment="Center" VerticalAlignment="Center">
            <TextBlock.Text>
                <Binding ConverterParameter="of {0} pages" Path="PageCount">
                    <Binding.Converter>
                        <tr:FormatedNumberConverter/>
                    </Binding.Converter>
                </Binding>
            </TextBlock.Text>
    </TextBlock>
    <telerik:RadToolBarSeparator/>
    <telerik:RadButton Command="{Binding MoveToNextPageCommand}" InnerCornerRadius="0" Margin="0,2" Padding="2">
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/NextPage.png"/>
            </Image.Source>
        </Image>
    </telerik:RadButton>
    <telerik:RadButton Command="{Binding MoveToLastPageCommand}" InnerCornerRadius="0" Margin="0,2" Padding="2">
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/LastPage.png"/>
            </Image.Source>
        </Image>
    </telerik:RadButton>
    <telerik:RadToolBarSeparator/>
    <telerik:RadToggleButton Command="{Binding TogglePrintPreviewCommand}" InnerCornerRadius="0" Margin="0,2" Padding="2" Visibility="{TemplateBinding ViewModeToggleVisibility}">
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/PrintPreview.png"/>
            </Image.Source>
        </Image>
    </telerik:RadToggleButton>
    <telerik:RadButton Command="{Binding PrintReportCommand}" InnerCornerRadius="0" Margin="0,2" Padding="2">
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/Print.png"/>
            </Image.Source>
        </Image>
    </telerik:RadButton>
    <telerik:RadToolBarSeparator/>
    <telerik:RadComboBox Height="24"  Margin="1,0" MaxDropDownHeight="300" Padding="2,0" Width="45">
        <telerik:RadComboBox.EmptySelectionBoxTemplate>
            <DataTemplate>
                <Image HorizontalAlignment="Left" Height="16" Visibility="Visible" Width="16">
                    <Image.Source>
                        <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/Export.png"/>
                    </Image.Source>
                </Image>
            </DataTemplate>
        </telerik:RadComboBox.EmptySelectionBoxTemplate>
        <telerik:RadComboBox.ItemTemplate>
            <DataTemplate>
                <TextBlock MinWidth="150" Text="{Binding Description}"/>
            </DataTemplate>
        </telerik:RadComboBox.ItemTemplate>
        <telerik:RadComboBox.SelectionBoxTemplate>
            <DataTemplate>
                <Image HorizontalAlignment="Left" Height="16" Visibility="Visible" Width="16">
                    <Image.Source>
                        <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/Export.png"/>
                    </Image.Source>
                </Image>
            </DataTemplate>
        </telerik:RadComboBox.SelectionBoxTemplate>
        <telerik:StyleManager.Theme>
            <telerik:Office_BlackTheme/>
        </telerik:StyleManager.Theme>
    </telerik:RadComboBox>
    <telerik:RadToolBarSeparator/>
    <telerik:RadToggleButton IsChecked="{Binding IsDocumentMapVisible, Mode=TwoWay}" InnerCornerRadius="0" Margin="0,2" Padding="2">
        <telerik:RadToggleButton.Visibility>
            <Binding Path="HasDocumentMap">
                <Binding.Converter>
                    <tr:VisibilityConverter/>
                </Binding.Converter>
            </Binding>
        </telerik:RadToggleButton.Visibility>
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/DocumentMap.png"/>
            </Image.Source>
        </Image>
    </telerik:RadToggleButton>
    <telerik:RadToggleButton IsChecked="{Binding IsParametersAreaVisible, Mode=TwoWay}" InnerCornerRadius="0" Margin="0,2" Padding="2">
        <telerik:RadToggleButton.Visibility>
            <Binding Path="HasParameters">
                <Binding.Converter>
                    <tr:VisibilityConverter/>
                </Binding.Converter>
            </Binding>
        </telerik:RadToggleButton.Visibility>
        <Image Height="16" Width="16">
            <Image.Source>
                <BitmapImage UriSource="pack://application:,,,/Telerik.ReportViewer.Wpf;component/images/Parameters.png"/>
            </Image.Source>
        </Image>
    </telerik:RadToggleButton>
</telerik:RadToolBar>

I have included the following in a configSection in my app.config to no avail:

<Telerik.Reporting>
    <Extensions>
        <Render>
            <Extension name="IMAGE" description="TIFF Image" visible="false" />
            <Extension name="PDF" description="Adobe Acrobat PDF" visible="true" />
            <Extension name="MHTML" description="Compressed Web Archive" visible="false" />
            <Extension name="XLS" description="Excel" visible="false" />
            <Extension name="CSV" description="Comma Seperated Values" visible="false" />
            <Extension name="RTF" description="Rich Text File (RTF)" visible="false" />
            <Extension name="XPS" description="Microsoft XPS Document" visible="true" />
        </Render>
    </Extensions>
</Telerik.Reporting>

Is there anything apparent that I am missing?

Thanks for your time,

Dane
Steve
Telerik team
 answered on 24 Aug 2012
3 answers
1.9K+ views
Hi,
   I want to have the textbox to be auto-sized. I want the size to grow depends on the value of the textbox. Does this achievable? I can specify the max width, afterwhich it should wrap. How to get these?

Thanks in advance.
Peter
Telerik team
 answered on 24 Aug 2012
1 answer
67 views
Hello All,


I have a report, which mianly needs 3 sections of data.

Can i use the 3 details group in parellelism? namely I need 3 data sets for one report. Is this possible in telerik or not?
 
Steve
Telerik team
 answered on 24 Aug 2012
0 answers
119 views
Hi,

are there any working examples for integrating Telerik Reporting into a Sandboxed/Office365/SharePoint Online environment?

Best regards,
Edmund
Edmund
Top achievements
Rank 1
 asked on 24 Aug 2012
1 answer
309 views

In a report I'm working on we want to display some images based on the value of a field. For that purpose I've created a UserFunction that grabs the image out of our embedded resource pack and returns it.

This is where things get a bit ugly.

Since this is a WPF app, we use BitmapImage for storing embedded image resources. It appears that the PictureBox doesn't support BitmapImage? The exception rendered in the Picturebox is "The given key was not present in the dictionary"

To avoid using BitmapImage I've tried returning the URI to the resource, also to no avail. The URI is prefixed with pack:// and that is apparently an unsupported prefix (according to the exception message.)

Going from BitmapImage to an  actual GDI+ Image is not trivial since we're running a WPF app and I would really like to avoid doing that. Physical paths are also not an option...

Any ideas?

IvanY
Telerik team
 answered on 23 Aug 2012
28 answers
691 views
Hi ... after update to 2012/Q2 i cannot figure out, how to convert my code to your new reportsource system:

protected void BTN_Process_Click(object sender, EventArgs e)
        {
            ReportBook reportbook = new ReportBook();
            ReportViewer1.Report = null
 
            foreach (GridDataItem si in RG_Reports.SelectedItems)
            
                string ReportName = si.OwnerTableView.DataKeyValues[si.ItemIndex]["Report"].ToString();
 
                Type reportType = Type.GetType(Server.UrlDecode(ReportName));
                Telerik.Reporting.Report report = (Telerik.Reporting.Report)Activator.CreateInstance(reportType);
 
                report.ReportParameters["Filter"].Value = Session["FilterTextAsset"];
                report.ReportParameters["FilterExA"].Value = Session["FilterExA"];
                report.ReportParameters["IsActive"].Value = Session["FilterIsCheckedAsset"];
                report.ReportParameters["OrgUnitId"].Value = Request.QueryString["OrgUnitId"];
                report.ReportParameters["AssetId"].Value = Request.QueryString["AssetId"];
                report.ReportParameters["UserId"].Value = Session["UserId"];
                report.ReportParameters["IsInStock"].Value = Session["FilterIsInStockAsset"];
                report.ReportParameters["IsOrder"].Value = Session["FilterIsOrder"];
                 
                report.ReportParameters["Group1"].Value = new string[] { "" };
                report.ReportParameters["Group2"].Value = new string[] { "" };
 
                report.ReportParameters["Sort1"].Value = "";
                report.ReportParameters["Sort2"].Value = "";
 
                reportbook.Reports.Add(report);
            }
 
            if (RG_Reports.SelectedItems.Count != 0)
            {
                reportbook.DocumentName = "Assets";
                ReportViewer1.Report = reportbook;
            }
             
        }

this code doesn't work anymore!

Thank you!
Steve
Telerik team
 answered on 23 Aug 2012
13 answers
110 views
Hi,
I updated the version of the 2008 report for the 2011 version and now the side edges of the panels do not close right ...

see:
http://www.tafner.net.br/quebra.png

IvanY
Telerik team
 answered on 23 Aug 2012
0 answers
175 views
Telerik Reporting:
I have urgent requirement to make a automated reporting system and I am trying to create a report programmatically using telerik.
So, far I was able to create group but not able to add group footer so that I can show sum, avg etc.
My code is:
Telerik.Reporting.TextBox txtGroupHeader = new Telerik.Reporting.TextBox();
            Telerik.Reporting.TextBox txtGroupTotal;// = new Telerik.Reporting.TextBox();
            toggleVisibilityAction1 = new Telerik.Reporting.ToggleVisibilityAction();

            txtGroupHeader.Action = toggleVisibilityAction1;
            toggleVisibilityAction1.DisplayExpandedMark = false;

            // Required for telerik Reporting designer support

            InitializeComponent();

            TableGroup group = new TableGroup();
            Telerik.Reporting.TableGroup tableGroup4 = new Telerik.Reporting.TableGroup();
            Telerik.Reporting.TableGroup tableGroup5 = new Telerik.Reporting.TableGroup();
            group.Name = "Season";
            group.Groupings.AddRange(new Telerik.Reporting.Grouping[] {
            new Telerik.Reporting.Grouping("=Fields.Season")});
            group.Sortings.AddRange(new Telerik.Reporting.Sorting[] {
            new Telerik.Reporting.Sorting("=Fields.Season", Telerik.Reporting.SortDirection.Asc)});

            txtGroupHeader.Name = "txtGroupHeader";
            txtGroupHeader.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Cm(3.9314577579498291D), Telerik.Reporting.Drawing.Unit.Cm(0.43585944175720215D));<br>
            txtGroupHeader.Style.BackgroundColor = System.Drawing.Color.Red;
            txtGroupHeader.Style.BorderStyle.Bottom = Telerik.Reporting.Drawing.BorderType.Solid;
            txtGroupHeader.Style.Color = System.Drawing.Color.White;
            txtGroupHeader.Style.Font.Bold = true;
            txtGroupHeader.StyleName = "";
            txtGroupHeader.Value = "=Fields.Season";
            tableGroup4.Groupings.AddRange(new Telerik.Reporting.Grouping[] {
            new Telerik.Reporting.Grouping(null)});
            group.Sortings.AddRange(new Telerik.Reporting.Sorting[] {
            new Telerik.Reporting.Sorting("=Fields.Season", Telerik.Reporting.SortDirection.Asc)});
            tableGroup4.Name = "Details";
            tableGroup5.Name = "Group1s";
            //group.ChildGroups.Add(tableGroup4);
            //group.ChildGroups.Add(tableGroup5);
            //this.table1.Body.Rows.Add(new Telerik.Reporting.TableBodyRow(Telerik.Reporting.Drawing.Unit.Cm(1)));<br>
            this.table1.Corner.SetCellContent(0, 0, txtGroupHeader);
            this.table1.Items.Add(txtGroupHeader);
            group.ReportItem = txtGroupHeader;
            //Remove the detail group
            TableGroup detailGroup = table1.RowGroups[0];
            table1.RowGroups.Clear();
            //detailGroup.Visible = false;
            toggleVisibilityAction1.Targets.AddRange(new Telerik.Reporting.IToggleVisibilityTarget[] {
            detailGroup});
            //Add the detail group as a child to the AgeGroup (nest it)
            group.ChildGroups.Add(detailGroup);
            table1.RowGroups.Add(group)
;
---------------------

I tried finding help with visual studio generated code but to no avail. Please help as it is urgent.
Ranjan
Top achievements
Rank 1
 asked on 23 Aug 2012
2 answers
90 views
I have a report that has a Table on the left and a Chart on the right.

The Table can grow to any size, which makes the report grow.

So I have tried Anchoring or Docking the Chart to the top and bottom of the report so that it grows as well.

It does grow, but the chart is stretched. It doesn't re-render/re-layout to the new size.

How can I get it to do this?

Using Telerik Reporting 2011 Q3.

Thanks.
Adrian
Top achievements
Rank 1
 answered on 23 Aug 2012
2 answers
228 views
I would like to save the report in XML format to a database and load them in to ReportViewer control at run time.
John North
Top achievements
Rank 1
 answered on 22 Aug 2012
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?