Community
Participate
Working Groups
description: View time style does not work after extending from library to report. build id: 2.3.0 v20080528-0630 steps to reproduce: 1. New a library and insert a label. 2. Use CSS file at view time. Apply a view time style to the label. 3. New a report and extend the lable from library. 4. Preview in html. Expected result: View time style should take effect when preview in html. Actual result: View time style does not take effect when preview in html.
What's view time style? Please upload the design file.
Created attachment 102306 [details] report design,library and CSS, it's a zip file The zip file contains a report design, a library, and two CSS. The only difference between the two CSS is that useCSS_red.css uses a red font color while local-yellow.css uses a yellow font color. To reproduce, you need to copy local-yellow.css to d:\ of your computer and copy other three files under the current project, then preview the report design in html. The expected behavior is that the font color should be yellow, which is defined in the view time CSS.
Need new Model APIs and also Engine supports for resource related issues. Schedule to 2.3.1.
Need to provide methods to collection external CSS URL from libraries like ScriptLibs.
Add getAllExternalIncludedCsses in ReportDesignHandle to return the list of the IncludedCssStyleSheetHandle that set external URI and reside in the design iteself and the referred library theme. Assign Engine to do rest part.
I have fixed the Engine part of this bug. But the case in Comment #2 still can't work. It only works for the elements which are not come from a report library. This part needs Model team to fix it. So reassign this bug to Report.
(In reply to comment #6) > I have fixed the Engine part of this bug. But the case in Comment #2 still > can't work. > > It only works for the elements which are not come from a report library. This > part needs Model team to fix it. So reassign this bug to Report. > In BIRT, libraries and report are in hierarchy structure. That means a library style can be used indirectly in the report design. However, in the output html, it is a flat structure. Thus, it causes the problem to locate which style one report element has used. For example, one report label may indirectly use "style1" in the lib1 by using the lib1's "libLabel1". And at the same time, the report has the "style1" locally. To follow the css specification, the style should have no namespace. But in such case, Engine must know the different between "lib1".style1 and "report.style1. If one design has multiple libraries, the case may become much more complicated. Looks the external css feature doesn't comply with current BIRT framework. One suggestion is to disable external css feature in the library. If this feature is only applicable to the design, it will be much simple.
(In reply to comment #7) > (In reply to comment #6) > > I have fixed the Engine part of this bug. But the case in Comment #2 still > > can't work. > > > > It only works for the elements which are not come from a report library. This > > part needs Model team to fix it. So reassign this bug to Report. > > > In BIRT, libraries and report are in hierarchy structure. That means a library > style can be used indirectly in the report design. However, in the output html, > it is a flat structure. > Thus, it causes the problem to locate which style one report element has used. > For example, one report label may indirectly use "style1" in the lib1 by using > the lib1's "libLabel1". And at the same time, the report has the "style1" > locally. To follow the css specification, the style should have no namespace. > But in such case, Engine must know the different between "lib1".style1 and > "report.style1. If one design has multiple libraries, the case may become much > more complicated. Looks the external css feature doesn't comply with current > BIRT framework. > One suggestion is to disable external css feature in the library. If this > feature is only applicable to the design, it will be much simple. If a report local style overwrites the external CSS style in library, I think it is correct bhavior that the external CSS style is not used in view time. There is a separate bugzilla about NOT to auto merge styles into an auto generated classes for report elements, suggest consider this bug together with that project in 2.5.0.
We known that for each report item, the user can define the style in following places: 1. define the style in the default style "report". 2. define the style in the element's default style, such as label-style, data-style etc. 3. define the style as the element's class, such as class="style-name" 4. define the style as the element's inline properties. 5. change the style as the element's script. To output the styles as it is, BIRT needs: 1. change the styleClass in the IContent from String to String[]. 2. change the implementation of the script API to support multiple style classes as "class, class". 3. change the CSS engine to support String[] classes. 4. change the implementation of HTML emitter to support multiple styleClasses.
Fixed. For the original case, it still can't be supported and it won't be fixed. For a view time style specified in library: 1. the named styles do not work. 2. the selector styles work.
Closing this bug as extending view time style from library to report will not be supported. Will submit another bug about the pre-defined style using CSS file.
Due to bug 276658, this feature is rollbacked. According to css spec, the priority of styles are determined by the sequence the styles are defined but not that they are used. This makes Wei's solution in comment #9 is not able to be accomplished. We need to find new solution.
Due to the limitation of the CSS, BIRT can't support this feature.
close.