Telerik Forums
Reporting Forum
1 answer
171 views

How can I draw a line vertical between two datapoints of a line Chart in Telerik Reporting?

Hope you can help!

Mads
Telerik team
 answered on 18 Feb 2021
5 answers
249 views

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:

  1. define each row of the legacy report as a Telerik Reporting TextBox with CanGrow and CanShrink properties enabled, an Height of 1pica and Docking set to Top; I do not set any position for the row, because as I understood correctly, docking to top automatically stacks the items.
  2. define a Telerik Reporting Panel for each group of rows that I need to control visibility of; the properties set are the Height (which is set as the Height of all the contained TextBoxes), the Docking (which is set to Top) and the Bindings (which binds the "Visibility" path to a user-defined expression that returns a boolean); I do not set any position for the panel neither, because as I understood correctly, docking to top also skips hidden items when stacking items.
  3. add the rows to the panel, and the panels to the report section.

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?

NiccoMlt
Top achievements
Rank 1
Veteran
 answered on 18 Feb 2021
6 answers
288 views
This may be more of a visual studio question, but is there a way to "Zoom" in  while in the reporting designer view?  I have a lot of really small textboxes adjoining each other (think manual radgrid) and moving and aligning them has been difficult.  Any suggestions?  If I could view the designer at 200%, it would have taken about 1/2 the time.
pierre-jean
Top achievements
Rank 1
Veteran
Iron
 answered on 16 Feb 2021
13 answers
1.0K+ views

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;  
    } 

The byte array returned is always 0 bytes.

Dimitar
Telerik team
 answered on 16 Feb 2021
3 answers
116 views
Hi there everyone. How are you? Hope you are doing great !! Actually I recently started working as a asp.net Developer and wanted to print graphs and invoices using Telerik reporting but you see I can't get my head around how Telerik reporting works ... I am designing the pdf in Visual studio and binding it with a DTO and programmatically Mapping values to it but you see there is no clear documentation nor there is any tutorial that will help me better understand Telerik reporting I am very frustrated. Help will be very much appreciated
Dimitar
Telerik team
 answered on 15 Feb 2021
1 answer
470 views

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?

Todor
Telerik team
 answered on 15 Feb 2021
1 answer
336 views

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 

 

Neli
Telerik team
 answered on 15 Feb 2021
2 answers
386 views

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.

SHING SHUN
Top achievements
Rank 1
Iron
 answered on 13 Feb 2021
1 answer
167 views

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

 

Erik
Top achievements
Rank 1
Veteran
 answered on 12 Feb 2021
1 answer
174 views
I am creating an application and I need to allow the user to create his own report design to save in the database and then fill it out at another time, I saw that it has a web designer feature, but I have not found an example of this implementation.








Neli
Telerik team
 answered on 11 Feb 2021
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?