Telerik Forums
Reporting Forum
1 answer
228 views

Telerik Reporting R3 2022 SP1 running with a ASP.Net MVC project(.Net 4.8), in Visual Studio 2022.

I was able to generate reports smoothly till yesterday. I could make changes in the Visual Studio designer and restart my MVC project and see changes quickly. From today I am seeing the report generation gets stuck at :

*** ReportProcessor.ProcessReport STARTED ***

This is the line:

RenderingResult result = reportProcessor.RenderReport("PDF", instanceReportSource, null);

If I restart the system, and run my MVC project then it generates reports. However if I stop the project and re-run it, it gets stuck at the above line. And no matter what I do this error does not go away. 

I have reinstalled Telerik Reporting but no success.

How can I find out where its getting stuck? Can I make the Telerik Reporting print some useful debugging lines in the Output tab?

This project has been working for over a year now in many systems, so its really surprising.

Here is the top of the stack after control goes into Telerik:

 	[Managed to Native Transition]	
 	mscorlib.dll!Microsoft.Win32.Win32Native.SafeCreateFile(string lpFileName, int dwDesiredAccess, System.IO.FileShare dwShareMode, Microsoft.Win32.Win32Native.SECURITY_ATTRIBUTES securityAttrs, System.IO.FileMode dwCreationDisposition, int dwFlagsAndAttributes, System.IntPtr hTemplateFile)	Unknown
 	mscorlib.dll!System.IO.FileStream.Init(string path, System.IO.FileMode mode, System.IO.FileAccess access, int rights, bool useRights, System.IO.FileShare share, int bufferSize, System.IO.FileOptions options, Microsoft.Win32.Win32Native.SECURITY_ATTRIBUTES secAttrs, string msgPath, bool bFromProxy, bool useLongPath, bool checkHost)	Unknown
 	mscorlib.dll!System.IO.FileStream.FileStream(string path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, int bufferSize)	Unknown
 	Telerik.Reporting.dll!Telerik.Reporting.SQLite.SQLiteLibraryLoader.ExtractAndLoadLibrary(string lib, string appDataPath, bool versioned)	Unknown
 	Telerik.Reporting.dll!Telerik.Reporting.SQLite.SQLiteConnection.Initialize(string appDataPath)	Unknown
 	Telerik.Reporting.dll!Telerik.Reporting.Processing.ReportProcessor.InitializeSQLite(string path)	Unknown
 	Telerik.Reporting.dll!Telerik.Reporting.Processing.ReportProcessor.CreateProcessingContext(Telerik.Reporting.Processing.IRenderingContext context)	Unknown
 	Telerik.Reporting.dll!Telerik.Reporting.Processing.ReportProcessor.ProcessReportSource(Telerik.Reporting.ReportSource reportSource, Telerik.Reporting.Processing.IRenderingContext context)	Unknown
 	Telerik.Reporting.dll!Telerik.Reporting.Processing.ReportProcessor.ProcessReportSource(Telerik.Reporting.ReportSource reportSource, System.Collections.Hashtable deviceInfo, Telerik.Reporting.Processing.IRenderingContext context)	Unknown
 	Telerik.Reporting.dll!Telerik.Reporting.Processing.ReportProcessor.ProcessAndRender(string format, Telerik.Reporting.ReportSource reportSource, System.Collections.Hashtable deviceInfo, Telerik.Reporting.Processing.IRenderingContext renderingContext, Telerik.Reporting.Processing.CreateStream createStreamCallback)	Unknown
 	Telerik.Reporting.dll!Telerik.Reporting.Processing.ReportProcessor.ProcessAndRenderStateless(string format, Telerik.Reporting.ReportSource reportSource, System.Collections.Hashtable deviceInfo, Telerik.Reporting.Processing.IRenderingContext renderingContext, Telerik.Reporting.Processing.CreateStream createStreamCallback)	Unknown
 	Telerik.Reporting.dll!Telerik.Reporting.Processing.ReportProcessor.RenderReport.AnonymousMethod__0(Telerik.Reporting.Processing.SingleStreamManager sm)	Unknown
 	Telerik.Reporting.dll!Telerik.Reporting.Processing.ReportProcessor.RenderReportSafe(System.Func<Telerik.Reporting.Processing.SingleStreamManager, bool> renderCallback, string format, Telerik.Reporting.Processing.IRenderingContext renderingContext)	Unknown
 	Telerik.Reporting.dll!Telerik.Reporting.Processing.ReportProcessor.RenderReport(string format, Telerik.Reporting.ReportSource reportSource, System.Collections.Hashtable deviceInfo, System.Threading.CancellationToken cancellationToken)	Unknown
 	Telerik.Reporting.dll!Telerik.Reporting.Processing.ReportProcessor.RenderReport(string format, Telerik.Reporting.ReportSource reportSource, System.Collections.Hashtable deviceInfo)	Unknown
 
