[#10566] - Changing style doesn't show up in preview report

Category:
Bug report
Priority:
Normal
Status:
Closed
Project: Severity:
Minor
Resolution:
Fixed
Component: Reproducibility:
N/A
Assigned to:
0

I have a project with 1 report (just a Blank_A4.jrxml) and 1 style (not an internal style!).

The style is very simple. Its just NEW_STYLE.jrtx.
The report is very simple. It's choose the "Blank A4" template and put a Static Field in the Title band.

1. I change the fontsize in the NEW_STYLE from 10 to 22 points.
2. I select the designtab of the BLANK_A4.jrxml and I still see a fontsize of 10. I expect to see a fontsize of 22
3. I preview BLANK_A4.jrxml and I still see a fontsize of 10. I expect to see a fontsize of 22
4. I save the NEW_STYLE.
5. I select the designtab of the BLANK_A4.jrxml and I still see a fontsize of 10. I expect to see a fontsize of 22
6. I preview BLANK_A4.jrxml and now I see the expected fontsize of 22
7. I close the tab of editor of BLANK_A4.jrxml.
8. I reopen the editor tab of BLANK_A4.jrxml
9. I select the designtab of the BLANK_A4.jrxml and now I see the expected fontsize of 22

What am I doing wrong here?
Did I forget to set a preference?

v6.4
Jaspersoft Studio
kees.kuip's picture
Joined: Feb 25 2016 - 3:00am
Last seen: 3 weeks 2 days ago

3 Comments:

#1
  • Resolution:Open» Works as Designed
  • Status:New» Closed
  • Assigned:nobody» morlandin

Hi,
the template style are not automatically reloaded in JSS to avoid to slow down the application. The preview of a report is a separate process and for this reason when running the preview it grab the resources in the state they are in that moment. But in the designer once the template style resource is loaded it is keep cached, because realoding it continously could slow down the whole application. For this reason for the style element the reload is manual, if you right click on a template style element in the outline you will have the contextual option "Reload Style", with this the template style resource is refreshed.

#2

I see you have closed this issue. I do not think that is the right way to handle this. I think this needs to be solved. This problem is one of the many strange problems I have encountered while using JasperSoftStudio. It is not a very nice userexperience.

In the early days of iReport I was a contributer and things just worked. And if it didn't work we would fix it.

Mind you, I am not asking you to reload it continously. I'm only asking to reload it when it is changed!

Please reopen this issue.

#3
  • Resolution:Works as Designed» Fixed

Consider that iReport was much simplier than JSS, for example does iReport load a Template Style from an instance of JRS, an URL or any location that an extension of JR can resolve starting from an expression? because the problem is mostly this one and iReport at the time was doing a lot of thing in a simplier way excluding many use cases. When you define a link to a tempalte style you provide and expression, then this expression is evaluated from JR asking to any of the extensions that provide resources (the repository services) if they can resolve this expression. If one of them is able to resolve then it return the byte data of the resource itself. Now from a JSS point of view you don't know who resolved the expression and neither where the physical resource is located, so you can't do any check if the resource was updated or not.
However since you have this problem I've implemented a sort of trick, when a template style is edited in JSS (and the extension of the file must per jrtx) every open report is completely refreshed and all its template styles (if any) are reloaded. Also in some limit cases this can have an observable impact of performances (many report opened at the same time with many template styles used). Instead if the resource is still local but modfied with any other editor (ie external text editor) or is remote then the contextual action must be used, this is the best we can do from a JSS point of view.

Feedback
randomness