Telerik Forums
Reporting Forum
6 answers
453 views

I am using HTML5 report viewer. 

When viewing a report, I want to see one continuous report because I do not need to see page headers, footers, or pages. But, when I go to print preview mode, it should be normal or it should look like paged mode. Can someone help me for my requirement?

 

Eric R | Senior Technical Support Engineer
Telerik team
 answered on 21 Feb 2020
1 answer
646 views

I have a complex query that I didn't build myself that I need to use for a report. I ran the query in SQL Server and I can find the expected results. When I try to run this query in Telerik, I likewise get the expected results. But the expected results encompass data from as old as 2006.

There's a good chunk of data in the query and in order to make sure my report is working correctly on relevant data, I want to filter out the data that is older than 2018. I've tried to go about this two different ways. The first is I have tried to use the filter settings on the report itself.

Expression:
= Fields.EntryDate.Year >= 2018

Operator
=

Value
=True

This does not work and the preview always displays very old information first (what would appear at the beginning of the query in SQL Server). The rendering process takes too long to sit and wait before I can skip through thousands of pages before I see any data from 2018 or later. In fact, Telerik just crashes usually.

My next thought was to limit the results in the query itself. I use the WorkOrder.EntryDate in my WHERE clause and filter out dates older than 2018. I tested this query in SQL Server and it performs exactly as I expect it to. When I use this same query in Telerik, not only does the preview return 0 rows, but the preview is nothing more than a blank image. Is there a reason my SQL Server can process my query without issue, but Telerik fails to do so?

Todor
Telerik team
 answered on 21 Feb 2020
1 answer
138 views

We are experiencing this error with Telerik Reporting version 12.2.18.912:

https://feedback.telerik.com/reporting/1413307-error-handling-on-finishing-of-the-report-rendering

If I hover over the "Completed" tag, it says, "Implemented. Refer to the item for information about the release this is included in." Where can I find the information about how and when the error was fixed?

Neli
Telerik team
 answered on 21 Feb 2020
3 answers
812 views

Hi,

 

I have all my reports designed in telerik report designer.

The selection page for the report criteria is developed in .net and the report viewer used for reports is HTML5 report viewer.

How can we make our reports multilingual to show the static content on report in the language user has selected from selection page.

 

Regards,

Ashwini

Katia
Telerik team
 answered on 20 Feb 2020
1 answer
443 views

Here is my problem.  Our shop has three environments that the development team must work with, development, testing and production.  I have successfully been able to change the DataSource (WebServiceDataSource) of the master report by changing the ServiceUrl.  For subreports I have been able to change the ReportSource based on the environment but I have not been able to locate a way to change the DataSource.  Does anyone have an idea how this is done? 

Here is the code I have right now:

public class TexasProtaxCustomReportResolver : Telerik.Reporting.Services.Engine.IReportResolver
    {
        private readonly string _path;
        private readonly string _apiUrl;
 
        public TexasProtaxCustomReportResolver(string path, string apiUrl)
        {
            _path = path;
            _apiUrl = apiUrl;
        }
 
        public Telerik.Reporting.ReportSource Resolve(string reportName)
        {
            var reportPacker = new ReportPackager();
 
            string reportPath = Path.Combine(_path, reportName);
            using (var sourceStream = System.IO.File.OpenRead( reportPath))
            {
                var report = (Telerik.Reporting.Report)reportPacker.UnpackageDocument(sourceStream);
                SetReportSource((ReportItemBase)report);
 
                var irs = new InstanceReportSource
                {
                    ReportDocument = report
                };
 
                return irs;
            }
 
        }
 
       private void SetReportSource(ReportItemBase reportItemBase)
        {
            if (reportItemBase.Items.Count < 1)
                return;
 
            if (reportItemBase is Telerik.Reporting.Report)
            {
                var report = (Telerik.Reporting.Report)reportItemBase;
 
                var webServiceDataSource = (WebServiceDataSource)report.DataSource;
                string url = webServiceDataSource.ServiceUrl;
                url = url.ToLower().Replace("localhost:5001", _apiUrl);
                webServiceDataSource.ServiceUrl = url;
            }
 
            foreach (var item in reportItemBase.Items)
            {
                // recursively set the reportsource
                SetReportSource(item);
 
                if (item is SubReport subReport)
                {
                    // Save Parameters
                    var clonable = subReport.ReportSource.Parameters as ICloneable;
                    var parameters = (ParameterCollection)clonable.Clone();
 
                    string fileName = Path.GetFileName(subReport.ReportSource.ToString());
                    var uriReportSource = new UriReportSource
                    {
                        Uri = Path.Combine(_path, fileName)
                    };
                    uriReportSource.Parameters.AddRange(parameters);
 
                    subReport.ReportSource = uriReportSource;
 
                    continue;
                }
            }
        }
 
    }
Carlos
Top achievements
Rank 1
 answered on 19 Feb 2020
