How can I draw a line vertical between two datapoints of a line Chart in Telerik Reporting?
Hope you can help!
Hello,
I'm currently converting an old proprietary reporting system to Telerik.
To convert the legacy reports, I programmatically build a Telerik Report and map each property from the legacy domain model to the Telerik one; this approach works, but I'm experiencing problems with visibility property.
In particular, I need to define blocks of report items that can be shown/hidden accordingly to an expression that depends on data from the DataSource; my approach is:
I actually tried both Binding (like said above) and Conditional formatting, but the panels are always hidden (even if I force my user-defined expression to return true or false). What am I doing wrong?
How do I export a report to HTML? I can export to PDF, JPEG, and MHTML just fine, but not HTML. Here is the code I'm trying to use:
public static byte[] GetInvoiceHTML(Guid id, HttpServerUtility Server) |
{ |
// Get report object (with data). |
Telerik.Reporting.Report rpt = GetInvoiceReport(id, Server); |
// Render report object to HTML (byte array). |
string mimeType = string.Empty; |
string ext = string.Empty; |
Encoding encoding = Encoding.Default; |
byte[] bytes = Telerik.Reporting.Processing.ReportProcessor.Render("HTML", rpt, null, out mimeType, out ext, out encoding); |
// Convert byte array to string. |
return bytes; |
} |
In reading, it appears that Telerik supports .NET 5 (.net core 5) and would like to migrate but do not see any documentation around it.
My current solution is:
Full Framework project so I can use the VS designer to design the reports. Each report consists of a .cs, .Designer.cs, and .resx file.
.NET 2.0 standard project with a file link to those reports (not a copy) for unit testing and consumption
example in the project file:
<
ItemGroup
>
<
Compile
Include
=
"..\OtherProject\Telerik\Report.cs"
Link
=
"Telerik\Report.cs"
/>
<
Compile
Include
=
"..\OtherProject\Telerik\Report.Designer.cs"
Link
=
"Telerik\Report.Designer.cs"
/>
<
EmbeddedResource
Include
=
"..\OtherProject\Telerik\Report.resx"
Link
=
"Telerik\Report.resx"
/>
</
ItemGroup
>
.Net Core 3.1 app consuming the .NET 2.0 standard project.
How do I migrate those reports from the .NET 2.0 standard project to a native .NET 5 project while maintaining the designer capability?
I downloaded the Trial version of the reporting stuff and when I run the example project: CSharp.Net5.BlazorIntegrationDemo I get this exception:
Could not load type 'Telerik.Reporting.HtmlRendering2.HtmlReport' from assembly 'Telerik.Reporting, Version=15.0.21.120, Culture=neutral, PublicKeyToken=a9d7983dfcc261be'.
please advise
I can load the report viewer in react following this guide:
https://docs.telerik.com/reporting/knowledge-base/how-to-use-html5-viewer-in-react-js
But when I add react route, it failed when there is any input parameter.
<Route path="/test" component={ReportViewerFunction} /> // success
<Route path="/test2/:name" component={ReportViewerFunction} /> //show TypeError: window.jQuery(...).telerik_ReportViewer is not a function
And then I found this document, says that:
Such error can occur if:
jQuery is not loaded;
jQuery is loaded more than once and with different version;
jQuery is loaded at later stage in the page life cycle.
https://docs.telerik.com/reporting/knowledge-base/getting-telerik-reportviewer-is-not-a-function-console-error
I do not know how to fix this problem. Is there a better way to implement the report viewer in React?
Also I would like to know how to direct print the report, instead of every time preview the report before printing.
Long story short, im trying to implement dependency injection into a grid controller. The project i use is a .NET CORE Application using the Telerik UI template.
The problem is that i cannot make an ajax call to function inside my grid controller aslong as i do dependency injection. If i remove Constructor with the provided dependency injections it works fine.
In the view that i make an ajax call looks like this
<div class="row">
<div class="col-12">
<kendo-grid name="VehicleHome" height="550">
<columns>
<column field="Id" title="ID">
<filterable enabled="false"></filterable>
</column>
<column field="Name" title="Namn" />
</columns>
<scrollable enabled="true" />
<sortable enabled="true" />
<pageable enabled="true" />
<filterable enabled="true" />
<datasource type="DataSourceTagHelperType.Ajax" page-size="20">
<transport>
<read url="@Url.Action("VehicleHome_Read", "VehicleHome")" />
</transport>
</datasource>
</kendo-grid>
</div>
</div>
And the controller and function i make an call to like this:
public class VehicleHomeController : Controller
{
private readonly IVehicleHomeService _vehicleHomeService;
private readonly IVehicleService _vehicleService;
public VehicleHomeController(IVehicleHomeService vehicleHomeService, IVehicleService vehicleService)
{
this._vehicleHomeService = vehicleHomeService;
this._vehicleService = vehicleService;
}
public ActionResult VehicleHome_Read([DataSourceRequest] DataSourceRequest request)
{
var result = Enumerable.Range(0, 50).Select(i => new VehicleHomeViewModel()
{
Id = i * i,
Name = "Vehicle Home " + i
});
var dsResult = result.ToDataSourceResult(request);
return Json(dsResult);
}
}
1. As u see, im not even using the dependencies that is passed through the constructor. Still this causes the function to not be accessed by the ajax call.
2. If i remove the constructor and the interface i can access it. How Come?
Thankful for answers