Nikolay
Telerik team
 answered on 03 Aug 2023
1 answer
139 views
How to set JsondataSource.Source value in Angular while Telerik report rendering report through telerik-angular-report-viewer. I tried to assign data through reportSource its not working.
Todor
Telerik team
 answered on 02 Aug 2023
2 answers
260 views

Hi, I have master report with subreport (Report Source set as XML Markup). Everything works fine when I preview it on Report Designer, but after import file to our app I have data only from master report. In subreport section I have error:

An error has occurred while processing SubReport 'subReportDetails':
Unable to establish a connection to the database. Please verify that your connection string is valid. In case you use a named connection string from
the application configuration file, make sure the name is correct and the connection string settings are present in the configuration file of your
application.
------------- InnerException -------------
Initialization string format is out of specification starting at index 0.

It works when I save login data for report but I don't want to save passwords in XML expression.

I wanted to try Assign connection string dynamically using report parameter and bindings - Telerik Reporting, but I don't know how to pass connection string from master report to subreport.

1 answer
72 views
Hi, is there any way to access the filters used in the report viewer from a button outside the report viewer?
Ralitsa
Telerik team
 answered on 01 Aug 2023
1 answer
105 views
We've been using Telerik Reports for years, and have allowed users to set up their own sorting. The below code worked no problem, until we recently upgraded all the way from version Q3 2015 to R1 2023. Now, sorting is never obeyed, despite the parameter on the report getting set - we write out the criteria one the outputted report, and that is correct. We've traced this code through with no errors, and the sortings do seem to be applied to the report object, but they are ignored when the report is built.
 protected override void OnNeedDataSource(object sender, EventArgs e)
        {
            base.OnNeedDataSource(sender, e);

            var report = sender as Telerik.Reporting.Processing.Report;

            //// Report Post Formatting.

            // Apply Sorts.
            if (report.Parameters["Sortings"].Value != null)
            {
                Common.ApplySort(this, report.Parameters["Sortings"].Value.ToString());
            }
}
public static void ApplySort(Report report, string sortingColumns)
        {
            // sorting Columns string format: ColumnName:Asc;ColumnName:Desc
            if (sortingColumns == null)
                return;

            foreach (var item in sortingColumns.Split(','))
            {
                // Get The field value for the column to sort by... IE. SellthroughValuePercent is an iff calculation.
                report.Report.Sortings.Add(new Sorting
                {
                    Expression = string.Format("=Fields.[{0}]", item.Split(':')[0]),
                    Direction = item.Split(':')[1] == "Asc" ? SortDirection.Asc : SortDirection.Desc,
                });
            }
        }
Any ideas to point us in the right direction? It's very frustrating to have bought a new version, but have features that worked before now fail without warning...
Momchil
Telerik team
 answered on 01 Aug 2023