2 answers
971 views

Ticket :1453373

Report shows all records in Visual Studio when I Preview it in the preview page but when running the winform application from the IDE (and as a stand alone app) the viewer stops when record count ~> 220 records showing the above error. When I capture the error event and display said error in a messagebox the first page is displayed. On it I can see that pages are calculated (as my first page displays page 1 of 75) so I can conclude that the records are definitely getting retrieved, just not displayed. I say that the record count is ~> 220 because when I narrow the parameters to display < 220 records the report is generated fine: adding 10 more records to the report causes the error.
As I said, the report previews perfectly.

I call the report using

Dim TR As MaserNET.ReportViewerForm1 = New MaserNET.ReportViewerForm1
TR.ReportName = "Maserrep.DDRegister, Maserrep, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null"
TR.ShowDialog()

 

and the viewer shows the report using

 

Dim typeReportSource = New Telerik.Reporting.TypeReportSource()
Dim connectionStringHandler = New ReportConnectionStringManager(GlobalConnection.ConnectionString)
typeReportSource.TypeName = ReportName
Dim reportSource = connectionStringHandler.UpdateReportSource(typeReportSource) Me.ReportViewer1.ReportSource = reportSource Me.ReportViewer1.RefreshReport()

What am I missing????

Katia
Telerik team
 answered on 19 Feb 2020
2 answers
408 views
I'm experiencing an issue when a page references both Kendo UI and Telerik Reporting HTML5 libraries. If on a page I need to call kendo UI grid control I get an error message: 

TypeError: n._pageableQueryOptions is not a function
    at HTMLSelectElement.pageSize (kendo.all.min.js:28)
    at HTMLSelectElement.<anonymous> (jquery.min.js?v=FgpCb_KJQlLNfOu91ta32o_NMZxltwRo8QtmkMRdAu8:2)
    at Function.each (jquery.min.js?v=FgpCb_KJQlLNfOu91ta32o_NMZxltwRo8QtmkMRdAu8:2)
    at E.fn.init.each (jquery.min.js?v=FgpCb_KJQlLNfOu91ta32o_NMZxltwRo8QtmkMRdAu8:2)
    at E.fn.init.val (jquery.min.js?v=FgpCb_KJQlLNfOu91ta32o_NMZxltwRo8QtmkMRdAu8:2)
    at new init (kendo.all.min.js:40)
    at init._pageable (kendo.all.min.js:60)
    at new init (kendo.all.min.js:57)
    at HTMLDivElement.<anonymous> (kendo.all.min.js:26)
    at Function.each (jquery.min.js?v=FgpCb_KJQlLNfOu91ta32o_NMZxltwRo8QtmkMRdAu8:2)





It looks like there is a conflict between the libraries.This is how page looks like:
<!DOCTYPE html>
<html>
<head>
    <title>Report Viewer Demo</title>

    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />

    <link rel="stylesheet" href="/lib/telerik.kendo-ui/css/kendo.common.min.css" />
    <link rel="stylesheet" href="/lib/telerik.kendo-ui/css/kendo.common-bootstrap.min.css" />
    <link rel="stylesheet" href="/lib/telerik.kendo-ui/css/kendo.bootstrap.min.css" />
    <link rel="stylesheet" href="/lib/telerik.kendo-ui/css/kendo.bootstrap.mobile.min.css" />

    <script src="/lib/jquery/jquery.min.js" asp-append-version="true"></script>
    <script src="/lib/telerik.kendo-ui/js/kendo.all.min.js"></script>
    <script src="/lib/telerik.reporting/telerikReportViewer-14.0.20.115.min.js"></script>
    <script src="/lib/telerik.reporting/telerikReportViewer.kendo-14.0.20.115.min.js"></script>

    <style>
        #reportViewer1 {
            position: absolute;
            left: 5px;
            right: 5px;
            top: 50px;
            bottom: 5px;
            overflow: hidden;
            font-family: Verdana, Arial;
        }
    </style>
</head>

