Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to receive array parameters by BIRT

Shulou Source: shulou.com Published: 2022-06-01 02:07:04 09月25日 Update

This article introduces how BIRT receives array parameters, the content is very detailed, interested friends can refer to, I hope it can be helpful to you.

Because BIRT does not directly support array parameters to participate in the query, that is, it is impossible to pass an array directly to DataSet to execute SQL with in, so it is difficult to spell SQL directly in the dataset.

However, this can be done in an indirect way:

1. Define the SQL (select * from XX) that selects all the data in DataSet, and then define parameters (such as arg1, the display type is List Box) to allow multiple values.

2. Select the beforeOpen event in the Script page of DataSet, and write the following JS script to perform SQL stitching (beforeOpen refers to performing stitching SQL before dataset query):

...

Param = reportContext.getParameterValue ("arg1")

Tmp = ""

For (var iTuno Bandi)

Tags: Parameters arrays queries data content reports more types results scripts help good uncertainty events code interest can pass characters strings guys Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Shulou Technology Shulou Information Shulou Tech Info Xiaomi