2 answers
94 views
On a button click I want to export the report as a PDF. I need to pass the shipmentId but its not getting passed in. Is my code wrong? My storedProcd is set up as a SQLDatasource in the report. the parameter is set as a string. the code ignored what I am passing in. 
 // Create report source
                    var reportSource = new Telerik.Reporting.UriReportSource
                    {
                        Uri = Server.MapPath("Manifest.trdp") // Replace "PathToYourReport" with the actual path to your report
                    };
                    // add parameters to report source
                    reportSource.Parameters.Add(new Telerik.Reporting.Parameter("@shipmentId", shipmentsId.Value.ToString()));                                       

                    // Create report processor
                    var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
                    
                     // Render the report to PDF
                     var result = reportProcessor.RenderReport("PDF", reportSource, null);

                    if (result.HasErrors)
                    {                        
                        throw new Exception("There were errors during report processing: " + result.Errors[0].Message.ToString());
                    }

                    // Set the content type to PDF
                    Response.ContentType = "application/pdf";

         
                    // Write the PDF data to the output stream
                    Response.OutputStream.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);

                    // End the response to force it to client
                    Response.End();

Mark
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 31 Jul 2023
1 answer
148 views

I have a table in my report where i have the borders for the row and column headers set to solid 1pt borders

I also have conditional formatting set on the rows so that every other row has a light grey background color for readability

The problem is, that any row/column header that touches one of the detail rows with the conditional formatting loses the border that touches that cell.

I have attached screenshots of the report in preview mode and in design mode

Todor
Telerik team
 answered on 31 Jul 2023
1 answer
328 views

Hello guys,

I want to set up a DateTime property from my DB to use the Bulgarian culture inside a TextBox in the Report Designer. It should use one of the following formats "MMMM yyyy" or "Y" (example: декември 2015).

Using the following code I have found that the Culture does not change even though I have specifically set it to Bulgarian in the code, also in the Report culture and TextBox culture:

Fields.ProductionDate.ToString("Y", CultureInfo.GetCurrentCulture("bg-BG"))

What I have found up until now. is that using the following syntax, with the cultures of the Report and TextBox set. including setting the DateTime formatter for the TextBox to be July 2023 fixes the issue:

=Fields.ProductionDate

However, this does not work for me as the TextBox I am using the property in, includes a lot of text and the only way I have found to write code that way is using Curly Braces which do not seem to apply the selected format.

Result when using =Fields.ProductionDate:

Result when using {Fields.ProductionDate}:

Question 1: Is there a way to change the DateTime Format and Culture using the first approach, if so could you please attach a sample as everything so far that I have tried does not seem to work.

Question 2: Is there a way to go around the curly braces and use the =Fields.ProductionDate with square braces without the need to create a separate TextBox.

Thank you in advance.

Momchil
Telerik team
 answered on 28 Jul 2023
1 answer
127 views

Is it possible to filter by columns in a table from Telerik reporting like a grid view?

Eg. the Image is attached.

 

 

Nikolay
Telerik team
 answered on 28 Jul 2023
0 answers
105 views

I tried to follow the instructions here:

https://docs.telerik.com/reporting/designing-reports/report-designer-tools/web-report-designer/how-to-set-up-in-blazor-application

"Use NuGet package manager to add the Telerik.WebReportDesigner.Services package. This will also resolve other..."

Later on we have:


...
services.TryAddSingleton<IReportServiceConfiguration>(sp => new ReportServiceConfiguration
{
    ReportingEngineConfiguration = sp.GetService<IConfiguration>(),
    HostAppId = "BlazorWebReportDesignerDemo",
    Storage = new FileStorage(),
    ReportSourceResolver = new UriReportSourceResolver(Path.Combine(sp.GetService<IWebHostEnvironment>().WebRootPath, "Reports"))
});

But some of the types are not available. E.G. FileStorage()

Which is a part of 

Assembly Telerik.Reporting, Version=17.1.23.718, Culture=neutral, PublicKeyToken=a9d7983dfcc261be

So the instruction is misleading for beginners :-) 

Which additional pakets are needed?


Btw: A link to a ready made project may helpful.

:-)

Peter
Top achievements
Rank 1
Iron
Iron
 updated question on 26 Jul 2023
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?