Telerik Forums
Reporting Forum
1 answer
217 views

I created a report using Telerik Report Designer Standalone with sqlDataSource1 setup with the following ReportParameters like this:



C# coded that read that send the parameter as Int32

    var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
    // set any deviceInfo settings if necessary
    var deviceInfo = new System.Collections.Hashtable();
    var reportSource = new Telerik.Reporting.UriReportSource();
    var directory = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
    var value = Convert.ToInt32(numericExportarPdf.Value);
    reportSource.Uri = "Report.trdp";
    reportSource.Parameters.Add("NRO_TICKET", value);
    Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("PDF", reportSource, deviceInfo);
    if (result.HasErrors) return;
    string fileName = result.DocumentName + "." + result.Extension;
    string path = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
    string filePath = Path.Combine(path, fileName);
    using FileStream fs = new FileStream(filePath, FileMode.Create);
    fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);

I get the following error:

Telerik.Reporting.Processing.CancelProcessingException: An error has occurred while processing the report. Processing canceled. Check the InnerException for more information.
 ---> System.Exception: Invalid value of report parameter 'NRO_TICKET'.
   --- End of inner exception stack trace ---
   at Telerik.Reporting.Processing.Report.ValidateParameters()
   at Telerik.Reporting.Processing.Report.ProcessItem()
   at Telerik.Reporting.Processing.ReportItemBase.ProcessElement()
   at Telerik.Reporting.Processing.Report.ProcessElement()
   at Telerik.Reporting.Processing.ProcessingElement.Process(IDataMember dataContext)
   at Telerik.Reporting.Processing.Report.Process(Boolean processItemActions, Boolean documentMapEnabled)
   at Telerik.Reporting.Processing.ReportProcessor.ProcessReport(Report report, IPathResolver pathResolver, IProcessingContext parentContext, IEnumerable`1 parameters, Key rootKey, Boolean interactivityEnabled, Boolean documentMapEnabled, PageLayoutInfo pageSettings, ErrorEventHandler errorHandler, List`1 documentNodes, Boolean& documentMapAvailable)
   at Telerik.Reporting.Processing.ReportProcessor.ProcessResolvedReports(ResolvedReportDocument resolvedReportDocument, IList`1 parameters, IProcessingContext contextPerDocument, Boolean interactivityEnabled, Boolean documentMapEnabled, PageLayoutInfo pageSettings, List`1 processedReports, ErrorEventHandler errorHandler, List`1 documentNodes, Boolean& documentMapAvailable, ListSlice& tocReportsSlice)
   at Telerik.Reporting.Processing.ReportProcessor.ProcessReportSource(ReportSource reportSource, IRenderingContext context)
   at Telerik.Reporting.Processing.ReportProcessor.ProcessReportSource(ReportSource reportSource, Hashtable deviceInfo, IRenderingContext context)
   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.<RenderReport>b__0(SingleStreamManager sm)
   at Telerik.Reporting.Processing.ReportProcessor.RenderReportSafe(Func`2 renderCallback, String format, IRenderingContext renderingContext)
   at Telerik.Reporting.Processing.ReportProcessor.RenderReport(String format, ReportSource reportSource, Hashtable deviceInfo, CancellationToken cancellationToken)
   at Telerik.Reporting.Processing.ReportProcessor.RenderReport(String format, ReportSource reportSource, Hashtable deviceInfo)

If I remove the parameter the report works fine, I added changing to Decimal Type value as my DB engine is MS-SQL 2022 Express. I added filters and get same error. I don't know what to do anymore What I am missing

1 answer
176 views

Greetings! 

I'm trying to run the DatabaseCacheConfigurator.exe, select a PostgreSQL target backend, and create schema. I first ran into an issue where the Npgsql database provider was "not installed properly". I seem to have resolved that by installing what appears to be the last version of the Npgsql MSI (GAC) provider version 4.1.8.

This gets me past the not "installed properly" message, but now I receive the following:

Database driver installation problem: Cannot use factory for PostgreSql. Could not load type 'NpgsqlTypes.NpgsqlTimeZone' from assembly 'Npgsql, version=4.1.8.0.....

The full stack trace is in the attached screenshot.

Any suggestions?

Many Thanks!
Bryan

 

Dimitar
Telerik team
 answered on 14 Feb 2024
1 answer
393 views
how to use AM PM date format in textbox
n/a
Top achievements
Rank 1
Iron
 answered on 13 Feb 2024
1 answer
202 views

Hello Telerik,

I'm currently developing an application using Blazor Server along with the balzor Report Designer/Viewer. 

We are a multitenant application that has multiples dbs per tenant. I'm facing the challenge of ensuring that connection strings are safe and flexible. I need each tenant to be able to create and print reports without interacting with the connection string at any time. So want to use Shared Data Sources.

Storing them in the report with the embedded in the report definition option is not safe nor flexible enough and the shared connection with alias and read it from appsettings file doesn't provide the level of security I require security nor flexibility. 

I have a custom implementation of the ISettingsStorage. That works well in the designer, it allows me to provide a shared connection string from custom sources (stored and encrypted in a db). But I can't seem to make the ISettingsStorage work with the ReportViewer, it seems like it allways tries to find the shared data sources from appsetings, wich is not desired. I'm using blazor designer and viewer in the same server.

TLDR: I need to use ISettingsStorage instead of appsettings in the ReportViewer with shared SQL Server data source.

Can you help me please?

Dimitar
Telerik team
 answered on 13 Feb 2024
1 answer
214 views

hi everybody,

I would like to know if it is possible to have the asp.net mvc generic layout (the one we have when creating a web app) with report, so far I just have report layout.

any suggestion, thanks

Ray

Dimitar
Telerik team
 answered on 09 Feb 2024
1 answer
158 views

Hi,

Is there a supported or recommended way to mark/tag a report definition with a version number?

Currently, we use:

  • reports created in the standalone designer, saved to *.trdp
  • ASP.NET Core .NET 6 application, that:
    • hosts the reporting REST service
    • uses EFCore IDefinitionStorage based report storage
    • has functionality to import *.trdp files into the database storage

It will be very useful to be able to automate the report import process on a deployment of the application so that it will only overwrite an existing report in the storage when it is a newer version.

Thanks.

Dimitar
Telerik team
 answered on 09 Feb 2024
1 answer
263 views
Hi, I need to create a report that contains a list component. In this list I added some header information and then a table with binding data. After the table there are various textboxes. After these I have a panel which is basically my second page with static data. The first page may grow due to the table.
I need the textboxes after the table to always go to the bottom of the page. Is this possible?
I already tried with Report Book separating first part and panel with static part, but it can't alternate reports.
Maybe with PageFooter? In this case I don't know how to conditionally show it only after the first part and hide after panel with static page.
Momchil
Telerik team
 answered on 09 Feb 2024
1 answer
213 views
Looking to see what the best approach would be to integrated a graphQL data source into Telerik Reporting?  So far, wrapping it with a WebService or ObjectDataSource are options, but I am hoping that there is a more direct way.
Nikolay
Telerik team
 answered on 08 Feb 2024
0 answers
217 views

Dear community,

I have a license for Telerik_Reporting_R2_2020_SP2_14_1_20_814_DEV, I didn't use reports for long time but I have an application that requires it. I use Visual Studio Community 2022 Version 17.8.6 and tried to re-install report but I still cant find a way to include a trdp file created with Report Designer R2 2020 in my newly created ASP.NET MVC app. I had a look on the internet but still facing this problem.

Is there someone who can guide me to solve this issue.

in advance, many thanks
Ray

Raymond
Top achievements
Rank 1
Veteran
Iron
 asked on 06 Feb 2024
6 answers
1.3K+ views
Hello,

Can we load PDF file into Telerik ReportViewer?

Thank you,
Patrick | Technical Support Engineer, Senior
Telerik team
 updated answer on 05 Feb 2024
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?