Thanks for your words Spencer. I don't think there's enough for Programming Examples.
Most of the credit for Spencer's report goes to Ray who provided 95% of the code. Spencer had created a report modified from the sample Keyword Report provided by Ray. This particular report was done using the Report "Keyword Report" vs. the "Button Report" I have referred to earlier. Spencer added about 10 more columns to the sample report based on the instructions I provided above.
My contribution was to do an autopsy on Ray's code to see how he did it, and to add just few more lines.
The KeyWords in column1 had values like 1 - Morning, 3 - Afternoon, 5 - Evening for purposes of sorting by time of day, using the number for sorting.
I modified the code, adding two string variables vThisKeyWord and vLastKeyWord.
The code was then modified to compare these values to see when the KeyWord value changed.
If the value did not change, the cell value becomes " " vs. repeating.
When the KeyWord was to be printed, then we then used @MID to strip off the sorting value to end up with just the Time of Day names, Morning, Noon, Afternoon, Evening, etc.
The only
things that required change were a few lines of code in Out-OnPrint section.
Here is what changed, under the 2nd While loop:
Edited: While vListLoop <= vListCnt {
vData = @AccessStringArray(vList,vListLoop)
vOut = vOut + "<TR>"
vOut = vOut + "<TD>"
//Process first column data
vThisKeyWord = Split(vData,"|")
If vThisKeyword <> vLastKeyword Then {
vOut += @Mid(vThisKeyWord,5,100)
} Else {
vOut += " "
}
vOut = vOut + "</TD>"
And then udated the vLastKeyWord value at the end of updating all of the addition column elements, near the end of the code:
Edited: vLastKeyWord = vThisKeyWord
vListLoop = vListLoop + 1
}
vOut = vOut + "</TABLE>"
Out = vOut
}