Online Designer

Stimulsoft Reports.JS discussion
jpgb
Posts: 67
Joined: Tue Mar 15, 2016 11:42 am

Online Designer

Post by jpgb »

1. I preview a mrt report with some data loaded into it.

2. I dont like the mrt template, so I open the designer through the designer button in the viewer.

How can i (in the save event) just save the loaded mrt file with the changes made in the designer? without any data of course, only the mrt template in the same folder where it was...

thanks
JB
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Online Designer

Post by HighAley »

Hello.

The data are not stored in the report template file.
The mrt-file does not contains the data.

Thank you.
jpgb
Posts: 67
Joined: Tue Mar 15, 2016 11:42 am

Re: Online Designer

Post by jpgb »

But is there a method to save the mrt file after doing some changes to it with the online designer?

Perhaps i didnt express myself well, i want the users to view a report (with the viewer), and if they dont like something in the report (a label or a color), i pass the same report from the viewer to the designer and they make some changes. Then they will have to save the template again. Is there a method to do this last save action?

thanks
JB
jpgb
Posts: 67
Joined: Tue Mar 15, 2016 11:42 am

Re: Online Designer

Post by jpgb »

well in the designer.onSaveReport, i got the report with "var jsonStr = event.report.saveToJsonString();"

and sent it with a ajax call and then save it as a mrt file in php: file_put_contents($name, $data);

But loading this mrt file in the viewer i get this error:

e.properties(...).firstOrDefault(...) is undefined
stimuls...orts.js (line 154)
TypeError: report.pages.getByIndex(...) is undefined
jpgb
Posts: 67
Joined: Tue Mar 15, 2016 11:42 am

Re: Online Designer

Post by jpgb »

if i do this:

event.report.dictionary.databases.clear();
event.report.dictionary.dataSources.clear();
event.report.regData("Connection1", "Connection1", null);

before I do

event.report.saveToJsonString();

and save it in php to a mrt file

I can load the saved report to the viewer, but still get one error:

e.properties(...).firstOrDefault(...) is undefined
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Online Designer

Post by HighAley »

Hello.

Could you specify the version that you use?
Please, try our latest build.
If it's possible, please, send us a sample that will let us to reproduce the issue.

Thank you.
jpgb
Posts: 67
Joined: Tue Mar 15, 2016 11:42 am

Re: Online Designer

Post by jpgb »

Using last build (21.01)

1. Open the report with viewer

2. Pass the report object from the viewer to the designer

3. Modify report in the designer

4. Save it to Json String, make ajax call to php where it saves the json string to a file

5. Try to open the new report and then I get those errors

Thanks
JB
Attachments
report.mrt
report
(13.69 KiB) Downloaded 160 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Online Designer

Post by Alex K. »

Hello,

Sorry for the delay with response.

We couldn't reproduce this bug. Could you explain your issue in more details?

Thank you.
Attachments
photo_2017-01-31_12-09-43.jpg
photo_2017-01-31_12-09-43.jpg (56.24 KiB) Viewed 3889 times
jpgb
Posts: 67
Joined: Tue Mar 15, 2016 11:42 am

Re: Online Designer

Post by jpgb »

Hello Aleksey,

Sorry, i forgot to say that It already works, but when i preview the mrt report in the viewer i get in the browser console the folowing error:

e.properties(...).firstOrDefault(...) is undefined

but it works.

Thanks
JB
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Online Designer

Post by Alex K. »

Hello,

We couldn't reproduce this bug.
Please clarify which browser and version are you use?

Thank you.
Post Reply