BIRT Report: object not defined
I need to do something like:
Status Severity1 sev2 sev3 sev4
open 1 0 3 1
in progress 0 2 1 0
closed 1 1 2 3
When using Cross Tab, I notice that I can only have one joint to show the names of status or severity, hence one will show as literal id instead of name.
Following the discussion in this post:
https://jazz.net/forum/questions/23371/birt-reports-multiple-quotjoinsquot
http://jazz.net/library/video/288
http://jazz.net/library/video/289
I tried to do step by step as per the videos but when I have one dataset as enumeration to show severity(customized enumeration) and another data set project area(exactly same as in the video).
When setting projectArea; to severity's parameter project area itemid's default value, it always complains projectArea is not defined hence failed to save.
If I simply set severity project area itemid parameter's default value as '{Current Project Name}', then continue by setting Object(), and mapping enumeration's Literal ID to Liternal Name(exactly following video 289, in the stage of create a computed Column, adding sev[row["STRING_VAL"]], if I run preview, it will complain sev is not defined(sev is the same as themes created in the video).
I am not sure what I am doing wrong. Does anyone know what could be the cause that the scripts do not work properly in my case?
Thank you very much.
4 answers
http://www.ibm.com/developerworks/rational/library/10/creatingcustomreportswithbirtandrtc-part3/
Comments
Thanks Donald for the link.
As you can see from my screenshots, I am pretty sure I have followed the videos and added Total.count() and javascript but the defined object can not be "seen" by other data set.
Thanks Donald. When moving Total.Count(); to top of cross tab table, step 9 to creating computed column works now. but step 5 and 6 still complains the projectArea not defined.
if (typeof(projectArea) == "undefined") {
null;
} else {
projectArea;
}
You can also try initializing projectArea = null; in the report body initialize method.
Thank you very much for the reply. I am providing the procedures I am trying following your videos to explain more(I cant attach the design file here, no option to do that. Since I have to add many screenshots, comments won't allow me to do that, have to use answer here)
1. Create Work item dataset for custom severity enumeration
2. create severity dataset
3. Project area dataset from Common data source
4. Define projectArea in the script for project area dataset
5. pass projectArea; to severity dataset
6. when clicking OK, it complains projectArea is not defined(which I did define but it is not able to pass from different dataset(from Project Area to severity)
(detailed errors:
A BIRT exception occurred.
Plug-in Provider:Eclipse.org
Plug-in Name:BIRT Data Engine
Plug-in ID:org.eclipse.birt.data
Version:2.6.2.r262_v20110215
Error Code:data.engine.UnexpectedError
Error Message:Data engine operation failed due to an unexpected exception.
A BIRT exception occurred. See next exception for more information.
There are errors evaluating script "projectArea;":
ReferenceError: "projectArea" is not defined.
)
7. Now I set the default value of project area itemid in severity's parameter to '{Current Project Area}' to workaround the above error in order to move forward.
Create dynamic text to bind severity dataset, preview result looks ok.
8. Create new object and mapping following the instructions in the videos:
9.Create computed column in workitem dataset
10. It allows me to save but when previewing, it throws error that sev is not defined hence the computed column can not be computed. the problem seems to be similar to the previous projectArea not defined.
What did I do wrong in the above experiment? I follow the instructions in the videos although I do notice the BIRT version could be different. I installed the specified version in the 4.0.6 help. Please help. thanks a lot.
Comments
Workspace .log file only has:(repeated)
!ENTRY com.ibm.team.repository.client.util.ThreadCheck 4 1000 2014-09-08 10:17:39.412
!MESSAGE Long-running operations prohibited on this thread
!STACK 0
java.lang.IllegalStateException: Long-running operations prohibited on this thread
at com.ibm.team.repository.client.util.ThreadCheck.checkLongOpsAllowed(ThreadCheck.java:118)
at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(ServiceInterfaceProxy.java:92)
at com.sun.proxy.$Proxy27.fetchSnapshotDescriptorByName(Unknown Source)
at com.ibm.team.reports.client.internal.ReportManager$12.run(ReportManager.java:500)
at com.ibm.team.reports.client.internal.ReportManager$12.run(ReportManager.java:1)
at com.ibm.team.repository.client.internal.TeamRepository$3.run(TeamRepository.java:1320)