SpagoBI studio and BIRT report with string parameters not working

SpagoBI Studio BIRT cannot get the definition of an external dataset if the dataset has a String parameter.

I would like to have an external dataset with string parameters defined in SpagoBI. This dataset uses a parameter in the WHERE clause. I would like to use SpagoBI Studio to generate a BIRT report that uses the same dataset and passes the required dataset parameters appropriately.

When I try to get the external dataset definition (with parameters) into a BIRT report, I get an error and it cannot import the dataset definition. If I remove these parameters from the dataset, retrieving the dataset definition works, but I no longer have the parameters.

If the external dataset has String parameters that are used in the WHERE clause of the query, SpagoBI Studio / BIRT will not work when trying to connect / retrieve the dataset. I can't get to the point where I can specify that null is a valid BIRT parameter value because ... it fails before it can display dataset fields, parameters, etc. In BIRT

When the external dataset has numeric parameters, the whole script works fine, but I'm limited to passing numeric parameters to select a record in the query.

See the following JIRA.

Studio fails to import external dataset where the query has single quotes wrapping the parameter http://www.spagoworld.org/jira/browse/SPAGOBI-1870

Discussion on the forum, http://www.spagoworld.org/jforum/posts/list/3187.page#10288

+3


source to share


1 answer


It turns out that passing a String parameter to SpagoBI and Birt actually works, but there are some oversights to work with.

  • Directly In the dataset, a string-based parameter is automatically enclosed in single quotes. So, in preview mode, don't put single quotes around your preview option.

  • Directly on the dataset, if any part of the WHERE clause for the SQL query uses a unique identifier, you will have to convert it to String. This can be compared to String. This error caused most of the problems, but the error message was not descriptive.



With the above two points in mind, the dataset can now be imported into SpagoBI Studio / BIRT.

  1. When running a report against this dataset in SpagoBI Studio / BIRT, do not include the string parameter in single quotes. In this scenario, automatic typing of data string parameters works.

  2. When running a report document via SpagoBI GUI or SDK, you need to pass the parameter enclosed in single quotes, because the dataset does not automatically wrap the string parameter as you would expect.

+2


source







All Articles