Telerik Forums
Reporting Forum
2 answers
818 views

I have a Telerik Reporting Library 2019 project which contains Telerik Reports. The reports are consumed from a ASP.NET Core web application when controller actions are called. So there is a reference to this Reporting library project from Web project.

In the web project I create a ReportBook to generate report. and render the report as a PDF.

[HttpGet("{reportId}", Name = "Report")]
public async Task<IActionResult> Get(Guid reportId)
{
    //Report Book
    var reportBook = new ReportBook();
    var instanceReportBookSource = new InstanceReportSource
    {
        ReportDocument = reportBook
    };
 
    //Cover Page
    var coverPageReportSource = new InstanceReportSource();
    var coverPagereport = new CoverPage(reportId)
    {
        DocumentName = "Cover Page Report"
    };
    coverPageReportSource.ReportDocument = coverPagereport;
    reportBook.ReportSources.Add(coverPageReportSource);
 
    var reportProcessor = new ReportProcessor();
    var renderingResult = reportProcessor.RenderReport("PDF", instanceReportBookSource, new Hashtable());
 
    var fileName = renderingResult.DocumentName + "." + renderingResult.Extension;
    var path = Path.GetTempPath();
    var filePath = Path.Combine(path, fileName);
 
    using (var fs = new FileStream(filePath, FileMode.Create))
    {
        fs.Write(renderingResult.DocumentBytes, 0, renderingResult.DocumentBytes.Length);
    }
 
    var output = renderingResult.DocumentBytes;
    return File(output, "application/pdf");
}

 

 In the reports I have few PictureBox components. I want to set pictures from a http url (https://docs.telerik.com/reporting/report-items-picture-box#data-binding)

Example

1.var pictureBox = ((Telerik.Reporting.PictureBox)(reportDef.Items.Find("pictureBox1", true)[0]));
2.pictureBox.Value = "https://d585tldpucyb98b4-413e94c0e92bvanemkallan.jpg"; //Some Image URL

 

But when I try to do that it always gives an error (report-error.png). Is this because I have report definition in one project and consuming it from another project (web project). How can I solve this.

 

 

 

Todor
Telerik team
 answered on 07 May 2019
5 answers
784 views

Hi. I have error page. (attached file)

We have four servers. only 1 server has this problem. All settings are same. I couldn't find any differences.

The report page has just a small circle shape.

I used default Html5ReportViewer1.html and aspx form which is created by Visual Studio new file menu.

 

When I use fiddler I got this message with URL /api/reports/clients.

 

{"message":"An error has occurred.","exceptionMessage":"개체 참조가 개체의 인스턴스로 설정되지 않았습니다.","exceptionType":"System.NullReferenceException","stackTrace":"   

위치: Telerik.Reporting.Cache.CacheStorage.AddInSet(String key, String value)\r\n   
위치: Telerik.Reporting.Services.Engine.PersistableCollection`1.NewItem(String newID, Action`1 initializeObject)\r\n   
위치: Telerik.Reporting.Services.Engine.ReportEngine.RegisterClient()\r\n   
위치: Telerik.Reporting.Services.WebApi.ReportsControllerBase.RegisterClient()\r\n   
위치: lambda_method(Closure , Object , Object[] )\r\n  
위치: System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass13.<GetExecutor>b__c(Object instance, Object[] methodParameters)\r\n   
위치: System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)"}

Silviya
Telerik team
 answered on 07 May 2019
3 answers
428 views
Hi  All,

I use Telerik Report Designer to handle data into a Report Designer table as an output . I have a list of object. This object has a few properties to correspondents to this Report table columns. I want to hide / collapse some of the Report table columns dynamically.

I searched/ googled on any forum even if Telerik, but there are no exact solutions.

Could any one help me about this?

Thanks in advance.

Kerem
Guilherme
Top achievements
Rank 1
 answered on 06 May 2019
0 answers
74 views

I am looking for Kendo Grid row select when click on button in the popup in TypeScripting. Would you please help me.

 

Thanks,

Nomesh

Nomesh
Top achievements
Rank 1
 asked on 04 May 2019
1 answer
149 views

Hi,

I have a report with lot of columns. I need to show it with the fixed font size(8px) and horizontal scroll bar in HTML Report Viewer. But when I try to render the report, the report shrinks(it tries to fit in the container). How can I render the report without shrinking it and with horizontal scroll bar

 

Regards,

Majar

Majar
Top achievements
Rank 1
 answered on 03 May 2019
3 answers
2.9K+ views
Hi,

I am trying to get a report like this:

Group A
GroupB.1 item1 item2
                item3 item4
GroupB.2 item5 item6
                item7 item8

For this, I have a group and inside the detail section a table which has a binding DataSource =ReportItem.DataObject. But the row grouping seems to be not working. When I give the same data source directly to the table though, I get row grouping but without the report grouping. Is there any way to achieve this?
Neli
Telerik team
 answered on 03 May 2019
3 answers
670 views

Hello!

I have designed a table inside a Group Header.

Now I want to filter the datasource of the table with the key value of the group header.

How can I make this?

A.Kleine

Neli
Telerik team
 answered on 03 May 2019
1 answer
590 views
Hi,
  • I have a report with a table in the detail section inside a Group: Location. Both the report and the table have the same data source which is specified through code. I am using a filter in the table to get the entries by the Location in the group (Fields.Location = ReportItem.Parent.DataObject.Location). While the table is getting filtered, the rows are repeating which is not desirable. Is this the proper way to do this kind of filtering?

    Regards,
    Athul
    Neli
    Telerik team
     answered on 02 May 2019
    1 answer
    141 views

    I create my report form  and it can export docx file (click preview mode and select export with "Word Document").

    but after I resize textbox43 to fit content, it get the corrupt docx file. How can I solve this problem . 

    Silviya
    Telerik team
     answered on 02 May 2019
    5 answers
    495 views

    I recently upgraded by ASP.Core beta web project to an ASP.NET Core 2.0 application with an ASP.NET Core 2.0 API behind it.

    Before the upgrade, my Telerik reports ran fine.

    Now, the HTML5 viewer appears, and throws the following error:

    "Error registering the viewer with the service. An error has occurred. The type initializer for 'Lock' threw an exception."

    In Chrome developer's console, the following javascript error shows:

    1#:1 Uncaught (in promise) Invalid cliendID
    Promise.then (async)
    refreshReport @ telerikReportViewer-12.0.18.227.js:1442
    start @ telerikReportViewer-12.0.18.227.js:5417

    I have followed the exact steps from here to support ASP.NET Core 2.0 apps:

    https://docs.telerik.com/reporting/html5-report-viewer-asp-net-core-2#html5-report-viewer-in-asp-net-core-2

    Any ideas what the error means and how to fix it?

    Thanks!

    Silviya
    Telerik team
     answered on 02 May 2019
    Top users last month
    Tien
    Top achievements
    Rank 1
    Iron
    Krasimir
    Top achievements
    Rank 3
    Bronze
    Iron
    Iron
    Cedar
    Top achievements
    Rank 1
    Iron
    Emil
    Top achievements
    Rank 1
    Iron
    Kyle Watson
    Top achievements
    Rank 1
    Iron
    Want to show your ninja superpower to fellow developers?
    Want to show your ninja superpower to fellow developers?