Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 331976

Summary: BIRT putting css classes forcefully on report
Product: z_Archived Reporter: Pulin Pathneja <pulin.pathneja>
Component: BIRTAssignee: Birt-ReportEngine-inbox <Birt-ReportEngine-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: bluesoldier, wyan
Version: unspecified   
Target Milestone: 3.7.0   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Pulin Pathneja CLA 2010-12-07 00:21:41 EST
Build Identifier: 

We have tab structure in web page where the reports are getting rendered. one tab contain single report and another tab club both the reports.

Now the problem is first report(in 1st tab) comes very nicely but in 2nd tab(contains second report+first report) is totally cluttered. Both are using the same style sheet which is being linked (not imported).

some of the elements are taking classes which are not applied to them. 


More Details regarding the bug can be found at 

http://www.birt-exchange.org/org/forum/index.php/topic/20952-birt-putting-css-classes-forcefully-on-report/page__p__70427__fromsearch__1&#entry70427



Reproducible: Always

Steps to Reproduce:
1. Create two reports
2. Apply style sheet to them
3. Include these two reports in one page

The whole reports would be cluttered. When the reports would be seen individually, it would work fine.

The reason for this is while rendering of the report report engine changes the class name of the style to style_1, style_2 etc. from the original names. As these two reports are rendered separately. So these styles contradict with each other.
Comment 1 Wei Yan CLA 2010-12-07 12:28:02 EST
You can use the HTMLRenderOption.setHTMLIDNamespace set the name prefix, so the name won't conflict with each other.
Comment 2 Xiaoying Gu CLA 2011-04-12 04:12:50 EDT
After use options.setHTMLIDNamespace("REPORT_PREFIX");
 before rendering the report, the generated sytle name will be .REPORT_PREFIX_style_0{...}

Set as worksforme.