Telerik Forums
Reporting Forum
1 answer
392 views

Hi,

The Telerik HTML5 report viewer has tooltips in the Chart. This works fine in the viewer. After I export the report to PDF the tooltips are not displaying in the PDF document when I hoover my mouse. Is it possible to do? I am aware about the "ViewerRenderToolTips" but I have not found any example how to use it. Could you please help?

Thanks.

 

Mads
Telerik team
 answered on 09 Feb 2021
1 answer
163 views

I have a .net app which uses Telerik Reporting to render a report produced in the Standalone Report Designer, it has a number of data sources and the running of those data sources takes 2-3 minutes.  The data source is SQL server.

When running the report in the Report Designer all works well.

In the .net app I need to save the report as an image, so I can place it in an email as a summary but then I also want to save as an XLSX spreadsheet and attach that spreadsheet, after adding a lot more data, pivot tables etc the e-mail. 

So currently I'm rendering the report twice, the first which is rendered to XLSX format and then again as JPEG file.

So the data is being extracted from SQL twice, once with each render so it doubles the time taken and also the load on SQL. 

Is there a way to generate the report and then export that report as XLSX file and then again as a JPEG?

Mads
Telerik team
 answered on 08 Feb 2021
2 answers
168 views

     Hi, I have a reporting with a picturebox. In the properties box set the value to C:\fotos\imge1.wmf and can see the wmf in the picturebox. But when print the report  picturebox is empty. I have tried to change values of sizing property to (Stretch,ScaleProportional,AutoSize,Center,Normal) and resize the picturebox in multiples sizes without results. I use Telerik Reporting R3 2020 which is compatible with wmf files.

 

Thanks¡¡¡

 

 

 
Neli
Telerik team
 answered on 08 Feb 2021
7 answers
1.8K+ views

I have a report that gives the nutrient breakdown of a feed ingredient. Sometimes the users in the lab will name the ingredient such that it references other work they are performing which typically results in the use of special characters. When they use "{}" the report viewer throws an exception.

 

I know that there is a workaround in C# to resolve these conflicts but how do I get around this in the Telerik Reporting system (short of scrubbing the data to remove the offending character?) The Value assignment in the example code causes this issue.

Example code:

            <TextBox Width="1.78in"
                     Height="0.17in"
                     Left="0in"
                     Top="1.96in"
                     Value="{35 DM NDF M}"
                     Name="lblDietSummary_Title_0">
              <Style Visible="True"
                     Color="Black"
                     TextAlign="Left"
                     VerticalAlign="Middle">
              <Font  Name="Arial"
                     Size="9pt"
                     Bold="True" />
              </Style>
            </TextBox>

 

Neli
Telerik team
 answered on 08 Feb 2021
1 answer
1.1K+ views

Hello, 

I have an ASP.NET MVC web application with several modules.

I would like to add a new statistics module contains multiple reports and only use the view part in this application (Telerik MVC HTML5 Report Viewer)

Another solution includes the REST service for report generation and also the definition of reports using the Standalone designer.

 

In the first application, this is my link to myModule in  _Layout.cshtml

 

@Html.ActionLink("Account List", "AccountList", "Home", null, new { @class = "sidebar-link", id = "AccountListSide" })

 

this is the call of my action method in HomeController.cs:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
 
namespace FirstApp.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            return View();
        }
 
        public ActionResult AccountList()
        {
            return View();
        }
    }
}

 

this is my report Viewer: Home/AccountList.cshtml

@using Telerik.Reporting
@using Telerik.ReportViewer.Mvc
@{
    Layout = null;
}
<!DOCTYPE html>
<head>
    <title>Telerik MVC HTML5 Report Viewer</title>
 
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
 
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <script src="~/Scripts/jquery-3.5.1.min.js"></script>
    <link href="~/Content/kendo/2020.3.915/kendo.common.min.css" rel="stylesheet" />
    <link href="~/Content/kendo/2020.3.915/kendo.blueopal.min.css" rel="stylesheet" />
 
 
    <style>
        #reportViewer1 {
            position: relative;
            width: 1300px;
            height: 900px;
            font-family: Verdana, Arial;
        }
    </style>
 
    <!--If Kendo is used it should be added before the report viewer.-->
    <script src="@Url.Content("http://localhost:59374/api/reports/resources/js/telerikReportViewer-15.0.21.120.min.js/")"></script>
 
</head>
<body>
 
    @(Html.TelerikReporting().ReportViewer()
 
                                                .Id("reportViewer1")
                                                .ServiceUrl(Url.Content("http://localhost:59374/api/reports"))
                                                .ReportSource(new UriReportSource() { Uri = "ListAccountReport.trdp" })                                         
                                                .ViewMode(ViewMode.Interactive)
                                                .ScaleMode(ScaleMode.Specific)
                                                .Scale(1.0)
                                                .PersistSession(false)
                                                .PrintMode(PrintMode.AutoSelect)
                                                .EnableAccessibility(false)
    )
 
</body>
</html>

 

In my second asp.net mvc application, i created the REST Service ReportController.cs

namespace SecondApp.Controllers
{
    using System.IO;
    using System.Web;
    using Telerik.Reporting.Cache.File;
    using Telerik.Reporting.Services;
    using Telerik.Reporting.Services.WebApi;
 
    //The class name determines the service URL.
    //ReportsController class name defines /api/reports/ service URL.
    public class ReportsController : ReportsControllerBase
    {
        static ReportServiceConfiguration configurationInstance;
 
