Community
Participate
Working Groups
CSS files are currently imported into the report design. A more common use case is to link to the CSS file which is maintained outside of the report design environment. This way, updates made to the CSS file do not require re-importing. This would be similar to the library concept.
The CSS file is not designed as the library concept. It is not auto referenced. Once you import the CSS styls from the external CSS file, the style is created in the report design and can work alone without the CSS file.
This is not a bug. It is an enhancement request to make CSS files auto referenceable. Please don't close out enhancement requests. That is the job of product management I believe.
The CSS style sheet is created for user the import the style into birt design but not for reference. The style can be referenced from library.
Now model loads styles into report design.And there is no reference between css file and styles. Because for model we can't know when css file is changed and when it should be reloaded. It is different from library. When library inclued in report design is changed, GUI will tell model library is changed and should be refreshed. For css file,GUI can't give us more information about whether css file is changed. For regular solution, model should check it time by time. Set a timer maybe every 5 or 10 minutes to check the css file whether this file is lost or be edited. I don't think such enhancement is deserved. You know the timer will cost a lot of performance. Otherwise I don't know the better method to check status of css file time by time. So please check it. Thanks!
(In reply to comment #4) > Now model loads styles into report design.And there is no reference between css > file and styles. Because for model we can't know when css file is changed and > when it should be reloaded. It is different from library. When library inclued > in report design is changed, GUI will tell model library is changed and should > be refreshed. > For css file,GUI can't give us more information about whether css file is > changed. > For regular solution, model should check it time by time. Set a timer maybe > every 5 or 10 minutes to check the css file whether this file is lost or be > edited. I don't think such enhancement is deserved. You know the timer will > cost a lot of performance. Otherwise I don't know the better method to check > status of css file time by time. So please check it. Thanks! I agree there is no need to auto detect the css file has been changed after it is loaded into report design. Suggest we only need to support loading the css file when the report design XML is openned. And provide method on the report design handle to reload the referenced css file, and also provide a method to reload referenced libraries. MOdel do not need to detect library file change or css file change. THe client of model can decide if it will detect lib or css file change or simply require user to manually reload the referenced lib or css files. Regardless if such auto detection is implemented by UI or not, the ability to reference a CSS file in model is still a very useful feature, expecially after the report is deployed. Please only load the referenced css file during report generation. Then the styles should be extracted from the css file and persisted into the report document. THe report document should be self-contained. It should not depend on the external CSS file. During render task, there should be no need to load the external css file.
If want to load css file when opening report design xml file , model should store its relative file path like library. I think absolute file path is forbiddened. Following our file search strategy, css file should be under 'org.eclipse.birt.resources' plugin package , resource folder or the same folder of input design file. So GUI or others should do such copy action when first create relationship between design file and css file. Then model will support importCss, refreshCss , removeCss method.
Created attachment 62731 [details] Feature spec
Model and UI changes are done.