Telerik Forums
Reporting Forum
1 answer
250 views

I know that I can output reports to separate Excel tabs using a Report Book, but that's not a good solution when data dynamically determines how many tabs your report should output.  For example, I have an invoice report that outputs in the following group hierarchy.

[1] Invoice Summary (new tab)
[1 to Many] Facility/Department
    Summary (new tab)
    Detail (new tab)

Ideally, there would be a report property to export Excel in a mode similar to the Web output, where only explicit page breaks result in new tabs.  I cannot believe that isn't a more common request.  My clients constantly want summary data paired with detail data.  If they said data is in the same Excel tab, converting the detail data to a table, de-merges and re-sizes all the columns, which is a difficult to use, ugly mess.

Nasko
Telerik team
 answered on 08 Feb 2016
1 answer
91 views

I have a report with a stored procedure for a datasource, returning 196 rows, which contain current month and YTD sums of database fields.  I want to generate a column graph that displays 6 of these sum fields for all 196 rows.  Is it possible to display the sum aggregate function result of a field as a column in the graph?  For instance, Column1 would be the name of a field in my datasource.  I want to display the sum of all 196 Column1 fields as a column in the graph.  I have each of the 6 columns as GraphGroups and as BarSeries objects.  I think it's trying to graph values from every row, but I only want one entry, the sum.  This is my first Telerik report and graph.  Any help would be appreciated.

             // 
            // graphMonthGrandTotals
            // 
            graphGroup1.Name = "categoryGroup";
            this.graphMonthGrandTotals.CategoryGroups.Add(graphGroup1);
            this.graphMonthGrandTotals.CoordinateSystems.Add(this.cartesianCoordinateSystem1);
            this.graphMonthGrandTotals.DataSource = this.sqlDataSource;
            this.graphMonthGrandTotals.Legend.Style.LineColor = System.Drawing.Color.LightGray;
            this.graphMonthGrandTotals.Legend.Style.LineWidth = Telerik.Reporting.Drawing.Unit.Inch(0D);
            this.graphMonthGrandTotals.Location = new Telerik.Reporting.Drawing.PointU(Telerik.Reporting.Drawing.Unit.Inch(0.60000002384185791D), Telerik.Reporting.Drawing.Unit.Inch(1.4659316539764404D));
            this.graphMonthGrandTotals.Name = "graphMonthGrandTotals";
            this.graphMonthGrandTotals.PlotAreaStyle.LineColor = System.Drawing.Color.LightGray;
            this.graphMonthGrandTotals.PlotAreaStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Inch(0D);
            this.graphMonthGrandTotals.Series.Add(this.barSeries1);
            this.graphMonthGrandTotals.Series.Add(this.barSeries2);
            this.graphMonthGrandTotals.Series.Add(this.barSeries3);
            this.graphMonthGrandTotals.Series.Add(this.barSeries4);
            this.graphMonthGrandTotals.Series.Add(this.barSeries5);
            this.graphMonthGrandTotals.Series.Add(this.barSeries6);
            graphGroup7.ChildGroups.Add(graphGroup2);
            graphGroup7.Groupings.Add(new Telerik.Reporting.Grouping("= Fields.Column1"));
            graphGroup7.Name = "column1Group";
            graphGroup7.Sortings.Add(new Telerik.Reporting.Sorting("= Fields.Column1", Telerik.Reporting.SortDirection.Asc));
            graphGroup6.ChildGroups.Add(graphGroup7);
            graphGroup6.Groupings.Add(new Telerik.Reporting.Grouping("= Fields.Column2"));
            graphGroup6.Name = "column2Group";
            graphGroup6.Sortings.Add(new Telerik.Reporting.Sorting("= Fields.Column2", Telerik.Reporting.SortDirection.Asc));
            graphGroup5.ChildGroups.Add(graphGroup6);
            graphGroup5.Groupings.Add(new Telerik.Reporting.Grouping("= Fields.Column3"));
            graphGroup5.Name = "column3Group";
            graphGroup5.Sortings.Add(new Telerik.Reporting.Sorting("= Fields.Column3", Telerik.Reporting.SortDirection.Asc));
            graphGroup4.ChildGroups.Add(graphGroup5);
            graphGroup4.Groupings.Add(new Telerik.Reporting.Grouping("= Fields.Column4"));
            graphGroup4.Name = "column4Group";
            graphGroup4.Sortings.Add(new Telerik.Reporting.Sorting("= Fields.Column4", Telerik.Reporting.SortDirection.Asc));
            graphGroup3.ChildGroups.Add(graphGroup4);
            graphGroup3.Groupings.Add(new Telerik.Reporting.Grouping("= Fields.Column5"));
            graphGroup3.Name = "column5Group";
            graphGroup3.Sortings.Add(new Telerik.Reporting.Sorting("= Fields.Column5", Telerik.Reporting.SortDirection.Asc));
            this.graphMonthGrandTotals.SeriesGroups.Add(graphGroup3);
            this.graphMonthGrandTotals.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Inch(4.9000000953674316D), Telerik.Reporting.Drawing.Unit.Inch(2.5250000953674316D));
            graphTitle1.Position = Telerik.Reporting.GraphItemPosition.TopCenter;
            graphTitle1.Style.LineColor = System.Drawing.Color.LightGray;
            graphTitle1.Style.LineWidth = Telerik.Reporting.Drawing.Unit.Inch(0D);
            graphTitle1.Text = "Showing Month Grand Totals";
            this.graphMonthGrandTotals.Titles.Add(graphTitle1);

            this.barSeries1.CategoryGroup = graphGroup1;
            this.barSeries1.CoordinateSystem = this.cartesianCoordinateSystem1;
            this.barSeries1.DataPointLabel = "Column1";
            this.barSeries1.DataPointLabelStyle.Visible = false;
            this.barSeries1.DataPointStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Inch(0D);
            this.barSeries1.DataPointStyle.Visible = true;
            this.barSeries1.LegendItem.Value = "Column1";
            this.barSeries1.Name = "barSeries1";
            this.barSeries1.SeriesGroup = graphGroup2;
            this.barSeries1.Y = "= Sum(Fields.Column1)";

