Hello,
I have an existing report that consists of two pages and should have the same header on both pages, but different footers. How can I transfer the existing report to the report book without changing the code under which the report was saved? Or how can I add two different footers into one report?
Thank you for your reply.
Vedrana Turković
Hi Team,
I have created the Telerik report (.trdp) to show some data in Line Chart with below details.
Chart Type : Line Chart
Series : LineSeries
LineType : Smooth Line
YaxisScale : Numerical Scale.
Xaxis Scale : DateTime Scale
I have exported the PDF from Telerik Report designer and it is working fine i.e, Line Type is smooth throughout . However , when I integrate the telerik report in my Asp.net Web api I started getting following issue. Line series is partially Smooth for continuous values and straight Line for missing values. Please let us know the solution to make the entire line type smooth.
PFA Screen shots for issue.
Picture 1 : Working picture, pdf Exported from telerik report designer.
Picture 2 : Issue image, Pdf Exported from Web api code.
Thanks
We have a custom report screen that uses multiple reporting frameworks to render reports as files (typically Excel). The available reports are loaded dynamically at runtime, the user picks a report which retrieves and displays the report parameters for the users to enter values, and then the report can be rendered to the file type that they choose.
We will be creating single reports (.trdp files) and report books (.trbp files) and uploading those onto the server for use with this screen. We are currently using the R1 2023 Reporting framework. Our application is written in c# and uses .NET Framework 4.8.
I have almost everything working with the Telerik framework but cannot find anywhere to create a ReportBook object from a .trbp file. The closest I found was this forum post (https://www.telerik.com/forums/reportbook-by-path-name)and this article on Deserializing from XML (https://docs.telerik.com/reporting/embedding-reports/program-the-report-definition/serialize-report-definition-in-xml). This does not work and I assume things have totally changed given the post was over 10 years old.
Using the code below gives the exception "Data at the root level is invalid. Line 1, position 1." The .trbp file that we are attempting to load was designed using the Telerik Standalone Report Designer.
var reportBook = new Telerik.Reporting.ReportBook();
using (System.IO.FileStream stream = new System.IO.FileStream(reportPath, System.IO.FileMode.Open))
{
Telerik.Reporting.XmlSerialization.ReportXmlSerializer xmlSerializer = new Telerik.Reporting.XmlSerialization.ReportXmlSerializer();
reportBook = (Telerik.Reporting.ReportBook)xmlSerializer.Deserialize(stream);
}
Is it possible to load a .trbp file into a ReportBook object? If so, how?
Thanks,
Jason
I've been going through the documentation repeatedly for a few days and I believe that what I'm looking to use is the ReportBook but not sure where to start.
For some insight, we have roughly around 8 reports in total. These reports vary but for the most part, they are individual reports intended for one role to view. However, the problem here is that we need to take 3 of these reports and iterate over selections to create a single report for viewing.
Current Scenario:
A district manager can view reports on locations. Each location has 3 reports that can be viewed independently. Along with this, the district manager can also view an "Overview" report that sums up the data of their locations in a single report. The Overview is very basic and no detail is provided. All reports contain parameters of the location id and a start and end date for gathering data.
Problem Scenario:
The problem now is that we need for the district manager to be able to capture a full detailed report of all selected locations in a single report. In this scenario, the district manager may select from 1 to N amount of locations and a report is generated based on the selections. This generated report will show all 3 reports for each location selected.
I'm not sure where to start with such an implementation and the documentation on ReportBook isn't very detailed.
Tech stack is .NET 6 with Blazor frontend and .NET 6 backend in separate applications.
Hello,
I am trying to see what option is the best for making report book in run time in my angular application.
In the article posted by you : https://docs.telerik.com/reporting/knowledge-base/how-to-display-reportbook-in-viewer , the third solution is not recommended but that solution explains what I need, and that is that users can check reports which they want to merge in a report book, and do it by themselves and not by me in design time. So my question is why this solution is not recommended? Is there any bugs, any problems or this is just not working properly ?
Thanks in advance!
Tamara
Hello,
I've created a report in standalone report designer with custom function. And saved it in trdp format.
I added a custom function and connected the assembly as described in this manual.
In the report editor, I see my function and use it, however when I try to use this report for printing, my function becomes unavailable.
public class BaseReportBook<TModel> : ReportBook, IDisposable
{
public virtual byte[] CreatePdf(TModel model, ReportTypeEnum reportType)
{
var reportPackager = new ReportPackager();
using var sourceStream = File.OpenRead(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Reports", reportType.GetDescription()));
var report = (Telerik.Reporting.Report)reportPackager.UnpackageDocument(sourceStream);
report.ItemDataBinding += new EventHandler((sender, e) => Report_ItemDataBinding(sender, e, model));
InstanceReportSource reportSource = new InstanceReportSource();
reportSource.ReportDocument = report;
ReportSources.Add(reportSource);
ReportProcessor reportProcessor = new ReportProcessor();
var instanceReport = new InstanceReportSource();
instanceReport.ReportDocument = this;
RenderingResult result = reportProcessor.RenderReport("PDF", instanceReport, null);
if (result.Errors.Length > 0)
throw new Exception(string.Join("\r\nError: ", result.Errors.Select(s => s.Message)));
return result.DocumentBytes;
}
private void Report_ItemDataBinding(object sender, EventArgs e, TModel model)
{
Telerik.Reporting.Processing.Report item = (Telerik.Reporting.Processing.Report)sender;
item.DataSource = model;
}
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
GC.SuppressFinalize(this);
GC.Collect();
}
}
reportType.GetDescription() returns the name of the report (e.g. test.trdp)
The report is successfully generated, but it does not see my function. Although they are in the same assembly.
When viewing the preview in the editor, the function works:
Here is the function itself:
public static class CustomFunctions
{
[Function(Category = "Images", Namespace = "Extension", Description = "Images")]
public static Image GetLogo() => new Bitmap(Properties.Resources.logo);
}
Hello
I'm sorry to ask you this question because it's very simple.
When I set A3 in pageSettings and print, A4 size is the default setting, not A3 size.
How do I set up that part?
Hi,
I need to make a report with several PNG images and generate a PNG file with transparency in a Winforms application.
So I made a report with the background 'Transparent' and some PictureBox.
this.Style.BackgroundColor = System.Drawing.Color.Transparent;
this.detail.Style.BackgroundColor = System.Drawing.Color.Transparent;
Then I export to PNG with Telerik ReportProcessor and RenderingResult.
But the background is white. :-(
How can I export this report with transparent background ?
Thanks
Frederic
$(document).ready(function () {
const url = '/api/reports/formats';
$.getJSON(url, function () {
$("#content").text("Telerik Reporting REST Service is up and running.");
})
.fail(function (data) {
$("#content").html("Telerik Reporting REST Service is NOT running: <br />" + data.responseText);
});
});
Hi,
We are trying to bind a parameter value to TitleStyle.Color property of Table of Contents and we are getting an error :
"An error has occured while processing TocSection 'tocsection1' : Bindings error - The value of property 'TitleStyle' is null."
We have tried TitleStyle.FontBold with the value 'True'. The same errors pops up for all TitleStyle property assignment.
The parameters has values in it and it works when assigned to Style.Color or Style.BackgroundColor.
Can you please help us to resolve this issue?