Json response from GetReport method

Stimulsoft Reports.WEB discussion
Post Reply
Sreejith
Posts: 6
Joined: Fri Nov 24, 2017 5:58 am

Json response from GetReport method

Post by Sreejith »

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
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Json response from GetReport method

Post by HighAley »

Hello, Sree.

We have made an improvement of this issue just a day before.
The fix will be available in our next build in a few days.

Meanwhile you could use this solution:

Code: Select all

return Content("ServerError:An error occurred while loading the report file.");
Thank you.
Post Reply