        static ReportsController()
        {
            //This is the folder that contains the report definitions
            //In this case this is the Reports folder
            var appPath = HttpContext.Current.Server.MapPath("~/");
            var reportsPath = Path.Combine(appPath, "Reports");
 
            //Add resolver for trdx/trdp report definitions,
            //then add resolver for class report definitions as fallback resolver;
            //finally create the resolver and use it in the ReportServiceConfiguration instance.
            var resolver = new UriReportSourceResolver(reportsPath)
                .AddFallbackResolver(new TypeReportSourceResolver());
 
            //Setup the ReportServiceConfiguration
            configurationInstance = new ReportServiceConfiguration
                {
                    HostAppId = "Html5App",
                    Storage = new FileStorage(),
                    ReportSourceResolver = resolver,
                    // ReportSharingTimeout = 0,
                    // ClientSessionTimeout = 15,
                };
        }
 
        public ReportsController()
        {
            //Initialize the service configuration
            this.ReportServiceConfiguration = configurationInstance;
        }
    }
}

 

and under the second solution the Reports directory contains the definition of my report "ListAccountReport.trdp"

Another detail is activate CORS to access the service REST, I add in the 2nd app this snippet of code in web config:

<httpProtocol>
  <customHeaders>
    <add name="Access-Control-Allow-Origin" value="*" />
    <add name="Access-Control-Allow-Headers" value="Content-Type" />
    <add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" />
    <add name="Access-Control-Allow-Credentials" value="true" />
  </customHeaders>
</httpProtocol>

 

using only one solution, all works fine but separating the two parts in different solutions it throws me this error: 

Unable to get report parameters.

Access to XMLHttpRequest at 'http://localhost:59374/api/reports/clients/6d5ac5243ca/parameters' from origin 'http://localhost:57654' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.
jquery-3.5.1.min.js:2 POST http://localhost:59374/api/reports/clients/6d5ac5243ca/parameters net::ERR_FAILED


Thanks for replying


Wassim
Top achievements
Rank 1
Veteran
Iron
 answered on 08 Feb 2021
1 answer
125 views

I have a large program with more than 20 reports which has been based on legacy Asp.net Web Forms Viewer.  Given the legacy state of that control I decided to try to tackle the HTML5 viewer.  

I have taken an existing project, forked it.  Added a HTML5 viewer template based solution.  That created a report controller which I had to customize.  I chose to implement a custom resolver and it seems to be working well.  In my development environment it works flawlessly.    When deployed to my production server nothing I do gets it working.  That server is as follows:

IIS 10 on Windows 2016 Server.

The error I keep getting is shown below.  Symptomatically it seems that the routing, again in production only, is not happening.  I have, to the best of my ability, implemented "CORS" although I am not sure I actually require it.  The URL shown below is correct.  I have tried using /Text/FInance/City-Import/api/reports/formats as suggested to no avail.  Again, no routing seems to be happening.

I have tried using Fiddler and Chrome tools to no avail. They provide no clues other than it is not working.

Can anyone aid my troubles with a pointer towards what to look for?  Given my successes on development IIS servers (older vintages), I suspect it might be something I have overlooked.  Hopefully someone has something for me to look it at.

 

(Error message I am fighting)

Cannot access the Reporting REST service. (serviceUrl = '/Test/Finance/City-Import/api/reports/'). Make sure the service address is correct and enable CORS if needed. (https://enable-cors.org)

David
Top achievements
Rank 1
Iron
Veteran
Iron
 answered on 07 Feb 2021
7 answers
1.2K+ views
Hi, Im sure it is possible, but I don t know how to do it. In designtime a added textboxes containing a label. In my webapplication I want to change the content of this label. When I debug I can see the textbox and its value. But how to reference the textbox in order to change its value.

Any help is appreciated.

Thx
pierre-jean
Top achievements
Rank 1
Veteran
Iron
 answered on 06 Feb 2021
1 answer
239 views

Hello,

 

I need to create a report with 3 pages and each page has to have different watermarks.

How can I achieve this?

 

I create 3 watermarks with following properties:

 1. PrintOnFirstPage - true, PrintOnLastPage - false

 2. PrintOnFirstPage - false, PrintOnLastPage - false

 3. PrintOnFirstPage - false, PrintOnLastPage - true

 

But the result is:

On page 1 there is watermark 1.

On page 3 there is watermark 3.

But on page 2 there are watermarks 1 and 2 which are one over the other.

 

How can i fix this?

 

Thank you in advance!

 

Best regards,

Miroslav Vasilev

Dimitar
Telerik team
 answered on 05 Feb 2021
2 answers
142 views
 Hello. 
I made a pdf report. I have to use bookmarks in this pdf report. When I tested this pdf report on localhost IIS, everything shown correctly in this pdf file (bookmarks, title ... etc.).
When I tried public my applicaion on the production server, I found out that the bookmarks in my pdf report were not shown.
I checked version of my my Telerik.Reporting.dll which is on the server - passed. It is same version as my Telerik.Reporting.dll on my local computer.
Can you advice me, how to fix this problem?
I am clueless ... :-)
Ivan
Top achievements
Rank 1
 answered on 05 Feb 2021
13 answers
1.8K+ views
Hello
Is it possible to insert a pdf into telerik reporting ? I have a set of reports generated using telerik reporting in pdf format and i want to append another generated pdf. Do you have this feature ?
thanks
Johnathan
Top achievements
Rank 1
 answered on 04 Feb 2021
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?