I'm quite new into BIRT; I am developing a report that shows the content of a database table which is selected by a parameter in a previous JSP page.
I have modified the "this.queryText" within the beforeOpen event in the dataset ( this.queryText.replace("TABLENAME",parms["MYPARAMETER"].value)") And I just get the data I really want from the table I selected, but I don't know how to "print it" into the report, if I just draw a table within the layout view I got the following message
Column binding "CUSTOMERNUMBER" has referred to a data set column "CUSTOMERNUMBER" which does not exist. (Element ID:967)
because the name of the columns do not match with the name of the supossed table I selected (for example ORDERS)
I also tried to change the column data binding expression like this
if (parms["MYPARAMETER"] =table1)
{
setDataRow["Rowoftable1"]
}
if (parms["MYPARAMETER"] =table2)
{
setDataRow["Rowoftable2"]
}
but It doesn't work neither
So, in a nutshell, how can I show in a table the content of a "parametrized DataSet" wich I don't know the name of the columns in advance ?
This is simpler than calling the de api to change a tables bindings.
Jason
On 7/28/2011 2:01 PM, josete4ever wrote:
> Hello BIRT comunity,
> I'm quite new into BIRT; I am developing a report that shows the content
> of a database table which is selected by a parameter in a previous JSP
> page.
> I have modified the "this.queryText" within the beforeOpen event in the
> dataset (
> this.queryText.replace("TABLENAME",parms["MYPARAMETER"].value)") And I
> just get the data I really want from the table I selected, but I don't
> know how to "print it" into the report, if I just draw a table within
> the layout view I got the following message
>
> Column binding "CUSTOMERNUMBER" has referred to a data set column
> "CUSTOMERNUMBER" which does not exist. (Element ID:967)
>
> because the name of the columns do not match with the name of the
> supossed table I selected (for example ORDERS)
> I also tried to change the column data binding expression like this
>
> if (parms["MYPARAMETER"] =table1)
> {
> setDataRow["Rowoftable1"]
> }
>
> if (parms["MYPARAMETER"] =table2)
> {
> setDataRow["Rowoftable2"]
> }
>
> but It doesn't work neither
>
>
> So, in a nutshell, how can I show in a table the content of a
> "parametrized DataSet" wich I don't know the name of the columns in
> advance ?
> Thank you very much
>
>
Sounds good, but remember hidden tables still run queries.
Jason
On 7/29/2011 12:08 PM, josete4ever wrote:
> Thanks for your response, at the end of the day what i did is to change
> the expression for visibility of some tables in the report like this:
> Visible if ---> params["TableName"].value != "ParameterTableName"
>
> :blush:
> Thank for your response.