Nasko
Telerik team
 answered on 08 Feb 2016
1 answer
112 views

I'm trying to create a calendar report that makes use of 31 daily sub reports to display a line chart for each day of the month.

The issue I'm having is that to the bottom and left of the sub reports there is a half centimeter gap that I just can't get rid of; I assume it's space that's being reserved for the axis labels/scales (which I'm not displaying). The chart conforms to the very edge of the sub report at the top/right, but I can't get the bottom/left to behave the same.

Is there any way to get rid of that gap? I've scoured the report XML for references to padding or margins and set any I found to zero, and I've also set the axis scales/labels to not visible, but to no avail. I've attached an image in case my explanation isn't clear.

Peadar
Top achievements
Rank 1
 answered on 08 Feb 2016
6 answers
794 views
I have a sheet of labels that has 2 labels across and 4 labels down the page. When I try to create the label, I select the correct label size from the selection of labels. When I try to preview the labels, they are all printing down the page and ignoring the second column of labels.

How can I make it print on both columns of labels, instead of only the first column?
Stef
Telerik team
 answered on 08 Feb 2016
14 answers
463 views
Hi,

How would I properly format a very long report (one record spans multiple pages, with one section containing a table with multiple records) to work both in Preview and HTML Preview?  I got it to work in HTML Preview, but I don't think I'm creating the report correctly.  Only the middle portion of the report shows up in Preview Mode and in the PDF when I export it from the report viewer.  The report is definitely bigger than the allowed page size.  Also,  I have one section of the report that I should keep in the detail section, as it is multiple records.  It will work fine as far as HTML Preview (it formats correctly in my web application.)

Thanks you.
harsh
Top achievements
Rank 1
 answered on 08 Feb 2016
21 answers
1.9K+ views
========================================================================================================== 
1. My Question:
yes, I have an emergency issue about rendering report as pdf in windows service. Total number of rows: 60k. 
When I try 60k rows, it gives me "Running out of memory" issue. But there is no such issue show up when I try to render 20k rows.
.
==========================================================================================================
My Code:
                var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
                var deviceInfo = new System.Collections.Hashtable();
                Telerik.Reporting.InstanceReportSource instanceReportSource = new Telerik.Reporting.InstanceReportSource();

                instanceReportSource.ReportDocument = report;  // please assume that I set 60 k rows in var of report. 

                Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport(
                    "PDF", instanceReportSource, deviceInfo);

                if (!System.IO.Directory.Exists(this.reportServerInfo.TempExportPath))
                {
                    var pathInfo = System.IO.Directory.CreateDirectory(this.reportServerInfo.TempExportPath);
                }

                string filePath = System.IO.Path.Combine(this.reportServerInfo.TempExportPath, fileName);

                using (System.IO.FileStream fs = new System.IO.FileStream(filePath, System.IO.FileMode.Create))
                {
                    fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
                }

========================================================================================================
Error Track:
ERROR 2013-05-24 12:56:16,106 [41] System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at Telerik.Reporting.Processing.TextBox.Telerik.Reporting.Processing.ILayoutElementContainer.get_Children()
   at Telerik.Reporting.Paging.TextBox.CreateContent(InitializationContext initContext)
   at Telerik.Reporting.Paging.PagingElementBase.Init(LayoutElement source, PagingElementBase parent, IComposition composition, InitializationContext initContext)
   at Telerik.Reporting.Paging.ElementFactory.CreateElement(LayoutElement source, PagingElementBase parent, IComposition composition, InitializationContext initContext)
   at Telerik.Reporting.Paging.PageCompositionBase.CreateElement(LayoutElement source, PagingElementBase parent, InitializationContext initContext)
   at Telerik.Reporting.Paging.PagingElementBase.CreateContent(InitializationContext initContext)
   at Telerik.Reporting.Paging.PagingElementBase.Init(LayoutElement source, PagingElementBase parent, IComposition composition, InitializationContext initContext)
   at Telerik.Reporting.Paging.ElementFactory.CreateElement(LayoutElement source, PagingElementBase parent, IComposition composition, InitializationContext initContext)
   at Telerik.Reporting.Paging.PageCompositionBase.CreateElement(LayoutElement source, PagingElementBase parent, InitializationContext initContext)
   at Telerik.Reporting.Paging.Group.CreateContent(InitializationContext initContext)
   at Telerik.Reporting.Paging.PagingElementBase.Init(LayoutElement source, PagingElementBase parent, IComposition composition, InitializationContext initContext)
   at Telerik.Reporting.Paging.ElementFactory.CreateElement(LayoutElement source, PagingElementBase parent, IComposition composition, InitializationContext initContext)
   at Telerik.Reporting.Paging.PageCompositionBase.CreateElement(LayoutElement source, PagingElementBase parent, InitializationContext initContext)
   at Telerik.Reporting.Paging.Group.CreateContent(InitializationContext initContext)
   at Telerik.Reporting.Paging.PagingElementBase.Init(LayoutElement source, PagingElementBase parent, IComposition composition, InitializationContext initContext)
   at Telerik.Reporting.Paging.ElementFactory.CreateElement(LayoutElement source, PagingElementBase parent, IComposition composition, InitializationContext initContext)
   at Telerik.Reporting.Paging.PageCompositionBase.CreateElement(LayoutElement source, PagingElementBase parent, InitializationContext initContext)
   at Telerik.Reporting.Paging.Group.CreateContent(InitializationContext initContext)
   at Telerik.Reporting.Paging.PagingElementBase.Init(LayoutElement source, PagingElementBase parent, IComposition composition, InitializationContext initContext)
   at Telerik.Reporting.Paging.ElementFactory.CreateElement(LayoutElement source, PagingElementBase parent, IComposition composition, InitializationContext initContext)
   at Telerik.Reporting.Paging.PageCompositionBase.CreateElement(LayoutElement source, PagingElementBase parent, InitializationContext initContext)
   at Telerik.Reporting.Paging.Report.CreateContent(InitializationContext initContext)
   at Telerik.Reporting.Paging.PagingElementBase.Init(LayoutElement source, PagingElementBase parent, IComposition composition, InitializationContext initContext)
   at Telerik.Reporting.Paging.ElementFactory.CreateElement(LayoutElement source, PagingElementBase parent, IComposition composition, InitializationContext initContext)
   at Telerik.Reporting.Paging.PageCompositionBase.CreateElement(LayoutElement source, PagingElementBase parent, InitializationContext initContext)
   at Telerik.Reporting.Paging.PageCompositionBase.CreatePages()
   at Telerik.Reporting.Paging.PagerBase.Telerik.Reporting.Paging.IPager.CreatePages(IPageHandler handler, Report report)
   at Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback)
   at Telerik.Reporting.Processing.ReportProcessor.CountPages(IList`1 reports, IRenderingContext renderingContext, Hashtable deviceInfo, ExtensionInfo extensionInfo, CreateStream createStreamCallback)
   at Telerik.Reporting.Processing.ReportProcessor.RenderCore(ExtensionInfo extensionInfo, IList`1 reports, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback)
   at Telerik.Reporting.Processing.ReportProcessor.ProcessAndRender(String format, ReportSource reportSource, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback)
   at Telerik.Reporting.Processing.ReportProcessor.ProcessAndRenderStateless(String format, ReportSource reportSource, Hashtable deviceInfo, IRenderingContext renderingContext, CreateStream createStreamCallback)
   at Telerik.Reporting.Processing.ReportProcessor.RenderReport(String format, ReportSource reportSource, Hashtable deviceInfo)


