Telerik Forums
Reporting Forum
1 answer
122 views
Hi,

I'm trying to implement a dynamic graph with BarSeries, where I do not know how many bars I really have at design time. I add 10 bars programmatically and indicate with the help of an caption, if a bar should be shown or not. But if I set a bar as not visible, there is a gap between the bars.

Is it possible to totally remove the bar from the graph at runtime, when the caption is NULL?
Hinata
Top achievements
Rank 1
 answered on 23 Sep 2014
16 answers
1.8K+ views
I created a report in the Report Designer and saved it as the .trdx file. I now want to hand off the report to the developer to integrate into our application and finish the last few parts of the report. When the developer opens the file in Visual Studio 2012 he only sees the XML. How do I import the report from the .trdx into Visual Studio 2012 so the report can be modified/updated and integrated with the application? 

So for example, when the developer creates a new report in VS2012 he gets the view similar to what I see in Report Designer. When I give him the .trdx file, he cannot get that same view, just the XML. 
Iana Tsolova
Telerik team
 answered on 23 Sep 2014
3 answers
122 views
I have a crosstab that is summarized the way the client wants with one exception. They want a subtotal by one of the groupings from an inner grouping. Below is an example. They have the Product Brand, Product Number and Unit of Measure in the crosstab summarized as they wanted. Now, they want to subtotal the Unit of Measure for the Product Brand. I have put a prototype I did in Excel below. I added the Total 25 kg and Total MT manually. I have highlighted where the totals are coming from.

My question, is this even possible in a crosstab report? I have tried to find something in the forum but no luck so far.



Thank you,
ROD>
Rod
Top achievements
Rank 1
 answered on 23 Sep 2014
3 answers
305 views
Hello Telerik team,

in my report I have to build more than one table dynamically. I want to display one table for each item of a list and I fetch the data from another source. I've looked in the designer how a table is build that will display a list and it's content row by row for every item.

So here I have build my code in the initialization:

