Author Topic: SB+ ReportWriter: @ORIG.KEY?  (Read 4936 times)

precisonline

  • President
  • Administrator
  • Rock Star
  • *****
  • Posts: 1612
    • Precision Solutions
SB+ ReportWriter: @ORIG.KEY?
« on: March 25, 2008, 10:15:33 AM »
In the SB+ ReportWriter, we have the current key and record in @KEY and @RECORD and the previous record (for break fields) in @ORIG.REC but where is the previous record key?  This is one of those things that's vexed me for some time, which is needed when doing break field derivatives based on a field that is itself a part or derivative of the key.

Well, thanks to a customer who needed this information for a hot project today, I finally have the answer.  At the end of processing a record, SB+ moves @RECORD to @ORIG.REC and @KEY to ... @SBPARM(17). 

The SB+ Technical Help says this about the SBPARM(..) dimensioned array:

Used by SB+ tools to pass data where required.

Okay, so maybe it's not the model of obvious, but at least now we know where it is!
-Kevin
Accidents "happen"; success, however, is planned and executed.