<body>
    <div class="row">
        <a href="/">Go Home</a>
    </div>
    <div id="reportViewer1">
        loading...
    </div>

    <div id="ddd"></div>

    <script type="text/javascript">
        $(document).ready(function () {
            $("#ddd").kendoGrid({
                dataSource: {
                    type: "odata",
                    transport: {
                        read: "https://demos.telerik.com/kendo-ui/service/Northwind.svc/Customers"
                    },
                    pageSize: 20
                },
                height: 550,
                groupable: true,
                sortable: true,
                pageable: {
                    refresh: true,
                    pageSizes: true,
                    buttonCount: 5
                },
                columns: [{
                    template: "<div class='customer-photo'" +
                        "style='background-image: url(../content/web/Customers/#:data.CustomerID#.jpg);'></div>" +
                        "<div class='customer-name'>#: ContactName #</div>",
                    field: "ContactName",
                    title: "Contact Name",
                    width: 240
                }, {
                    field: "ContactTitle",
                    title: "Contact Title"
                }, {
                    field: "CompanyName",
                    title: "Company Name"
                }, {
                    field: "Country",
                    width: 150
                }]
            });

            $("#reportViewer1")
                .telerik_ReportViewer({
                    serviceUrl: 'https://localhost:44388/api/reports/',

                //ReportSource - report description
                reportSource: {

                    // The report can be set to a report file name
                    // or CLR type name (report class definition).
                    report: "Barcodes Report.trdp",

                        // Parameters name value dictionary
                        parameters: {
                            CompanyId: 1,
                            PatientId: 1
                        }
                },

                viewMode: telerikReportViewer.ViewModes.INTERACTIVE,

                scaleMode: telerikReportViewer.ScaleModes.SPECIFIC,

                scale: 1.0
            });
    });
    </script>
</body>
</html>
Vitaliy
Top achievements
Rank 1
 answered on 18 Feb 2020
18 answers
1.1K+ views

When using IE, the print button does not work at all. Nothing happens.

In Edge, the print button initiates an export to PDF which provides the option to save the file or open it in Reader.

In Chrome, the button works as expected opening an Adobe print dialog.

Are there settings in the browser preventing the system print dialog? Is there some setting in the Report Viewer I can modify to make this work uniformly across all 3 browsers?

 

 

Neli
Telerik team
 answered on 18 Feb 2020
1 answer
649 views

I have been researching all day I can't find a solution.  I have tried to build a custom resolver to change the server name and port as a test.  I have coded this class it returns null because I cannot determine how to return a ReportSource.

public class TexasProtaxCustomReportResolver : Telerik.Reporting.Services.Engine.IReportResolver
    {
        public Telerik.Reporting.ReportSource Resolve(string reportName)
        {
            var reportPacker = new ReportPackager();
            using (var sourceStream = System.IO.File.OpenRead(reportName))
            {
                var report = (Telerik.Reporting.Report)reportPacker.UnpackageDocument(sourceStream);
                var webServiceDataSource = (WebServiceDataSource)report.DataSource;
                string url = webServiceDataSource.ServiceUrl;
                url = url.ToLower().Replace("localhost:5001", "localhost:44384");
                webServiceDataSource.ServiceUrl = url;
               
                return null;
            }

        }
    }

In the ReportsConttroller I have tried adding the resolver but it has an error:

        public ReportsController(ConfigurationService configSvc)
        {
            this.reportsPath = Path.Combine(configSvc.Environment.WebRootPath, "Reports");

            this.ReportServiceConfiguration = new ReportServiceConfiguration
            {
                ReportingEngineConfiguration = configSvc.Configuration,
                HostAppId = "ReportsService",
                Storage = new FileStorage(),
                ReportResolver = new ReportTypeResolver()
                        .AddFallbackResolver(new ReportFileResolver(this.reportsPath))
                            .AddFallbackResolver(new TexasProtaxCustomReportResolver())
            };
        }

 

Any assistance would be appreciated.

Carlos
Top achievements
Rank 1
 answered on 18 Feb 2020
6 answers
1.7K+ views

Hi

I am attempting to get trdp files to generate a pdf in a .net core application using ObjectDataSource.

in my appsettings I have the following code to reference my dll.

"telerikReporting": {
   "assemblyReferences": [
     {
       "name": "Goalie.Shared",
       "version": "1.0.0.0",
       "culture": "neutral",
       "publicKeyToken": "null"
     }
   ]
 }

 

running the report results in error The assembly "EXTERNAL_ASSEMBLY_TYPE" is not permitted to be used by an ObjectDataSource component. Please include it in an AssemblyReferences element in the Telerik.Reporting configuration section of your application configuration file.

 

But when I put in a app.config as suggested https://www.telerik.com/forums/reporting-asp-net-core-rest-service-configuration#f0fajfr44E6tvOjTRMr33g, 

 

<?xml version ="1.0"?>
<configuration>
  <configSections>
    <section
                name="Telerik.Reporting"
                type="Telerik.Reporting.Configuration.ReportingConfigurationSection, Telerik.Reporting"
                allowLocation="true"
                allowDefinition="Everywhere"/>
  </configSections>
  <Telerik.Reporting>
    <AssemblyReferences>
      <add name="Goalie.Shared" version="1.0.0.0" />
    </AssemblyReferences>
  </Telerik.Reporting>
</configuration>

 

everything works fine. 

 

Should we still need this step? What are the requirements so that the telerikReporting section of the appsettings.json are read? I have made sure all of the dlls are installed as specified here https://docs.telerik.com/reporting/use-reports-in-net-core-apps

Its not a big deal but seems un-nessesary. Any ideas?

 

Todor
Telerik team
 answered on 18 Feb 2020
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?