OutOfBounds error, accessing member of dataset, row selector

Quick question, I am currently starting to use the report plugin to replace some older access driven reports we have.

In this report, I am using a sql query into the Row Selector to do filtering based on Time of Day. In the resulting dataset(single row) I would like to reference Time of Day field I just filtered on and was using the dataset access method I found in the helpfiles.

I can get the data that I want, but it start to throw up an OutOfBounds error quickly after.

So my question, Is that normal? And any ideas on how to work around it?

No, it doesn’t sound normal. But I’m not getting the whole picture here. Exactly where does the OutOfBounds error come from? What are the scripts involved? What is bound to what? Copy-and-paste the whole error stack trace here if you could please.

Oh, and what version of FactoryPMI, and what version of the Reporting Plugin?

Sure!
The Row Selector is bound to this query
“SELECT * FROM FQSUM WHERE DOQ_FQS = ‘{Root Container.Calendar.formattedDate}’ and FUR_FQS = ‘13’” and is filtering the results based on a 24time field(toq_fqs)

This will always return a single row when filtered, So I created an expression to access the (toq_fqs) field in the filtered dataset provided by the Row Selector
“{Root Container.Row Selector.dataOut}[“toq_fqs”]” and bound that to a label just to make sure I was getting the right value.

When I do that, I get the right value but it starts to throw up the attached errors.

I am using FPMI 3.2.5 along with the Reporting Plugin Version 1.1.14
error_factorypmi.txt (3.04 KB)

It looks like you’re trying to bind an expression into an empty dataset. I’m sure the dataset always has 1 row when something is selected, but I think you’re getting this error when the selection is empty.

Try modifying your expression to:

if(len({Root Container.Row Selector.dataOut})>0, {Root Container.Row Selector.dataOut}["toq_fqs"], "No Selection" )

Hope this helps,

Now that is interesting… Because I was getting that error even with somethign selected. Does the Row Selector dataset get cleared every time the query runs?

That code works btw.

Yeah, momentarily, which is why you need to protect against the case when the output dataset is empty.

GPP… It is all coming back to me now.

Good to know, Thanks for the help!