Reportview Multi-Select

Started by chrislegarth, October 28, 2016, 01:32:23 PM

Previous topic - Next topic

chrislegarth

So I would like to display a reportview and then let the user select a number of rows in the view and then display a count of the selected rows.
If I select the rows individually when holding down the control key, the number increments accordingly.  However, if I select a block of rows holding down the shift key, it appears as if the DialogProcOptions @deRvrSelect (18) fires for every row selected, i.e. I see my count actually counting up to the number selected.  If I select too many rows, I get a VMalloc error - VirtualAlloc Failed 487 error.

And to make it more interesting, if I deselect a row, my count does not decrement.

Am I doing something wrong? I must be but can't seem to figure out what it is.

Thanks!!!!!

td

The Dialog function is behaving exactly as it should, i.e., generating a user defined callback event for every row selected in the REPORTVIEW control.  From the Consolidated WIL Help file:

"Item Select Row: User has selected row in the REPORTVIEW control. The text of the first column of the selected row is passed to the callback UDF/UDS in the callback's fifth parameter."

The event does not fire when a row is deselected and it is not documented to do so.

You are getting the VMalloc error because you have exhausted the WIL interpreter's string space which totals about 250 MB with about 114 MB usable at any given  time.   (The difference between total and usable has to do with how the interpreter handles string variables internally.)

You might want to reconsider how you are going about doing whatever it is you want to do.



"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

td

I may have over overstated the available string memory a bit.  It is likely closer to ~88,000,000 bytes in a worst case scenario.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade