Exploding reports? (AREV Specific)
At 16 APR 1998 03:32:21PM Michael Slack wrote:
Does AREV have the capability to explode multivalue values within a LIST reports?
A long time ago when I was working on a Prime OS (PICK based), it had the ability to explode multivalue data into a report and treat each multivalue like it was a single value. So if you listed a row to a report that had three multivalue items, it would display what looked like three lines of data, all identical in the single value fields and the multi value columns would look like single values as well. So if I had a row with an ID and a multivalue column that looked like:
123@FMa@VMb@VMc
and ran a report like
LIST tablename multivaue-column BY-EXP multivalue-column
that it would display the row like:
123 a
123 b
123 c
It would then within the LIST statement treat each of these rows as if all of the data was single values. So if I had a inventory table where a single item could be stored in multiple stockrooms (the stockrooms where the item is stored is listed within the inventory row) and wanted to get just the items within a particular stock room, I could explode the stockroom field to get that data. Something like:
LIST INVENTORY WITH STOCKROOM=SW-567' BY-EXP STOCKROOM
This way the only inventory items that I would get on the report would be those in stockroom 'SW-567', even tho those same inventory items may be stored in other stockrooms as well.
Can AREV 3.12 do anything like this, if so how do I do it? I'm looking for a non-programing solution. I haven't been able to find anything like what I'm looking for in any of the manuals so far.
Thank You,
Michael Slack
At 16 APR 1998 05:02PM Victor Engel wrote:
Yes. All you do is include a sort by the multivalued field somewhere. It makes no difference if it's the first or last or middle item sorted. Bear in mind if you do this sort of select that any program using the select list must be written to take the multivalues into account. That is, the READNEXT statement must look like:
READNEXT ID, WHICH_VAL …
instead of the more customary
READNEXT ID …
Furthermore, the structure of a saved list is different. Instead of being keys delimited by @FMs, it is ordered pairs of key:@VM:value_number, separate pairs of which are delimited by @FMs.
RLIST automatically handles all of this.
At 17 APR 1998 09:18AM Michael Slack wrote:
Thank you. That little jewel is going to be a big help.
Michael Slack