We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Creating Custom LoadReport function

Hello,
we want to create our own LoadReport function.
Assume we have got a Button on the aspx Site:

According to this, we created a function:
function LoadReport() {
clientTarget = $("#OLAPClient").data("ejOlapClient");
var serializedCustomObject = JSON.stringify({});
var oclientWaitingPopup = $("#" + clientTarget._id).data("ejWaitingPopup");
oclientWaitingPopup.show();
clientTarget.doAjaxPost("POST", clientTarget.model.url + "/" + clientTarget.model.serviceMethodSettings.loadReport, JSON.stringify({
"reportName": "abc", "olapReport": serializedCustomObject, "clientReports": clientTarget.reports
}), clientTarget._renderControlSuccess);
return false;
}
With this call we can get to the relating web service function, it creates a report object which i can observe with the debugger. But after finishing the web service function, the site remains in the waiting popup screen. How can we achieve, that the report is loaded correctly?
Best regards
Thomas Gramer

3 Replies

RG Ramesh Govindaraj Syncfusion Team September 29, 2015 12:47 PM UTC

Hi Thomas,

We have created a sample based on your requirement and which is available in the below link.

Sample Link:  http://www.syncfusion.com/downloads/support/forum/120626/ze/WebApplication41-169539888
 
Please let us know if you have any query.

Regards,
Ramesh G.


SG Sven Grundmann September 30, 2015 01:22 PM UTC

Hello Ramesh,

thank you for reply. The example you created is close to what we want to do.

In your example you called the doAjaxPost with the parameter clientTarget._fetchReportListSuccess at the end, which obviously invokes the fetchReportsFromDB function of the service methods. After that, a modal  popup is shown with a list of all reports avialable. 
In our case, we already have the report name and want to invoke the LoadReportsFromDB method directly. Is there a way to achieve this?

Regards

Thomas Gramer


RG Ramesh Govindaraj Syncfusion Team October 1, 2015 11:47 AM UTC

Hi Thomas,

We have modified the prototype sample to load the “LoadReportsFromDB” method directly. So please do check the sample code and adapt them accordingly in your application.

Sample Link:  http://www.syncfusion.com/downloads/support/forum/120626/ze/WebApplication41-777016134

Regards,
Ramesh G.

Loader.
Up arrow icon