Articles in this section
Category / Section

How to Resolve "Cannot Pass More Than 100 Arguments to a Function" Error in Bold Reports with PostgreSQL

Published:
Updated:

When using Bold Reports with PostgreSQL as the data source, you may encounter an issue when trying to send over a hundred parameter values for dataset filtering. This problem appears in the report viewer with the error message: cannot pass more than 100 arguments to a function, as shown in the provided screenshot.

image.png

To avoid this error, concatenate the parameter values into a single string and then split them in the query. Follow the steps below to resolve the issue:

  1. Identify the parameter causing the error in your Bold Reports query designer.

  2. Modify the parameter value using an expression to concatenate the parameter values into a comma-separated string, you can use the following expression:

    Expression: =Join(Parameters!ID.Value, “,”)

    image.png

    image.png

  3. Modify the query in the Query Designer using the unnest function as shown in the code snippet below:

    SELECT "public"."example"."id",
           "public"."example"."name",
           "public"."example"."age"
    FROM "public"."example"
    WHERE "public"."example"."id" IN (
       SELECT unnest(STRING_TO_ARRAY(@ID,',')::int[])
    )
    

    image.png

  4. Save the changes made in the Query Designer and parameter values, then re-run the report to ensure that the issue has been successfully resolved.

    image.png

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied