Json response from GetReport method
Posted: Wed Nov 29, 2017 1:05 am
Hi everyone,
I'm trying to show an info message to the user instead of showing the report. Here is the json string I'm returning back from GetReport action method.
var result = new { success = false, type = "Info", text = "Info message" };
Debugging through the stimulsoft js code, I find that showError method is checking whether the message is of Json format. But in postAjax method since the reponse type is set to text(xmlHttp.responseType = "text";) the response will always be read as string. Since a Json.Parse() is missing, I'm not able to show an info message to the user even after sending a Json response.
Is there a work around for this. How do I show a info message to the user instead of report?
Thanks much for your help in advance.
Thanks,
Sree
I'm trying to show an info message to the user instead of showing the report. Here is the json string I'm returning back from GetReport action method.
var result = new { success = false, type = "Info", text = "Info message" };
Debugging through the stimulsoft js code, I find that showError method is checking whether the message is of Json format. But in postAjax method since the reponse type is set to text(xmlHttp.responseType = "text";) the response will always be read as string. Since a Json.Parse() is missing, I'm not able to show an info message to the user even after sending a Json response.
Is there a work around for this. How do I show a info message to the user instead of report?
Thanks much for your help in advance.
Thanks,
Sree