protected void Report_Load()
        {
            this.DataSource = this.obj;
 
            #region Generierung der Komponenten-Tabellen
            // Für jede Komponentengruppe müssen wir eine Tabelle im Report dynamisch erstellen.
            int cgid = 0; // Component Group ID
            foreach (PRODUKTKOMPONENTENGRUPPE componentGroup in this.obj.Lizenz.PRODUKTVERSION.PRODUKTKOMPONENTENGRUPPE.OrderBy(x => x.SortNo))
            {
                TextBox lComponentGroup = new TextBox() // Komponentengruppe - Überschrift
                {
                    Name = "lComponentGroup" + cgid.ToString(),
                    Location = new PointU(Unit.Cm(cgid * 2), Unit.Cm(0)), // Location anhand ID im Panel
                    Size = new SizeU(LicenseReport.MaxWidth, Unit.Cm(0.5)),
                    Value = componentGroup.Name + ":"
                };
                lComponentGroup.Style.Font.Italic = true;
                lComponentGroup.Style.BorderColor.Top = Color.Gray;
                lComponentGroup.Style.BorderStyle.Top = BorderType.Outset;
                lComponentGroup.Style.VerticalAlign = VerticalAlign.Middle;
                this.pComponentGroups.Items.Add(lComponentGroup);
 
                //// Die Tabelle für eine Komponentengruppe:
                Table tComponentGroup = new Table() // Tabelle
                {
                    Name = "tComponentGroup" + cgid.ToString(),
                    Location = new PointU(Unit.Cm(0), lComponentGroup.Location.Y + lComponentGroup.Size.Height),
                    Size = new SizeU(LicenseReport.MaxWidth, Unit.Cm(1))
                };
                tComponentGroup.Body.Columns.AddRange(new TableBody.ColumnCollection() // Spalten erstellen und Breiten setzen
                {
                    new TableBodyColumn(LicenseReport.MaxWidth / 16 * 4),
                    new TableBodyColumn(LicenseReport.MaxWidth / 16 * 7),
                    new TableBodyColumn(LicenseReport.MaxWidth / 16 * 2.5),
                    new TableBodyColumn(LicenseReport.MaxWidth / 16 * 2.5),
                }); // row width
 
                // Controls für die Spaltenköpfe erstellen und die Spaltenköpfe mit ihnen füllen:
 
                TextBox tbComponentColumnKey = new TextBox()
                {
                    Name = "tbComponentColumnKey" + cgid.ToString(),
                    Size = new SizeU(tComponentGroup.Body.Columns[0].Width, Unit.Cm(0.5)),
                    Value = "Schlüssel"
                };
                tbComponentColumnKey.Style.Font.Bold = true;
                tComponentGroup.Items.Add(tbComponentColumnKey);
                tComponentGroup.ColumnGroups.Add(new TableGroup() { ReportItem = tbComponentColumnKey });
 
                TextBox tbComponentColumnName = new TextBox()
                {
                    Name = "tbComponentColumnName" + cgid.ToString(),
                    Size = new SizeU(tComponentGroup.Body.Columns[1].Width, Unit.Cm(0.5)),
                    Value = "Name"
                };
                tbComponentColumnName.Style.Font.Bold = true;
                tComponentGroup.Items.Add(tbComponentColumnName);
                tComponentGroup.ColumnGroups.Add(new TableGroup() { ReportItem = tbComponentColumnName });
 
                TextBox tbComponentColumnUnitPrice = new TextBox()
                {
                    Name = "tbComponentColumnUnitPrice" + cgid.ToString(),
                    Size = new SizeU(tComponentGroup.Body.Columns[2].Width, Unit.Cm(0.5)),
                    Value = "Stückpreis"
                };
                tbComponentColumnUnitPrice.Style.Font.Bold = true;
                tComponentGroup.Items.Add(tbComponentColumnUnitPrice);
                tComponentGroup.ColumnGroups.Add(new TableGroup() { ReportItem = tbComponentColumnUnitPrice });
 
                TextBox tbComponentColumnTotalPrice = new TextBox()
                {
                    Name = "tbComponentColumnTotalPrice" + cgid.ToString(),
                    Size = new SizeU(tComponentGroup.Body.Columns[3].Width, Unit.Cm(0.5)),
                    Value = "Preis"
                };
                tbComponentColumnTotalPrice.Style.Font.Bold = true;
                tComponentGroup.Items.Add(tbComponentColumnTotalPrice);
                tComponentGroup.ColumnGroups.Add(new TableGroup() { ReportItem = tbComponentColumnTotalPrice });
 
 
                tComponentGroup.Body.Rows.Add(new TableBodyRow(Unit.Cm(0.5))); // Zeilen erstellen / row height
                // (Wir erstellen nur eine Reihe die dynamisch für jedes Item in die Tabelle angefügt wird)
 
                // Controls erstellen, und Zeilen mit Controls füllen:
 
                TextBox tbComponentCellKey = new TextBox()
                {
                    Name = "tbComponentCellKey" + cgid.ToString(),
                    Size = new SizeU(tComponentGroup.Body.Columns[0].Width, Unit.Cm(0.5)),
                    Value = @"=Key"
                };
                tComponentGroup.Items.Add(tbComponentCellKey);
                tComponentGroup.Body.SetCellContent(0, 0, tbComponentCellKey);
 
                TextBox tbComponentCellName = new TextBox()
                {
                    Name = "tbComponentCellName" + cgid.ToString(),
                    Size = new SizeU(tComponentGroup.Body.Columns[0].Width, Unit.Cm(0.5)),
                    Value = @"=Name"
                };
                tComponentGroup.Items.Add(tbComponentCellName);
                tComponentGroup.Body.SetCellContent(0, 0, tbComponentCellName);
 
                TextBox tbComponentCellUnitPrice = new TextBox()
                {
                    Name = "tbComponentCellUnitPrice" + cgid.ToString(),
                    Size = new SizeU(tComponentGroup.Body.Columns[0].Width, Unit.Cm(0.5)),
                    Value = @"=UnitPrice"
                };
                tComponentGroup.Items.Add(tbComponentCellUnitPrice);
                tComponentGroup.Body.SetCellContent(0, 0, tbComponentCellUnitPrice);
 
                TextBox tbComponentCellTotalPrice = new TextBox()
                {
                    Name = "tbComponentCellTotalPrice" + cgid.ToString(),
                    Size = new SizeU(tComponentGroup.Body.Columns[0].Width, Unit.Cm(0.5)),
                    Value = @"=TotalPrice"
                };
                tComponentGroup.Items.Add(tbComponentCellKey);
                tComponentGroup.Body.SetCellContent(0, 0, tbComponentCellKey);
 
                TableGroup tgComponentDetailGroup = new TableGroup() // Detailgruppe für den dynamischen Teil (notwendig)
                {
                    Name = "DetailGroup"
                };
                tgComponentDetailGroup.Groupings.Add(new Grouping(null));
                tComponentGroup.RowGroups.Add(tgComponentDetailGroup);
 
                // Zum Panel hinzufügen und Daten anbinden:
                this.pComponentGroups.Items.Add(tComponentGroup);
                tComponentGroup.DataSource = this.obj.Komponenten.Where(x => x.GroupName.Equals(componentGroup.Name)).OrderBy(x => x.SortNo);
 
                cgid++;
            }
            this.pComponentGroups.Height = Unit.Cm(cgid * 2);
            this.pComponentGroups.Style.BackgroundColor = Color.Transparent;
            #endregion
        }

