Page 1 of 2

Online Designer

Posted: Wed Jan 25, 2017 5:47 pm
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

Re: Online Designer

Posted: Thu Jan 26, 2017 11:00 am
by HighAley
Hello.

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

Thank you.

Re: Online Designer

Posted: Thu Jan 26, 2017 12:19 pm
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

Re: Online Designer

Posted: Thu Jan 26, 2017 7:08 pm
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

Re: Online Designer

Posted: Fri Jan 27, 2017 12:45 pm
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

Re: Online Designer

Posted: Fri Jan 27, 2017 1:38 pm
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.

Re: Online Designer

Posted: Fri Jan 27, 2017 4:59 pm
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

Re: Online Designer

Posted: Tue Jan 31, 2017 9:10 am
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.

Re: Online Designer

Posted: Wed Feb 01, 2017 2:19 pm
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

Re: Online Designer

Posted: Wed Feb 01, 2017 8:53 pm
by Alex K.
Hello,

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

Thank you.