Telerik Forums
Reporting Forum
1 answer
113 views

I have a in an ASP.net Core 6 application.

When I run the app from my laptop from VS 2022, it works correctly.  It also run correctly when doing a Preview from the standalone report developer. (Telerik Report Designer v17.0.23.118)

When I try to run it from the Azure web app (using the same data source), after publishing I get an error saying parameter is not valid.  Partial trace below. 

I've verified that a valid parameter is being passed to the report. I can run the preview successfully using the same parameter value that's being used in the app.

The report was working before, but I need to make a change to the body.  The report creates a PDF of the record displayed on the web page at the time.

Has anyone experienced something like this before?  Where should I be looking for the error?

System.Exception: Parameter is not valid. at System.Drawing.SafeNativeMethods.Gdip.CheckStatus(Int32 status) at System.Drawing.Graphics.GetHdc() at
Telerik.Reporting.Pdf.PdfContext..ctor(String ownerPassword, String userPassword) at Telerik.Reporting.Pdf.PdfDocument.InitCompleted(Stream stream) at Telerik.Reporting.ImageRendering.PdfRenderingContext.InitPdfDocument(PdfDocument pdfDocument, Stream stream) at Telerik.Reporting.ImageRendering.DocumentPdf.CreateDocument(PdfRenderingContext pdfContext) at Telerik.Reporting.ImageRendering.DocumentPdf.ResolveDocument() at Telerik.Reporting.ImageRendering.DocumentPdf..ctor(PdfRenderingContext context, IMeasureContext measureContext) at Telerik.Reporting.ImageRendering.PdfReport.CreateDocument(IDictionary renderingInfo, IDictionary deviceInfo, CreateStream createStreamCallback, PageSettings pageSettings) at Telerik.Reporting.BaseRendering.DocumentRenderingExtensionBase.CreateWriter(IDictionary renderingContext, IDictionary deviceInfo, CreateStream createStreamCallback, PageSettings pageSettings) at Telerik.Reporting.ImageRendering.PdfReport.CreateWriter(IDictionary renderingContext, IDictionary deviceInfo, CreateStream createStreamCallback, PageSettings pageSettings) at Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(LayoutElement root, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback, PageSettings pageSettings) at Telerik.Reporting.BaseRendering.RenderingExtensionBase.Render(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback) at Telerik.Reporting.Processing.ReportProcessor.RenderCore(ExtensionInfo extensionInfo, IList`1 processingReports, 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.<>c__DisplayClass47_0.

Dimitar
Telerik team
 answered on 02 Jul 2024
1 answer
76 views

Hello,

We have recently upgraded our .net solutions/projects to .Net 8.0.

In our old version, we have a ReportsController.cs which requests into the v18 Telerik.Reports framework project, and renders the report on the front end view the TelerikHtmlViewer template.

ex/ The Report Controller 4,6 framework code working fine with Telerik.Reporting.18.0.24.305.


using Microsoft.AspNetCore.Mvc;
using Telerik.Reporting.Services;

namespace HarWAPICore.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class ReportsController : APIBaseController
    {
        static readonly ReportServiceConfiguration configurationInstance =
                new ReportServiceConfiguration
                {
                    HostAppId = "MyApp",
                    ReportSourceResolver = new UriReportSourceResolver(httpContextAccessor.HttpContext.GetServerVariable()..Current.Server.MapPath("~/Reports"))
                        .AddFallbackResolver(new TypeReportSourceResolver()),
                    Storage = new Telerik.Reporting.Cache.Interfaces.IStorageProvider(),
                };

        public ReportsController(IConfiguration configuration, IWebHostEnvironment hostEnvironment,
                IHttpContextAccessor httpContextAccessor) : base(configuration, hostEnvironment, httpContextAccessor)
        {
            ReportServiceConfiguration = configurationInstance;
        }
    }
}

 

And of course there's a separate Reports Projects with all of the Report designs, Charts, etc.

-----------------------------------------------------

Now....after UPGRADING our Reports project to .Net 8 (via the Visual Studio upgrade tool) it is breaking on the Charts lib. And I found this link below that Charts is obsolete.

https://docs.telerik.com/reporting/report-items/chart-(obsolete)

Here's an example of one Exams.Designer.cs file that breaks everywhere on"Charting".


namespace MyReports
{
    partial class Exams
    {
        #region Component Designer generated code
        /// <summary>
        /// Required method for telerik Reporting designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            Telerik.Reporting.TableGroup tableGroup1 = new Telerik.Reporting.TableGroup();
            Telerik.Reporting.TableGroup tableGroup2 = new Telerik.Reporting.TableGroup();
            Telerik.Reporting.TableGroup tableGroup3 = new Telerik.Reporting.TableGroup();
            Telerik.Reporting.NavigateToReportAction navigateToReportAction1 = new Telerik.Reporting.NavigateToReportAction();
            Telerik.Reporting.TypeReportSource typeReportSource1 = new Telerik.Reporting.TypeReportSource();
            Telerik.Reporting.Charting.Styles.ChartMargins chartMargins1 = new Telerik.Reporting.Charting.Styles.ChartMargins();
            Telerik.Reporting.Charting.ChartAxisItem chartAxisItem1 = new Telerik.Reporting.Charting.ChartAxisItem();
            Telerik.Reporting.Charting.ChartAxisItem chartAxisItem2 = new Telerik.Reporting.Charting.ChartAxisItem();
            Telerik.Reporting.Charting.ChartAxisItem chartAxisItem3 = new Telerik.Reporting.Charting.ChartAxisItem();
            Telerik.Reporting.Charting.ChartAxisItem chartAxisItem4 = new Telerik.Reporting.Charting.ChartAxisItem();
            Telerik.Reporting.Charting.ChartAxisItem chartAxisItem5 = new Telerik.Reporting.Charting.ChartAxisItem();
            Telerik.Reporting.Charting.ChartAxisItem chartAxisItem6 = new Telerik.Reporting.Charting.ChartAxisItem();
            Telerik.Reporting.Charting.ChartAxisItem chartAxisItem7 = new Telerik.Reporting.Charting.ChartAxisItem();
            Telerik.Reporting.Charting.ChartSeries chartSeries1 = new Telerik.Reporting.Charting.ChartSeries();
            Telerik.Reporting.TableGroup tableGroup4 = new Telerik.Reporting.TableGroup();
            Telerik.Reporting.TableGroup tableGroup5 = new Telerik.Reporting.TableGroup();
            Telerik.Reporting.TableGroup tableGroup6 = new Telerik.Reporting.TableGroup();
            Telerik.Reporting.NavigateToReportAction navigateToReportAction2 = new Telerik.Reporting.NavigateToReportAction();
            Telerik.Reporting.TypeReportSource typeReportSource2 = new Telerik.Reporting.TypeReportSource();
            Telerik.Reporting.Charting.Styles.ChartMargins chartMargins2 = new Telerik.Reporting.Charting.Styles.ChartMargins();
            Telerik.Reporting.Charting.Styles.ChartMargins chartMargins3 = new Telerik.Reporting.Charting.Styles.ChartMargins();
            Telerik.Reporting.Charting.ChartSeries chartSeries2 = new Telerik.Reporting.Charting.ChartSeries();
...
...

 

Here's what it looks like after a rebuild.

What do I do at this point ? Can my API Core projectI somehow call into my old Reports Framework project? Or is there a Telerik upgrade tool that I can download ?

Please advise...

thanks,

Bob

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 01 Jul 2024
1 answer
80 views

Hi Team, 

I'm looking to embed a web map (DOM element) into a telerik report. I was looking at the Kendo UI export PDF method and saw it could do base64, however, it appears that the picture box interprets this as a URL instead of an image. Is there any workflow where I can use the Kendo UI pdf processor (or related kendo methods) to acquire an image or pdf to embed inside of a telerik report via reporting parameter? 

This method inspired the idea:
https://www.telerik.com/kendo-vue-ui/components/pdf-processing/

Example Webmap with related widgets (Ideally I would want to capture everything within the "mapViewDiv"):
https://livingatlas.arcgis.com/sea-ice/ 

Thanks!
-J.T. 

4 answers
812 views

Hi, currently we are using version 12.2.18.1017 of telerik reporting.

we are thinking of upgrading to the latest version since you guys have release the web designer which is really awesome.

however, we are still using VS designer to modified all the template. as far as I know, if we want to use web designer, we need to convert all templates to standalone template.

our currently project is rely on the report REST Service to get the report. we may want to switch away from the REST service or may be stay on it depends what is it offered in web designer.

So here are my questions:

1. What would be best solution for us from your perspective / expertise?

2. If we want to convert our old VS template to standalone template, how do we do it. We are using store procedure as Data source which means our old template is not parameterless (I think). What is the best way to convert them?

an example of how we import the data right now is attached in the file.

 

 

Recent update, I have managed to convert the file from our class object to trdx format. I am thinking to store it inside our DB so that we can call this format from an RESP API endpoint and present it to the html designer.

However, this template has alot funtions. not sure how would I called those functions if I am trying to access the template from a standalone designer or a html designer.

new xml file is attached.

Bob
Top achievements
Rank 1
Iron
Iron
Iron
 updated answer on 30 Jun 2024
1 answer
136 views

Hi 

we include Telerik Reporting v.6.2.12 in our System. This System will be exported (from Italy). Is Telerik Reporting subject to dual use EU or US legislation? Has it an ECCN (Export Control Classification Number) code associated?

thanks in advance for your kind reply

Daniele Perucchini

Dimitar
Telerik team
 answered on 27 Jun 2024
1 answer
97 views

Edit: 6/26/2024 11AM

My apologies, I should have been more specific and added some context through code snippets.

We use this version the HTML5 ASP.NET Web Forms Report Viewer

https://docs.telerik.com/reporting/embedding-reports/display-reports-in-applications/web-application/html5-asp.net-web-forms-report-viewer/overview

Also we initialized it like so

                <telerikReporting:ReportViewer ID="rvStandard" Visible="false"
                    Height="750px" ParametersAreaVisible="false" EnableViewState="false" runat="server">
                    <ClientEvents RenderingBegin="rvStandard_RenderingBegin" Error="Report_ClientError" />
                </telerikReporting:ReportViewer>

This resulted in the unusual behavior with newest version 18.1.24.514.

Moving the initialization to like this with PersistSession set to false resolved the weird issue even though we hadn't set PersistSession at all.

                <telerikReporting:ReportViewer ID="rvStandard" PersistSession="false" Visible="false"
                    Height="750px" ParametersAreaVisible="false" EnableViewState="false" runat="server">
                    <ClientEvents RenderingBegin="rvStandard_RenderingBegin" Error="Report_ClientError" />
                </telerikReporting:ReportViewer>

To set the report to be viewed we do that in the code behind of the .aspx page. This occurs after the user has clicked a desired report. This click of what report they desire to view triggers a PostBack to the aspx page which then runs this code below to do some final configuring on the ReportSource.

rvStandard.Visible = true;
rvStandard.AuthenticationToken = IWT.Sped.Encryption.WebApiEncryption.EncryptTextAsBase64( Cast.ToString( SessionManager.CurrentUser.ID ) );
ReportSource rptSource = new ReportSource( );
rptSource.IdentifierType = IdentifierType.TypeReportSource;
var reportSourceParams = new Telerik.ReportViewer.Html5.WebForms.Parameter[]
{ /* your report params here*/};
rptSource.Identifier = "IWT.Sped.Reporting.rptCaseLoadDetail, Reporting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null";
rptSource.Parameters.AddRange( reportSourceParams );
rvStandard.ReportSource = rptSource;


Hello there,

We have been using Telerik Reporting successfully for many years and have never had a single issue upgrading to the newest version until upgrading to 18.1.24.514.

We were getting the behavior of our ReportViewer getting locked/stuck to the first report being ran. We programmatically set the report in the code behind of our .aspx pages and trigger the ReportViewer to update with the new report and parameters.

After some head banging against the wall, we resolved the issue by setting the PersistSession setting on the ReportViewer to false. To be clear we did not have the PersistSession set to true, it was not configured at all. What is confusing is according to the documentation this value is set to false by default.

https://docs.telerik.com/reporting/embedding-reports/display-reports-in-applications/web-application/html5-report-viewer/api-reference/report-viewer-initialization

Could you please update the documentation or double check that PersistSession is not set to true in the newest version of Telerik Reporting 18.1.24.514 ?

 

Thomas
Top achievements
Rank 1
 updated question on 26 Jun 2024
1 answer
102 views

Hello, 
I'm creating a multi-column report that's printing Across Then Down. I used the Multi-Column Example to get started. And it works perfect. Now I need to use the same data source for fields in my Report Header and Footer. When I assign the same Data source from the List to the report the list is duplicated for ever record in the data. When I remove the List Data Source and try to do a binding expression on the List (Property Path=DataSource Expression=ReportItem.DataObject) the List no longer does multi-column, and is just a single column. I also tried using the PageExec() function to try and access the List scope and  Details scope to get the data that way, but was unsuccessful. 

Due to an external integration, I can only use a single data source as the external tooling replaces all the Data sources with something it configures and inserts into the report XML. 

So how can I achieve this? 

Sample data out of the database is attached. 

 

Thanks

 

1 answer
426 views

We are unable to use the report builder in visual studio for a .net 8 core project

If we use the standalone builder, we can not find out how to load the data from class / model.

We were expecting the external to be able to point to the build / dll and select the appropiate view model

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 Jun 2024
1 answer
57 views

Hello everyone,

I have an issue with visibel paremter.
To be precise I have to show different texts based on the users language.
The basic process looks like this:

Client sets language parameter -> Telerik language paremeter -> SQL selects language label based on language parameter -> Result set in language label value -> language label value set in visible report parameter text

I cannot implement the language labels into the select of the report. Therefor the multilangual labels have an own query. This ml query is set into the language label parameter.

The additional step setting the result of the SQL in the language label value is necessary as the visible parameter already has an SQL source.

Follwing steps i tried:
set the sql query for the language label (Label Text parameter.txt)
set the text value of the target to the value of the parameter mentioned above (Visible Parameter.png)
use the sql query with hardcoded language as a test (SQL hardcoded language.png)
This works fine (Result hardcoded language.png)

Changing sql to language parameter (Select with parameter.png)
SQL gets a result (Result check sql with parameter.png)
Does not work in runtime (Result SQL with parameter.png)

Changing SQL to get every text label and filter in the parameter. (SQL get all labels.png)
Testing the idea, hardcode language filter in parameter (Parameter Filter.png)
Check result works (result hardcoded filter.png)

Changing to filter with parameter (Filter with parameter.png)
Result does not work (Result filter with parameter.png)

So the problem only exists if I use a parameter. Which is unavoidable as I need the language from the active user.

I know that I could hardcode it into the parameter.text with an IIF expression.
I would have to do this for every language and every label and I´d like to avoid that.

Is there any possibility to put result of an SQL query into the parameter.text when the target parmeter already has a different query and is set visibile?

1 answer
92 views
I generate reports through Telerik Reporting, the reports are displayed correctly in the system, but when switching to the browser's print window (in all browsers), the report is displayed followed by an unnecessary blank page, for example: if the report displays 3 pages, 4 pages are displayed with the last page being blank

Looking for a quick solution because it is very disturbing
Ivan Hristov
Telerik team
 answered on 21 Jun 2024
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?