Telerik Forums
Reporting Forum
1 answer
316 views

I am using Telerik HTML5 Report Viewer Template where there are options to export PDF,CSV etc. Getting an out of memory exception while exporting to PDF because report has lot of images.

 I am setting DataMember attribute to a method name to fetch report data. DataMember method is called in many instances like when report is being loaded or exported or when previewed.

Is there a mechanism by which I can get the information about what triggered the DataMember method.

For e.g. if Export to PDF is clicked how can I know that Export to PDF has triggered the DataMember method.

I also need suggestion on following stuff.

If I create a custom export to PDF button by modifying Telerik HTML5 Report Viewer Template

1. How can I hook my server side API to that button?

2. How can I pass the report parameters to that API?

 

 

 

Stef
Telerik team
 answered on 19 May 2016
5 answers
216 views
Hi everyone,

i have a report with a page header. But on the first page of the report, the page header should be hidden. So i switched the property "PrintOnFirstPage" for the PageHeader Section to FALSE.

Now on the first page the PageHeader is emtpy (all child elements have been hidden), but the PageHeader itself is still visible. Why? From my point of view it should be completely hidden too. Or has anyone another point of view? ;)

Regards,
Michael
Stef
Telerik team
 answered on 19 May 2016
12 answers
279 views
Hi,

I have a report created using Telerik reporting tool. It displays fine and exports fine as pdf.
But when i export it to rtf (Rich text File) the generated report have fields eaten off or the field details are not displayed completely.

PFA a screen shot of the same

Please help

--Shalini
Kundan
Top achievements
Rank 1
 answered on 19 May 2016
5 answers
2.4K+ views
Hello,

I recently made the mistake of upgrading telerik reports on my desktop PC from 6.2.12.1017 to 6.2.13.110.
My intention was that new projects utilising telerik reports would use the latest build. I do however still need to support older builds that have been deployed to existing customers.
I'm finding that when I attempt to edit an older version of my report whose project references the 6.2.12 build of telerik the report designer no longer works? I get the following error: 
Value cannot be null. Parameter name: instance 

I must be able to support older builds of my software as not all my customers upgrade at the same time so I therefore need to downgrade telerik reports on my system from 6.2.13.110 to 6.2.12.1017 which I hope will fix my issue.
Can somebody point me in the right direction where I can download this specific build so I can reinstall it and begin designing my reports again.

Thanks in advance
Stef
Telerik team
 answered on 18 May 2016
4 answers
113 views

Is Telerik Reporting built on top of an xml foundation?

For example, with rdlc, rdlc files are just xml files.

Are the files which underpin Telerik Reporting xml files, or something different?

 

Thanks

Stef
Telerik team
 answered on 17 May 2016
1 answer
72 views

Is there anyway to print a list of just the columns from that page on a crosstab report?

My report column heading is just a code an I would like to give more detail about that code at the bottom of each page but would only want to explain the codes that have printed on that page. 

For example if I a 2 page report on page 1 the columns that print are ABC, DEF, GHI I would like to print a list after the rows that would look like

ABC - Explanation

DEF- Explanation

GHI - Explanation

I'm not sure if this is possible but I hope my explanation makes some sense.

Thanks

 

Katia
Telerik team
 answered on 16 May 2016
1 answer
295 views
Hello guys, I am trying to configure Telerik Reporting for Html5 in my asp.net mvc 5 application (.Net Framework 4.5). I have another application using asp.net mvc 4 (.net 4.0) that works fine but in mvc 5 and .net 4.5 it fails. I have referenced in my asp.net mvc application the assemblies "Telerik.Reporting" and "Telerik.Reporting.Services.WebApi" (set Copy Local = true) of R2 2016 version of Telerik Reporting. I have configured the handlers in the web.config file too.

In the WebApiConfig.cs file that configure the routes for the web api, I have added the line to configure the routes for telerik reporting api.
public static void Register(HttpConfiguration config)
{
  // Web API routes
  config.MapHttpAttributeRoutes();
 
  config.Routes.MapHttpRoute(
    name: "DefaultApi",
    routeTemplate: "api/{controller}/{id}",
    defaults: new { id = RouteParameter.Optional }
  );
 
  // configure routes for telerik reporting
  Telerik.Reporting.Services.WebApi.ReportsControllerConfiguration.RegisterRoutes(config);
}


The problem is, if I add this line that configure the routes for telerik reporting, I get an error

Could not load file or assembly 'System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'...

If I remove the line, the application runs fine, but when I try to execute a page with a report, I get another error on the report viewer like this:

Error registering the viewer with the service.
No HTTP resource was found that matches the request URI 'http://localhost:54925/Api/Reports/clients'.


Am I missing something? Is it a problem with the version of .net framework? How can I get it working for asp.net mvc 5 and .net framework 4.5?

Thank you.

Stef
Telerik team
 answered on 14 May 2016
7 answers
648 views
Hi Guys

Is there any way to use the Telerik ReportViewer inside an AngularJS app? From what I've read the report viewer, even the HTML version, is still a server side control and needs ASP.NET to work, is that right ? I want to be able to view our telerik reports from a separate web client app.

