This is a migrated thread and some comments may be shown as answers.

ReportController - CreateInstance - ClientReportSource

2 Answers 19 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nutan
Top achievements
Rank 1
Nutan asked on 30 Dec 2020, 02:46 PM

Hello,

In ReportController override method - 

public override HttpResponseMessage CreateInstance(string clientID, ClientReportSource reportSource)

 

reportSource.Report gives the required report file name - which is as expected.

However, when same method is called for a sub-report then reportSource.Report  returns complete server path of the sub-report rather than only the report file name.

Being new to Telerik, I am not sure if this is the default behaviour.
Is there any way I can change this to only receive the sub-report file name?

Thank you!

2 Answers, 1 is accepted

Sort by
0
Accepted
Mads
Telerik team
answered on 04 Jan 2021, 01:39 PM

Hi Nutan,

I have looked into this, and from my investigation, I believe you are referring to how a report-file is referenced when it's linked in another report? Meaning, when an Action is applied to an element in a report, with a 'Navigate To Report', the full path to the file is used as a reference for that report. 

To explain further, a subreport is when one report is embedded in another report. This causes the CreateInstance method to be called only once since it is part of the same rendering task. But when one report is linking to a different report and that link is triggered, a new CreateInstance call is being made to start the task of rendering the linked report.

This is currently the default behavior, but after discussing this with one of our developers, we agree that this can be improved. I have logged this as a bug in our Feedback Portal, "Full system-path being used by REST Service as reference when linked by a 'Navigate To Report' action" and added a vote for this item on your behalf. As a token of gratitude for helping us improve our product, I have updated your Telerik Points.

Let me know if this is the case you were referring to, or if you have any further questions.

Regards, Mads Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Nutan
Top achievements
Rank 1
answered on 11 Jan 2021, 02:09 PM

Hi Mads,

Thank you for confirming that this is the default behaviour.

You did get it right - I was referring to a report linked to another report.- generally used to drill down the details further.

I appreciate that you have added this for future product enhancements.

For now, we have updated getParameters and createReportInstance functions in telerikReportViewer*.js file - so that report parameter is reset to only have the file name.

Best Regards

Nutan

 

 

Tags
General Discussions
Asked by
Nutan
Top achievements
Rank 1
Answers by
Mads
Telerik team
Nutan
Top achievements
Rank 1
Share this question
or