Home
Analytics
Report Parameter Error
Tom_A
Hello,
I cannot seem to get report parameters to work. I am using the BIRT Report Designer 2.3.0.
Here is what is happening...I created a new report parameter (string/list box/dynamic) then went into the dataset that I want the parameter to be applied to, created a new parameter and linked it to the report parameter.
When I preview the report, I am not prompted to enter in a parameter despite the fact that I have made it required. Then, the section of the report I am trying to assign the parameter to is blank, and I receive this error message at the bottom of the report:
The following items have errors:
Table (id = 474):
+ An exception occurred during processing. Please see the following message for details:
Cannot set the string value ((All)) to parameter 1.
Cannot set preparedStatement parameter string value.
SQL error #1: Invalid column index.
Any thoughts?
Find more posts tagged with
Comments
mwilliams
Hi Tom,
Can you attach your report design? The parameter screen should pop up if your parameter is required. If you're using just the "preview", there is a button to show the parameter page at the top of the preview window.
As for the error, are you trying to make the value of an integer parameter be "all"?
Tom_A
Hello...thanks for your response...I just saw it this morning. The parameter screen pops up now when I first run the report so I think that part of it is ok.
Originally, I had put "(All)" into the Default Value section because I was trying to get the whole list of names to show up in the dropdown to select from when I run the report. When I leave the Default Value section blank, I still cannot generate the report because there aren't any values in the drop down list for the parameter. Currently (in the attached file) I have set the default value to one of the names in the list but when I attempt to generate the report, I receive the following error:
The following items have errors:
Table (id = 474):
+ An exception occurred during processing. Please see the following message for details:
Cannot set the string value (Citigroup Energy Inc.) to parameter 1.
Cannot set preparedStatement parameter string value.
SQL error #1: Invalid column index
mwilliams
The reason for this is probably that you're pulling the values from the same dataSet that you're limiting with that parameter. The first time you run it, it'll work fine, but after that, caching of the value will screw things up because your dataSet will be limited by the parameter value when called to fill the parameter selection box. To get around this, you might want to create a separate dataSet just to fill the parameter list that only pulls in the field that you want the user to choose from. Hope this helps.
Tom_A
Thanks. I followed your advice and now the parameter name list generates as I would expect it to every time, which is great. However, I linked the parameter to the data set that I am trying to limit and again I received another error:
Table (id = 474):
+ An exception occurred during processing. Please see the following message for details:
Cannot set the string value (Southern Montana Electric Generation & Transmission Cooperative) to parameter 1.
Cannot set preparedStatement parameter string value.
SQL error #1: Invalid column index
Please advise...
mwilliams
Skimming your query in the "Total Exposures" dataSet, i don't see the dataSet parameter marker, '?'. Do you have one in a where clause that I'm not seeing?
Tom_A
I didn't realize I needed to add one. I went ahead and tried it, and it worked. Thank you VERY much for your help! I've been toiling with this off and on for a long time with zero success...next time I'll come to the forums sooner.
mwilliams
Sounds good. Let us know whenever you have questions!