--
You received this message because you are subscribed to the Google Groups "DesignBais-Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to designbais-forum+unsubscribe@googlegroups.com.
To post to this group, send email to designbais-forum@googlegroups.com.
Visit this group at https://groups.google.com/group/designbais-forum.
For more options, visit https://groups.google.com/d/optout.
- “tdxspan” to identify a <td> cell in the detail of an OFR
- “11” = position of report in form elements after header fields inserted (if any)
- “v” = delimiter
- “1” = DBWLEVEL (2 and higher for modal forms)
- “x” = delimiter
- “1” = row
- “z” delimiter
- “4” = column
So you have to first determine what position the OFR is in the form elements. Read the form record in DBIFORMS and find it in attr 19 (DBIF.FIELD.NAME.LIST) My code to do this looks like this:
ONFORM.NAME='R.something'
READV FIELD.LIST FROM F.DBIFORMS, your_form,19 ELSE handle the error
LOCATE ONFORM.NAME IN FIELD.LIST<1> SETTING OFR.POS ELSE handle the error
Then as your build your OFR data you know the row and column, put that in there. So I did this by making the HTML template, then swapping out the values for each cell. Something like this:
*--- Combo box version
SELECT.ELEMENT.START='<select id="tdxspan{Field}v1x{Row}z4" name="tdxspan{Field}v1x{Row}z4" class="dbv6VerdanaReportDetail" onchange="validateAndSubmit(event)">'
SELECT.ELEMENT.START=CHANGE(SELECT.ELEMENT.START,'{Field}',OFR.POS)
SELECT.ELEMENT.OPTION='<option value="{Status}">{Status}</option>'
SELECT.ELEMENT.END='</select>'
*--- Radio buttons version
RADIO.HTML=''
RADIO.HTML:=' <input type="radio" class="dbv6VerdanaReportDetail" onclick="validateAndSubmit(event)"'
RADIO.HTML:=' id="tdxspan{Field}v1x{Row}z{Column}" name="status{Row}" value="S" {SChecked}>Stock '
RADIO.HTML:=' <input type="radio" class="dbv6VerdanaReportDetail" onclick="validateAndSubmit(event)"'
RADIO.HTML:=' id="tdxspan{Field}v1x{Row}z{Column}" name="status{Row}" value="N" {NChecked}>Non-Stock'
RADIO.HTML=CHANGE(RADIO.HTML,'{Field}',OFR.POS)
RADIO.HTML=CHANGE(RADIO.HTML,'{Column}',COL.STATUS)
Then inside the loop for each row/col, I did something like this:
*--- for combo box
BEGIN CASE
CASE STATUS='S'; CSTATUS='Stock'
CASE STATUS='N'; CSTATUS='Non-Stock'
CASE STATUS='' ; CSTATUS='Catalog'
CASE 1 ; CSTATUS=''
END CASE
TD.SELECT=CHANGE(SELECT.ELEMENT.START,'{Row}',OFR.ROW)
TD.SELECT:=CHANGE(SELECT.ELEMENT.OPTION,'{Status}',CSTATUS)
IF STATUS#'S' THEN
TD.SELECT:=CHANGE(SELECT.ELEMENT.OPTION,'{Status}','Stock')
END
IF STATUS#'N' THEN
TD.SELECT:=CHANGE(SELECT.ELEMENT.OPTION,'{Status}','Non-Stock')
END
TD.SELECT:=SELECT.ELEMENT.END
.
.
.
*--- for radio button
BEGIN CASE
CASE STATUS='S'
TD.SELECT=CHANGE(RADIO.HTML,'{SChecked}','checked')
TD.SELECT=CHANGE(TD.SELECT,' {NChecked}','')
CASE STATUS='N'
TD.SELECT=CHANGE(RADIO.HTML,'{NChecked}','checked')
TD.SELECT=CHANGE(TD.SELECT,' {SChecked}','')
CASE 1
TD.SELECT=CHANGE(RADIO.HTML,' {NChecked}','')
TD.SELECT=CHANGE(TD.SELECT,' {SChecked}','')
END CASE
TD.SELECT=CHANGE(TD.SELECT,'{Row}',OFR.ROW)
Then you put that into your OUTPUT.REPORT(PROCESS.REPORT.NUMBER)<row,col>
You do NOT need to set OUTPUT.TYPES or OUTPUT.KEYS to anything for that col/row.
The onclick event will trigger a call to your PROCESS AFTER subroutine of the OFR, the PROCESS.EVENT will be "REPORT" and the selected value will be DBVALUE. You will have to code all the validation, error handling and CRUD yourself.
I was told by Jon that for v7 the onclick event name will change from "ValidateAndSubmit(event)" to "vs(event)".
I think thats all of it. I hope this helps some other developers.