Help appreciated

Rav
Stef
Telerik team
 answered on 14 May 2016
1 answer
286 views

I have a report that contains a chart and it has category groups that are somewhat long.  I'd like to either specify the max size of these so that it wraps the text down or be able to insert a line break in the Label formula.  I can't seem to figure out how to do that in the editor and was hoping someone else knew how to do it.  See the screen shot attached for an example of the long labels.  The middle one I'd like to at least have as "Shops at Branson Meadows" on one line and Parking Zone 1 on the second.

Katia
Telerik team
 answered on 13 May 2016
6 answers
231 views

How do I display shapes on a map? I have a list of co-ordinates in WKT format that make up simple polygons. I want to fill each polygon with a colour and display it on a map for the report.

Do I use a choropleth, or a ShapeMapSeries, or something else?

I've tried following this documentation and doing it programmatically, but I get this unhelpful error:

An error has occurred while rendering the report: System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Reporting.XamlRendering.DocumentWriting.PrimitiveWriter.WriteText(TextElement textElement)
   at Telerik.Reporting.XamlRendering.DocumentWriting.PrimitiveElementWriter.Visit(TextElement textElement)
   at Telerik.Reporting.Processing.Primitives.TextElement.Accept(PrimitiveElementVisitor visitor)
   at Telerik.Reporting.XamlRendering.DocumentWriting.XamlGraphWriter.Write(PrimitiveElement primitiveElement)
   at Telerik.Reporting.Processing.GraphWriter.<WriteGraphArea>b__4(PrimitiveElement a)
   at Telerik.Reporting.EnumerableExtensions.ForEach[T](IEnumerable`1 source, Action`1 action)
   at Telerik.Reporting.Processing.GraphWriter.WriteGraphArea(GraphArea graphArea)
   at Telerik.Reporting.Processing.GraphWriter.Write(Graph g)
   at Telerik.Reporting.XamlRendering.DocumentWriting.GraphWriter.WriteDataItemContent(LayoutElement element, ElementPageInfo pageInfo)
   at Telerik.Reporting.XamlRendering.DocumentWriting.DataItemWriter.WriteContent(LayoutElement element, ElementPageInfo pageInfo)
   at Telerik.Reporting.XamlRendering.XamlWriter.WriteStartElement(LayoutElement element, ElementPageInfo pageInfo)
   at Telerik.Reporting.BaseRendering.PageHandler.Telerik.Reporting.Paging.IPageHandler.StartElement(LayoutElement element, ElementPageInfo info)
   at Telerik.Reporting.Paging.PageStartElement.AddToPage(IPageHandler handler)
   at Telerik.Reporting.Paging.PageElementLayer.AddToPage(IPageHandler handler)
   at Telerik.Reporting.Paging.PageElementManager.AddToPage(IPageHandler handler)
   at Telerik.Reporting.Paging.PageCompositionBase.AddElementsToPage()
   at Telerik.Reporting.Paging.PageCompositionBase.SendPhysicalPages()
   at Telerik.Reporting.Paging.PageCompositionBase.OutputPage()
   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)

 

Here is an example of the code I'm using:

ObservableCollection<PrettyShape> data = GetTestData();
 
var myReport = new Report();
var detail = new DetailSection { KeepTogether = true };
var testGroup = new MapGroup();
var detailPanel = new Panel
{
    Docking = DockingStyle.Top,
    Size = new SizeU(Unit.Pixel(600), Unit.Pixel(400)),
    Items =
    {
        new Map
        {
            Size = new SizeU(Unit.Pixel(600), Unit.Pixel(450)),
            Location = new PointU(Unit.Pixel(0), Unit.Pixel(50)),
            TileProvider = new GenericTileProvider { UrlTemplate = "url of tile provider goes here - tested in WPF RadMap" },
            Projection = new MercatorProjection(),
            DataSource = data,
            Series =
            {
                new ShapeMapSeries
                {
                    ShapeMapGroup = new ShapeMapGroup(),
                    SeriesGroup = testGroup,
                    ColorData = "=Fields.FillColour",
                    SourceType = new WellKnownTextSourceType { SpatialField = "=Fields.BoundaryPoints" }
                }
        },
        SeriesGroups = { testGroup }
}
detail.Items.Add(detailPanel);
myReport.Items.Add(detail);
 
MyReportViewer.ReportSource = new InstanceReportSource { ReportDocument = myReport };
MyReportViewer.RefreshReport();

 

and here is the data object:

public class PrettyShape
{
  public string BoundaryPoints { get; set; }
  public string FillColour
  {
    get
    {
      //various logic
      return "LimeGreen";
    }
  }
}

 

ObservableCollection<PrettyShape> GetTestData()

{

  var list = new List<PrettyShape>

  {

    new PrettyShape{ BoundaryPoints = "POLYGON ((-22.635025359284 118.120505304517, -22.635025359284 118.103713989258, -22.64653164056320 118.103713989258, -22.64653164056320 118.120505304517))" }

  };

  return new ObservableCollection<PrettyShape>(list);

}

Jeremy
Top achievements
Rank 1
 answered on 13 May 2016
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?