Telerik Forums
Reporting Forum
1 answer
343 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
759 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
137 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
217 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
109 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
246 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
4 answers
516 views
Hi,
I want to know if is possible to open Telerik Report Designer with specific Report as parameter from C#, is that possible?
Thank You
gezim
Top achievements
Rank 1
 answered on 22 Aug 2012
5 answers
340 views
Hi,
  I am new to telerik reporting. I want to generate a grid type layout report like that of a table. And i'm setting the data source programmatically using sql queries at run time. Also i need to hide the columns dynamically at run time and to avoid duplicate rows i'm using groups(Parent and Child groups) I used table control which is meeting almost all my requirements except the hiding property ie., visibility. If  I set the data source for the table at design time the visibility property is functioning well. But when I set the data source at run time, even after  setting the visibility property of the columns(ie., text fields) as false its only shrinking in size and not disappearing in my report. Is there any solution for this issue?
Kindly help me with a solution ASAP.
Thanks.....
Steve
Telerik team
 answered on 22 Aug 2012
1 answer
89 views
Good Day

I am trying to build my report, but the page settings are confusing me.

For instance, I have A4 setting, with margins of 1cm, 1.2cm, 1cm, 1.2 (T,R,B,L) with no padding.

In my reportheader I have a Heading and an image. The image is docked to the right. The page width is set to 12.4cm. If I set it any larger my image is displayed on the next page.

So here is what confuses me: An A4 page has a width of 21cm. Removing the margins (L,R) we have 19cm of space to play in. Why can't I set it to anything more than 12.4cm?

Is there a document or a walk thru that can provide detailed information about sizing?

Update: Using Q2 2012 SP1 6.1.12.820. Visual Studio 2010 Pro.



Thank you
Jaco Hamilton-Attwell
Top achievements
Rank 1
 answered on 22 Aug 2012
1 answer
80 views
When upgrading to the latest version.  I now get several warnings about obsolete items in the designer.vb and designer.cs files.  Is there some way to regenerate those files to get rid of the warnings?
Steve
Telerik team
 answered on 22 Aug 2012
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?