Project: Birt
Bug 294740 Map IDs generated for charts are unique only per report - if more than one report is included in a page, they clash
Reported: 2009-11-10 09:19:29 | Status: verified fixed

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729) Build Identifier: 20090619-0625 (Eclipse IDE for Java and Report Developers) The map IDs generated (by HTMLReportEmitter.IDGenerator) are unique per-report, but if multiple reports are included in a single JSP page, they class with one another, owing to each taking the strategy of incrementing from 1 (AUTOGENBOOKMARK_1, AUTOGENBOOKMARK_2, etc.). Here are a couple of possible fixes: 1. use a more random algorithm (GUID, etc.) to come up with the bookmark value 2. make IDGenerator an interface and allow the user to supply a class name with a default constructor (the current could be the default) as part of the report setup Reproducible: Always Steps to Reproduce: 1. Create two reports (in my case, I have a servlet to serve them) 2. Include them on a single JSP page (I used <c:import...) 3. The bookmarks clash

Files changed in fix:
engine/org.eclipse.birt.report.engine.emitter.html/src/org/eclipse/birt/report/engine/emitter/html/HTMLReportEmitter.java