I call this method on load of the report, this.obj is my source for the whole report and so on. This passes without errors and when I debugged it, everything is attached right as I want it, the question is just, will this code cause any problems?

Because even when I'm sure, after the page is loaded and the AJAX tries to get the report into the window I get this: 
The full stack trace:
[NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.]
Telerik.Reporting.Processing.Table.ForEachCell(Action`1 action) +272
Telerik.Reporting.Processing.Table.MeasureDataItemContent(IMeasureContext context, SizeRF availableClientSize) +428
Telerik.Reporting.Processing.DataItem.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +178
Telerik.Reporting.Processing.LayoutElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +439
Telerik.Reporting.Processing.VisualElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +204
Telerik.Reporting.Processing.ProcessingElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +146
Telerik.Reporting.Processing.LayoutElement.Measure(IMeasureContext context, SizeRF availableSize) +192
Telerik.Reporting.Processing.AbsolutePositionLayout.MeasureChildItems(IMeasureContext context, SizeRF availableClientSize) +225
Telerik.Reporting.Processing.AbsolutePositionLayout.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +86
Telerik.Reporting.Processing.Panel.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +196
Telerik.Reporting.Processing.LayoutElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +439
Telerik.Reporting.Processing.VisualElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +204
Telerik.Reporting.Processing.ProcessingElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +146
Telerik.Reporting.Processing.LayoutElement.Measure(IMeasureContext context, SizeRF availableSize) +192
Telerik.Reporting.Processing.AbsolutePositionLayout.MeasureChildItems(IMeasureContext context, SizeRF availableClientSize) +225
Telerik.Reporting.Processing.AbsolutePositionLayout.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +86
Telerik.Reporting.Processing.ReportSectionBase.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +190
Telerik.Reporting.Processing.LayoutElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +439
Telerik.Reporting.Processing.VisualElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +204
Telerik.Reporting.Processing.ProcessingElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +146
Telerik.Reporting.Processing.LayoutElement.Measure(IMeasureContext context, SizeRF availableSize) +192
Telerik.Reporting.Processing.StackLayout.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +557
Telerik.Reporting.Processing.Group.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +209
Telerik.Reporting.Processing.LayoutElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +439
Telerik.Reporting.Processing.VisualElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +204
Telerik.Reporting.Processing.ProcessingElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +146
Telerik.Reporting.Processing.LayoutElement.Measure(IMeasureContext context, SizeRF availableSize) +192
Telerik.Reporting.Processing.StackLayout.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +557
Telerik.Reporting.Processing.Report.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +298
Telerik.Reporting.Processing.LayoutElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +439
Telerik.Reporting.Processing.VisualElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +204
Telerik.Reporting.Processing.ProcessingElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +146
Telerik.Reporting.Processing.LayoutElement.Measure(IMeasureContext context, SizeRF availableSize) +192
Telerik.Reporting.Processing.SubReport.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +141
Telerik.Reporting.Processing.LayoutElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +439
Telerik.Reporting.Processing.VisualElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +204
Telerik.Reporting.Processing.ProcessingElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +146
Telerik.Reporting.Processing.LayoutElement.Measure(IMeasureContext context, SizeRF availableSize) +192
Telerik.Reporting.Processing.AbsolutePositionLayout.MeasureChildItems(IMeasureContext context, SizeRF availableClientSize) +225
Telerik.Reporting.Processing.AbsolutePositionLayout.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +86
Telerik.Reporting.Processing.ReportSectionBase.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +190
Telerik.Reporting.Processing.LayoutElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +439
Telerik.Reporting.Processing.VisualElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +204
Telerik.Reporting.Processing.ProcessingElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +146
Telerik.Reporting.Processing.LayoutElement.Measure(IMeasureContext context, SizeRF availableSize) +192
Telerik.Reporting.Processing.StackLayout.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +557
Telerik.Reporting.Processing.Group.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +209
Telerik.Reporting.Processing.LayoutElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +439
Telerik.Reporting.Processing.VisualElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +204
Telerik.Reporting.Processing.ProcessingElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +146
Telerik.Reporting.Processing.LayoutElement.Measure(IMeasureContext context, SizeRF availableSize) +192
Telerik.Reporting.Processing.StackLayout.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +557
Telerik.Reporting.Processing.Report.MeasureContent(IMeasureContext context, SizeRF availableClientSize) +298
Telerik.Reporting.Processing.LayoutElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +439
Telerik.Reporting.Processing.VisualElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +204
Telerik.Reporting.Processing.ProcessingElement.MeasureCore(IMeasureContext context, SizeRF availableSize) +146
Telerik.Reporting.Processing.LayoutElement.Measure(IMeasureContext context, SizeRF availableSize) +192
Telerik.Reporting.Processing.LayoutElement.MeasureElement(LayoutElement elementToMeasure, IMeasureContext context) +167
Telerik.Reporting.BaseRendering.RenderingExtensionBase.MeasureReportCore(Report report, IMeasureContext measureContext) +54
Telerik.Reporting.BaseRendering.RenderingExtensionBase.MeasureReport(Report report) +134
Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback) +791
Telerik.Reporting.Processing.ReportProcessor.CountPages(IList`1 reports, IRenderingContext renderingContext, Hashtable deviceInfo, ExtensionInfo extensionInfo, CreateStream createStreamCallback) +1001
Telerik.Reporting.Processing.ReportProcessor.RenderCore(ExtensionInfo extensionInfo, IList`1 reports, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback) +1520
Telerik.Reporting.Processing.ReportProcessor.RenderCore(String format, IList`1 reports, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback) +155
Telerik.ReportViewer.WebForms.ReportPageOperation.RenderReport(String format, IList`1 processingReports, Hashtable deviceInfo, IRenderingContext renderingContext) +234
Telerik.ReportViewer.WebForms.ReportRenderOperation.PerformOperationOverride() +622
Telerik.ReportViewer.WebForms.ReportPageOperation.PerformOperationOverride() +214
Telerik.ReportViewer.WebForms.HandlerOperation.PerformOperation(HttpContext context, ICacheManager cacheManager) +115
Telerik.ReportViewer.WebForms.BasicHandler.ProcessRequest(HttpContext context) +438
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +913
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165


This is caused by the 2nd request on the AJAX call, I've no idea how to debug it, please can you take a look at it?
Martin
Top achievements
Rank 1
 answered on 23 Sep 2014
1 answer
484 views
So I have 2 tables within the Details section of my report.  What I want to do is filter the tables so that it only shows the Data for the Item that is currently "Active" within the group.  I'm not sure if I'm explaining it well enough so here is an example that might clarify it.  

Let's say you run a Series of Stores broken up into multiple Divisions with each division having X stores with Y Employees.  You want to show the number of Positive and Negative Feedback Results for each employee.  

You setup the Grouping like so:

Division Group
    Store Group
        Employee Group
            Details.  

Within Details you want to show two different sections.  The first section shows the Positive Feedback, and the Second section shows the Negative Feedback. 

I wasn't sure how to do this with out setting up Tables or CrossTabs so I've opted for tables.  I have setup two of them within the Details section and set the first to Filter on Positive Feedback and the second to filter on Negative Feedback.  What I also need to do is to Filter it by the Employee who is being generated within the group.  

Is this even possible with Client Side reports?  If so, can someone point me in the right Direction.  I've tried looking in the filters section, but I can't find anything that Deals with the groups specifically.  




Nasko
Telerik team
 answered on 23 Sep 2014
1 answer
704 views
Dear all,

We have a problem with Telerik Reporting:
We' re trying to create a report which can grow to multiple pages, but the header section (containing multiple data from database, currently on a crosstab) have to appear on every page of the report.

It's clear that we cannot place these header data to page header, since it cannot contain databound (from dataset) items.

But how can we achieve this functionality?

Thanks,
Peter
Stef
Telerik team
 answered on 22 Sep 2014
3 answers
166 views
Hello everybody

I'm trying to print labels using Telerik.ReportProcessor class and PrintReport() method. It's working almost perfect. But I got one problem: Everytime I try to print a label (only one), it prints two labels. If I try to print 3 labels, it prints 6. It prints always the double of the number of labels I'm trying to print. I tried to resize it to 10px height and 10px width because I thought it's too big. But that didn't help. Doesn't matter how big the label is, it always prints the double.
You can see my C# code here:

PrinterSettings printerSettings = new PrinterSettings();
printerSettings.PrinterName = @"\\bbfs\LA42";

PrintController standardPrintController = new StandardPrintController();

ReportProcessor reportProcessor = new ReportProcessor();
reportProcessor.PrintController = standardPrintController;
InstanceReportSource instanceReportSource = new InstanceReportSource();
instanceReportSource.ReportDocument = myReport;
reportProcessor.PrintReport(instanceReportSource, printerSettings);

Did anyone ever had that problem before or does anyone know the solution? I'm getting stuck on this, it's really annoying and a waste of labels :)

Hope someone can help me.

Regards,
Roman
KS
Top achievements
Rank 1
 answered on 22 Sep 2014
1 answer
87 views
I've discovered that if an XML field name has dashes in it, that Telerik reports can't read the full field name.  For example, if I have 'First-Name', the error generated says it can't find 'First'.  Is there a way around this, by chance?
Stef
Telerik team
 answered on 22 Sep 2014
3 answers
317 views
Hi Everyone,

I have a requirement to export the grid data to excel sheet(XLSX). Grid may have row details.

Which Telerik API is suitable for this requirement( Reporting APIs or any other).

And even i would like extend this export functionality to export in PDF format.

Please provide me the details to start using Telerik API's to make report generation success :)

Thanks,
Sharath
Stef
Telerik team
 answered on 22 Sep 2014
3 answers
566 views
Hi all

I am working on telerik reporting and follow the guide: http://www.telerik.com/help/reporting/html5-report-viewer-howto-custom-parameters.html.


In the telerik designer, i create data source that call store procedure with parameter (@BranchId int). I also create a Report Parameter BranchId (int)
 so i assign store procedue paramter equals the report paramter.

In java script i pass report parameter as the above tutorial, but when i run the program it just give me:  Procedure or function 'GetProductBranch' expects parameter '@BranchId', which was not supplied.

Any advice please let me know

Thanks
Phuc
Top achievements
Rank 1
 answered on 22 Sep 2014
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?