How to use database value and parameter in BIRT script?
Hi All,
I want to know the fundamentals of BIRT script.
Can any one know good link where I can find good basic concepts of BIRT scripting, its variable declaration, getting value from a table in the script, assigning this value to a variable, use this value in script for condition checking, its variable scope?
PLEASE GIVE THE REFERENCE LINK.
Also I have noticed there are many event in BIRT script like initialize, before factory, on prepare, on render etc. , so I want to know the order in which they run and what are there main functions and difference between them. I want to know their specifications.Actually it is very hard to use them without knowing their specification. So, where are the specification?
Also I want to state the main problem:
How to pass a database value to "function beforeGeneration(chart, icsc)" function? How to pass parameter value here?
Actually, here I want to check the database value and parameter value first and then draw graph color (i.e fill.set)
For example,
Problem1.if my_ parameter= 1 then do this
else do this
How can i get this my_parameter value in report script?
Problem2.if table1.field1= A then do this
else do this
How can i get this database value in report script?
Problem3.Can I directly pass a database value to a function?
function beforeDrawDataPoint(dph, fill, icsc)
{
if (dph.getBaseDisplayValue() == "A") {
fill.set(200,38,0);
} else if (dph.getBaseDisplayValue() == "B") {
fill.set(247,150,70);
} else {
fill.set(0,255,0);
}
}
Can I directly use variable here i.e rather than writing fill.set(0,255,0) can I write fill.set(variable1) or fill.set(mytable.customercolor) where variable1 is a variable and mytable.customercolor means customercolor filed of table mytable.
Here I want to control fill.set(0,255,0) functions color depending upon parameter value and database value.
Please ask me for any clarification.
Thanks in Advance!
Robert