Hinata
Top achievements
Rank 1
 answered on 08 Feb 2016
10 answers
575 views
Hi team,
I want to create a report book in my ASP.NET project.
I don't see a report book control in the reporting tool box .
Regards,
Mohammed
BHk
Top achievements
Rank 1
 answered on 05 Feb 2016
5 answers
733 views
Hello,

Here is my problem. I have to do a report who displays delivery order.
This delivery order is on multiple pages.

For each page, i should display something like this :

Page 1 of 2
Page 2 of 2
Page 1 of 1
Page 1 of 3
Page 2 of 3
...

My question is, how could i do to obtain this result ?

Resetting the PageNumber ?
How can i know at runtime the total page number of my delivery order ?

Thanks a lot.
Nasko
Telerik team
 answered on 04 Feb 2016
1 answer
542 views
Hi,

  I want to load the PDF file into Telerik ReportViewer (on IPAD) for getting options like zoom, print, download etc. Is it possible?

Thanks
Katia
Telerik team
 answered on 03 Feb 2016
2 answers
159 views

I have been trying to use breaklines in the HTML Textbox in telerik reports (using Q1 2015 sp1 Telerik version) but 
is not being rendered as a breakline. As you can see in the first attachment (testReport_backend.PNG), I've tried \r\n, \n, replacing < with < and > with &rt; in both textbox and HTML Textbox but in the second attachment (testReport.PNG) the html tags are not being rendered like HTML tags.
What am I missing to make this work?

 

JM
Top achievements
Rank 1
 answered on 02 Feb 2016
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?