Hi all,
I have a following default code in a html file for a web designer.
$(document).ready(function () {
$("#webReportDesigner").telerik_WebReportDesigner({
persistSession: false,
toolboxArea: {
layout: "list"
},
serviceUrl: "some url",
report: "some_report_name",
}).data("telerik_WebDesigner");
});
I have also a custom report storage implemented from IDefinitionStorage, where I have a GetDefinition("some_report_name") method implemented in a custom way. In order to do that, I need to send additional parameters from a web designer (html code provided previously) but don't know how to do that.
For example, I need to open SalesInvoice.trdx file and I do a following: report: "SalesInvoice.trdx". If i need to send additional parameter, let's say some kind of token, there is no good place to send it. As a work around, i am doing report: "SalesInvoice.trdx&token=123". The problem with this, it is appearing in a title of a web designer and I don't want that. In an attachments, there is a screenshot where it looks good with a simple name and the one which has a token in it.
So, the question is, can I send other parameters as well from a client side of web designer to the server like parameters or so?
In a HTML5 ReportViewer we can send report file name and parameters as a reportSource like this:
serviceUrl: serviceUrl,
reportSource: {
report: reportUrl,
parameters: reportParams,
Can we do the same? Or how can I do that?
Thanks,
7 Answers, 1 is accepted
Hi Mirzodaler,
Currently, Web Report Designer does not expose any options for passing the parameter to the custom report storage. Could you let us know how exactly the parameter is used in your scenario? Does the parameter differ for each report or it is the same? This information will help us think about possible options and workarounds.
Regards,
Katia
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
Hi Katia,
As my previous post states, I don't have exact report name. I am sending bunch of guids as a string and my custom report storage determine which report to get, it can be from a memory or database. I need to show a user friendly Title of the report in a web designer. If you see attached images in a previous post (title-with-token.png), you can see that it is not helpful title for a user.
Si if there will be a "report Title" property separated from reportUrl it can be helpful. Or report url with an array of parameters will be more elegenat.
Thanks,
Hi Mirzodaler,
So if I understood correctly the title of the report does not depend on the logic that retrieves the report in custom report storage? Do you know the title in advance?
Regards,
Katia
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
Hi Katia,
Yes, the Title of the report is available in advance, only additional parameters needs to be sent without mixing it with title.
Thanks,
Hello Mirzodaler,
Thank you for the additional clarifications. I logged your request into our Feedback portal - Provide a way to send additional parameters from web designer. This is the official process for processing new requests that allows us to measure the demand for features and plan them accordingly.
Regards,
Katia
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
If you need a workaround you can override Jquery ReportViewer function and send your parameters
if($.fn['telerik_ReportViewer']){
const oldReportViewer = $.fn['telerik_ReportViewer'];
$.fn['telerik_ReportViewer'] = function (e) {
e.reportSource.parameters = {
Client_Name: "My Client Name"
, OrderNumber: "#1234567"
}
return oldReportViewer.apply(this, arguments);
}
}
Hi,
Thanks for letting us know. We are aware of using that with ReportViewer. We need that for
telerik_WebReportDesigner
Hi Mirzodaler,
You may try to implement the approach from the Using PrintPreview as a Default ViewMode in the Web Report Designer KB article except that instead of using the viewMode method to set the view mode, you may call the reportSource(rs) method with the report source object.
Regards,
Dimitar
Progress Telerik
If you need a workaround you can override Jquery ReportViewer function and send your parameters