Telerik Forums
Reporting Forum
1 answer
86 views

Currently, we use SSRS in our ASP.NET MVC apps to automatically generate tabular, in-memory reports based on RDLC templates against SQL Server data. The PDF produced by SSRS are downloaded to the user's browser. We don't provide any report viewer components on the page. How do you do this using Telerik Reporting?

Also, do you have beginner training videos for Telerik Reporting?

Thank you.

Dimitar
Telerik team
 answered on 26 Dec 2023
1 answer
28 views

I am making a telerik report

However, I want to display a diagonal line in the textbox when a specific value comes in.

I want it to be displayed like this.


this.textBox10.Name = "textBox10"; this.textBox10.Size = new Telerik.Reporting.Drawing.SizeU(Telerik.Reporting.Drawing.Unit.Cm(1.5D), Telerik.Reporting.Drawing.Unit.Cm(0.5D)); this.textBox10.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center; this.textBox10.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle; this.textBox10.StyleName = "Aspect.TableBody"; this.textBox10.Value = "= IIf(Fields.Name = 'Day', ' ', Fields.Name)";


I wrote the code like this, and first of all, if the data is Day, it is treated as blank, but when the data is Day, I want to display it like an image

Todor
Telerik team
 answered on 30 Oct 2023
0 answers
44 views

Hello I'm having issues when report is being generated thru report viewer its creating empty spaces.

Preview Looks good.

Report viewer.

Appreciate any help thanks.

1 answer
38 views

im having an issue getting the total to align correctly the Pharm name and quantity line up correctly but the total is getting kicked to the right. i have a attached the report and relevant screen shot

thanks!!

 
Dimitar
Telerik team
 answered on 02 Oct 2023
1 answer
150 views

Hello!

It's used the next version of telerik: Telerik_Reporting_R2_2020_SP1_14_1_20_618

After trying to open the generated html content in the preview mode in different browser the additional pages appeares. In the template all looks good but some unexpected things appeared on the generated html (screenshot was attached):

1. unexpected border (border: 2px solid darkblue;) appeared around the all report content

2. Ctrl+P gets 2 pages but it's expected 1!

3. unexpected css styles appeared in the <head> and a lot of inlined styles appeared at all tags. For instance, the next style at <body> tag  

style="padding-left:57px;padding-right:38px;padding-top:57px;padding-bottom:38px;width:102

gets the mentioned extra page. How it's possible to control the process of generating this styles??

Generated pdf content gets an expected 1 page during the printing.

I attached the template and html rendering result in the archive

Thanks

Todor
Telerik team
 answered on 28 Aug 2023
1 answer
81 views

Hi,

We have a scenario where we need to render the report in multiple worksheets(sheets) within a excel (xlsx) file. We are successful in generating such report when rendered through the desktop client and also in Report Viewer, but when trying to generate the file using  Telerik.Reporting.Processing.ReportProcessor.RenderReport() method, the data is not splitted in to two sheets. Everything is rendered in single sheet.

The way I am rendering the report is simple - 

            var reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
            var manager = new ReportConnectionStringManager(connectionString);
            ReportSource reportSource = manager.UpdateReportSource(uriReportSource);

            var result = reportProcessor.RenderReport("XLSX", reportSource, null);

and in the report design, we are using SplitWorksheetOnPageBreak property.

 

Please help us in achieving what we want. Is there any other way to render the report.

 

Thanks,

Jyothi

Dimitar
Telerik team
 answered on 24 Aug 2023
1 answer
80 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
2 answers
41 views

Hi i'm davide, in these days i'm working for a project that requires telerik on windows form c# desktop application.        So i'm trying to figure out what i need to do it but i don't find pretty much anything online, i can't find a solution please help me.

My little exercise consist in asking a year of school (1 to 5) to print only the ones students in that year, cvyear is a int from 0 to 5, I'M ITALIAN SO 1) ANNO = YEAR, classes is a type class, stu is a list of student. CODE:

string year = cvyear.ToString();
            var report1 = new Telerik.Reporting.Report();
            report1.DataSource = null;
            reportViewer1.ReportSource = null;
            var objectDataSource1 = new Telerik.Reporting.ObjectDataSource();
            objectDataSource1.DataSource = null;
            objectDataSource1.DataSource = classes.Stu;
            report1.DataSource = objectDataSource1;
            Telerik.Reporting.ReportParameter reportParameter1 = new Telerik.Reporting.ReportParameter();
            reportParameter1.Name = "yearParam";
            reportParameter1.Text = "Enter Value for year";
            reportParameter1.Type = Telerik.Reporting.ReportParameterType.Integer;
            reportParameter1.AllowBlank = false;
            reportParameter1.AllowNull = false;
            reportParameter1.Value = year;
           
            reportParameter1.Visible = true;
            
            reportParameter1.AvailableValues.DataSource = objectDataSource1;
            reportParameter1.AvailableValues.ValueMember = "= Fields.Anno";
  
            Telerik.Reporting.Filter filter1 = new Telerik.Reporting.Filter();
            filter1.Expression = "= Fields.Anno";
            filter1.Operator = Telerik.Reporting.FilterOperator.Equal;
            filter1.Value = "="+ year;
            

            Telerik.Reporting.InstanceReportSource reportSource = new Telerik.Reporting.InstanceReportSource();
            reportSource.ReportDocument = report1;
            reportViewer1.ReportSource = reportSource;
            reportViewer1.ClearHistory();
            
            reportViewer1.RefreshReport();

 

Davide
Top achievements
Rank 1
Iron
 updated answer on 29 Jun 2023
1 answer
75 views

We have a report which has a List element in it.

The whole report is bound to a .NET list of a data-class. The class has a property which is .NET list of a different data-class. 

For some reason, this List is adding extra "empty" items at the end of our actual data.

For example,

In the above screenshot, the list to which the List is bound, has only 4 items (the red arrow is where i'm putting out the dataList.Count).

Yet you can see that after putting out the 4 valid data items, it then added two additional empty items with no data in them ($0 by 1/1/1).
Why it is adding extra items that are NOT in the dataList, and how do we get it to stop that? Those last two items should just be empty, nothing there, no text. So the List SHOULD be generating an output that looks like this:

Momchil
Telerik team
 answered on 21 Jun 2023
1 answer
64 views

Hi,
 I am working on a ASP.NET Core (.NET 6) web application with the main report UI using the HTML 5 viewer, working from the REST service controller.

We also require automated report exporting to run at scheduled times with predefined parameters (to be stored and emailed). SQL datasource(s) and engine settings will be the same as used in the reports controller.

Please can you advise on the best approach to process and output export files from the server-side application code.

It looks like I need to use the ReportProcessor class, but not sure how to make use of "engine" config...

 

Further application detail and problem encountered:

I have implemented the EF Core based report storage example and have a custom function assembly, used in most reports.

The IReportSourceResolver is provided along with the engine configuration - connections strings and custom function assembly reference - in a ReportServiceConfiguration instance for the ReportsController.


I believe that ReportProcessor does not somehow obtain the IReportServiceConfiguration the REST controller has injected.

There is no issue running code in a background job (eg. Quartz.NET):

  • loading a report instance with the IReportSourceResolver implementation
  • using code based on this example to set SQL datasource connection strings
  • using ReportProcessor.RenderReport().

This has worked fine for a little while, but the ReportProcessor seems to no longer find and load the custom assembly - though I'm sure it is output to the build location (and has had no recent changes).

Thanks.



Top users last month
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
MIS
Top achievements
Rank 1
Ross
Top achievements
Rank 1
Marcin
Top achievements
Rank 1
Iron
Iron
Sean
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?