Hey Rosh,
Long time no talk. Thanks for your help.
I am using PB 11.1 and I had two targets (winform and webform). I deleted the winform target and the problem with the first example went away.
I am doing the checking that you suggest (e.g. if clickedrow > 0 then do this).
In the example above, I fixed what I thought would be an error and am currently trying this (I also changed the name of the picture to p_hand):
dw_2.object.p_hand[clicked
The above did not work.
Also, I put a button in the detailed band. When you click on it, I want to change the text of the button from 'Select' to '----->'. The following code does not work:
dw_2.Object.b_select[click
If I change the code to:
dw_2.Object.b_select.text = "---->"
it works, but it changes the text in the button in EVERY row.
In an other example, I am trying to change the back color for some fields to make it apparent where to enter data as follows:
cb_6.enabled = false
long paxrows
paxrows = dw_1.retrieve(confirmation
if paxrows > 0 then
dw_1.show()
dw_1.object.t_title.text = "Shuttle " + shuttle + " Departing at: " + departure_time
long newrow1
newrow1 = dw_1.insertrow(0)
dw_1.scrolltorow(newrow1)
dw_1.setitem(newrow1,"conf
dw_1.setitem(newrow1,"pass
dw_1.setfocus( )
// dw_1.object.fname[newrow1]
// dw_1.object.lname[newrow1]
// dw_1.object.phone[newrow1]
else
messagebox("Error","System
end if
THE COMMENTED LINES ABOVE DO NOT WORK.
Thanks for your help!!!
Paul
Here is dw_2:
$PBExportHeader$dw_ml_shuttle_master_administrator.srd
release 11;
datawindow(units=0 timer_interval=0 color=1073741824 processing=0 HTMLDW=no print.printername="" print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 96 print.margin.bottom = 96 print.paper.source = 0 print.paper.size = 0 print.canusedefaultprinter=yes print.prompt=no print.buttons=no print.preview.buttons=no print.cliptext=no print.overrideprintjob=no print.collate=yes print.preview.outline=yes hidegrayline=no showbackcoloronxp=no )
header(height=216 color="536870912" )
summary(height=0 color="536870912" )
footer(height=0 color="536870912" )
detail(height=100 color="536870912~tif (mod(getrow(),2)=0,RGB(192,192,192),RGB(255,255,255))
" )
table(column=(type=char(10) updatewhereclause=yes name=operator_confirmation_no dbname="operator.confirmation_no" )
column=(type=datetime updatewhereclause=yes name=operator_req_date_time dbname="operator.req_date_time" )
column=(type=char(3) updatewhereclause=yes name=operator_pu_county dbname="operator.pu_county" )
column=(type=char(40) updatewhereclause=yes name=operator_pu_city dbname="operator.pu_city" )
column=(type=char(3) updatewhereclause=yes name=operator_dest_county dbname="operator.dest_county" )
column=(type=char(40) updatewhereclause=yes name=operator_dest_city dbname="operator.dest_city" )
column=(type=long updatewhereclause=yes name=no_pass dbname="operator.no_pass" )
column=(type=char(5) updatewhereclause=yes name=compute_dept_time dbname="compute_0008" )
column=(type=char(1) updatewhereclause=yes name=compute_via2 dbname="operator.compute_via2" )
column=(type=char(1) updatewhereclause=yes name=compute_alreadybooked dbname="operator.compute_alreadybooked" values=" / " )
retrieve="PBSELECT( VERSION(400) TABLE(NAME=~"operator~" ) COLUMN(NAME=~"operator.confirmation_no~") COLUMN(NAME=~"operator.req_date_time~") COLUMN(NAME=~"operator.pu_county~") COLUMN(NAME=~"operator.pu_city~") COLUMN(NAME=~"operator.dest_county~") COLUMN(NAME=~"operator.dest_city~") COLUMN(NAME=~"operator.no_pass~") COMPUTE(NAME=~"convert(char(5),req_date_time,114)~") COMPUTE(NAME=~"~~~" ~~~" AS compute_via2~") COMPUTE(NAME=~"~~~" ~~~" AS compute_alreadybooked~")WHERE( EXP1 =~"operator.req_date_time~" OP =~">=~" EXP2 =~":start_date~" LOGIC =~"and~" ) WHERE( EXP1 =~"operator.req_date_time~" OP =~"<=~" EXP2 =~":end_date~" LOGIC =~"And~" ) WHERE( EXP1 =~"operator.account_no~" OP =~"=~" EXP2 =~"'NBASHUTTLE'~" LOGIC =~"and~" ) WHERE( EXP1 =~"operator.status_flag~" OP =~"not in~" EXP2 =~"('S','F','C')~" ) ) ARG(NAME = ~"start_date~" TYPE = datetime) ARG(NAME = ~"end_date~" TYPE = datetime) " arguments=(("start_date", datetime),("end_date", datetime)) sort="operator_pu_county A operator_pu_city A operator_req_date_time A " )
group(level=1 header.height=80 trailer.height=0 by=("compute_shuttle" ) header.color="536870912" trailer.color="536870912" sort="operator_pu_city A " )
text(band=header alignment="2" text="Confo" border="0" color="33554432" x="2711" y="8" height="64" width="229" html.valueishtml="0" name=t_2 visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="PAX" border="0" color="33554432" x="3131" y="8" height="64" width="229" html.valueishtml="0" name=t_3 visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Pickup City" border="0" color="33554432" x="5" y="144" height="64" width="338" html.valueishtml="0" name=operator_confirmation_no_t visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Time" border="0" color="33554432" x="457" y="144" height="64" width="165" html.valueishtml="0" name=operator_req_date_time_t visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="Destination" border="0" color="33554432" x="722" y="144" height="64" width="718" html.valueishtml="0" name=t_1 visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="0" text="~t~" Shuttle Schedule for ~"" border="0" color="16777215" x="0" y="0" height="80" width="2656" html.valueishtml="0" name=t_title visible="1" font.face="Arial" font.height="-12" font.weight="700" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="8421376" )
text(band=header alignment="0" text="B" border="0" color="33554432" x="347" y="144" height="64" width="59" html.valueishtml="0" name=t_4 visible="1" font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=header.1 alignment="0" expression="operator_pu_city + ~", ~" + operator_pu_county + ~" TO~""border="0" color="33554432" x="18" y="8" height="64" width="850" format="[GENERAL]" html.valueishtml="0" name=compute_shuttle visible="1" font.face="Arial" font.height="-12" font.weight="700" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=detail alignment="1" expression="time(string(operator_req_date_time))"border="0" color="33554432" x="4430" y="0" height="72" width="329" format="[General]" html.valueishtml="0" name=compute_dept_time_old visible="1" font.face="Arial" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=detail alignment="0" expression="udf_is_mlshuttle_trip_via_jersey_city ( operator_pu_city , operator_dest_city , compute_dept_time )"border="0" color="33554432" x="3401" y="8" height="60" width="512" format="[GENERAL]" html.valueishtml="0" name=compute_via visible="1" font.face="Arial" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=detail alignment="0" expression="right( operator_confirmation_no , 4)"border="0" color="33554432" x="2734" y="4" height="72" width="201" format="[GENERAL]" html.valueishtml="0" name=compute_confo visible="1" font.face="Arial" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
column(band=detail id=7 alignment="0" tabsequence=32766 border="0" color="33554432" x="3127" y="4" height="72" width="256" format="[general]" html.valueishtml="0" name=no_pass visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=no font.face="Arial" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=detail alignment="0" expression=" operator_confirmation_no "border="0" color="33554432" x="5019" y="4" height="72" width="626" format="[GENERAL]" html.valueishtml="0" name=compute_3 visible="1" font.face="Arial" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
compute(band=detail alignment="0" expression="time(mid(string(operator_req_date_time),12,5))"border="0" color="33554432" x="4809" y="8" height="60" width="183" format="[TIME]" html.valueishtml="0" name=computed_departure_time_as_time visible="1" font.face="Arial" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=9 alignment="0" tabsequence=32766 border="0" color="33554432" x="5678" y="12" height="60" width="626" format="[general]" html.valueishtml="0" name=compute_via2 visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=no font.face="Arial" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" )
column(band=detail id=8 alignment="0" tabsequence=32766 border="0" color="33554432" x="4046" y="12" height="60" width="187" format="[general]" html.valueishtml="0" name=compute_dept_time visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=no font.face="Arial" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=2 alignment="0" tabsequence=32766 border="0" color="33554432" x="416" y="12" height="60" width="274" format="HH:MM AM/PM" html.valueishtml="0" name=operator_req_date_time visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=no font.face="Arial" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=10 alignment="0" tabsequence=32766 border="0" color="33554432" x="2071" y="24" height="48" width="55" format="[general]" html.valueishtml="0" name=compute_alreadybooked_1 visible="1" checkbox.text="" checkbox.on=" " checkbox.off=" " checkbox.scale=no checkbox.threed=yes font.face="Tahoma" font.height="-12" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" )
bitmap(band=detail filename="M:\!Dev\NBA-ShuttleTool\checkmark.bmp" x="297" y="12" height="60" width="59" border="0" name=p_checkmark visible="0" )
bitmap(band=detail filename="M:\!Dev\NBA-ShuttleTool\hand.bmp" x="82" y="12" height="68" width="110" border="0" name=p_hand visible="0" )
column(band=detail id=6 alignment="0" tabsequence=32766 border="0" color="33554432" x="731" y="12" height="60" width="375" format="[GENERAL]" html.valueishtml="0" name=operator_dest_city visible="1" edit.limit=40 edit.case=any edit.autoselect=yes edit.autohscroll=yes font.face="Arial" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
button(band=detail text="Select" enabled=yes action="0" border="0" color="33554432" x="1138" y="8" height="76" width="320" vtextalign="0" htextalign="0" name=b_select visible="1" font.face="Arial" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" )
htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" encodeselflinkargs="1" netscapelayers="0" pagingmethod=0 generatedddwframes="1" )
xhtmlgen() cssgen(sessionspecific="0" )
xmlgen(inline="0" )
xsltgen()
jsgen()
export.xml(headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 )
import.xml()
export.pdf(method=0 distill.custompostscript="0" xslfop.print="0" )
export.xhtml()
Here is dw_1:
$PBExportHeader$dw_nba_shuttle_pax_list.srd
release 11;
datawindow(units=0 timer_interval=0 color=1073741824 processing=0 HTMLDW=no print.printername="" print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 96 print.margin.bottom = 96 print.paper.source = 0 print.paper.size = 0 print.canusedefaultprinter=yes print.prompt=no print.buttons=no print.preview.buttons=no print.cliptext=no print.overrideprintjob=no print.collate=yes print.preview.outline=yes hidegrayline=no showbackcoloronxp=no )
header(height=200 color="536870912" )
summary(height=0 color="536870912" )
footer(height=0 color="536870912" )
detail(height=92 color="536870912" )
table(column=(type=char(20) update=yes updatewhereclause=yes name=fname dbname="operator_passengers.fname" )
column=(type=char(20) update=yes updatewhereclause=yes name=lname dbname="operator_passengers.lname" )
column=(type=char(20) update=yes updatewhereclause=yes name=phone dbname="operator_passengers.phone" )
column=(type=char(10) update=yes updatewhereclause=yes key=yes name=confirmation_no dbname="operator_passengers.confirmation_no" )
column=(type=long update=yes updatewhereclause=yes key=yes name=passenger_counter dbname="operator_passengers.passenger_counter" )
retrieve="PBSELECT( VERSION(400) TABLE(NAME=~"operator_passengers~" ) COLUMN(NAME=~"operator_passengers.fname~") COLUMN(NAME=~"operator_passengers.lname~") COLUMN(NAME=~"operator_passengers.phone~") COLUMN(NAME=~"operator_passengers.confirmation_no~") COLUMN(NAME=~"operator_passengers.passenger_counter~")WHERE( EXP1 =~"operator_passengers.confirmation_no~" OP =~"=~" EXP2 =~":confo~" ) ) ARG(NAME = ~"confo~" TYPE = string) " update="operator_passengers" updatewhere=0 updatekeyinplace=no arguments=(("confo", string)) )
text(band=header alignment="0" text="~t~"Shuttle...~"" border="0" color="16777215" x="0" y="0" height="80" width="1248" html.valueishtml="0" name=t_title tag="" visible="1" font.face="Arial" font.height="-12" font.weight="700" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="12639424" )
text(band=header alignment="2" text="First Name" border="0" color="33554432" x="14" y="124" height="64" width="434" html.valueishtml="0" name=fname_t visible="1" font.face="Tahoma" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Last Name" border="0" color="33554432" x="462" y="124" height="64" width="421" html.valueishtml="0" name=lname_t visible="1" font.face="Tahoma" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
text(band=header alignment="2" text="Extension" border="0" color="33554432" x="896" y="124" height="64" width="279" html.valueishtml="0" name=phone_t visible="1" font.face="Tahoma" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=4 alignment="0" tabsequence=32766 border="0" color="33554432" x="1312" y="8" height="64" width="494" format="[general]" html.valueishtml="0" name=confirmation_no visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=no font.face="Tahoma" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=5 alignment="0" tabsequence=32766 border="0" color="33554432" x="1861" y="8" height="64" width="2135" format="[general]" html.valueishtml="0" name=passenger_counter visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=no font.face="Tahoma" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" )
column(band=detail id=3 alignment="0" tabsequence=30 border="2" color="33554432" x="896" y="8" height="76" width="279" format="[general]" html.valueishtml="0" name=phone visible="1" editmask.mask="#####" editmask.focusrectangle=no font.face="Tahoma" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="12639424" )
column(band=detail id=2 alignment="0" tabsequence=20 border="2" color="33554432" x="462" y="8" height="76" width="421" format="[general]" html.valueishtml="0" name=lname visible="1" edit.limit=20 edit.case=upper edit.autoselect=yes edit.autohscroll=yes font.face="Tahoma" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="12639424" )
column(band=detail id=1 alignment="0" tabsequence=10 border="2" color="33554432" x="14" y="8" height="76" width="434" format="[general]" html.valueishtml="0" name=fname visible="1" edit.limit=20 edit.case=upper edit.autoselect=yes edit.autohscroll=yes font.face="Tahoma" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="12639424" )
htmltable(border="1" )
htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" encodeselflinkargs="1" netscapelayers="0" pagingmethod=0 generatedddwframes="1" )
xhtmlgen() cssgen(sessionspecific="0" )
xmlgen(inline="0" )
xsltgen()
jsgen()
export.xml(headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 )
import.xml()
export.pdf(method=0 distill.custompostscript="0" xslfop.print="0" )
export.xhtml()
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91:





by: diasroshanPosted on 2008-12-06 at 02:36:45ID: 23111352
Hi,
t.t_title. text = " Shuttle Schedule for " + sDayname + " " + todaytext
ickedrow] = True //make the hand visible
ickedrow] = True //make the hand visible
First point, abt the below line giving u error,
dw_1.object.t_title.text = " Shuttle Schedule for " + sDayname + " " + todaytext
Ok,make sure u have a text object in dw_1 called t_title, check this by going thru the control list. If it exists, then make sure dw_1 isnt on a tab control or tabpage,coz in that case ur script shud look like below,
tab_1.tabpage_1.dw_1.objec
About point 2,where the below line gives u error,
dw_2.object.p_1.Visible[cl
Ok,make sure clickedrow is greater than zero,
Long clickedrow
clickedrow = dw_2.GetClickedRow()
If clickedrow < 1 Then Return
dw_2.object.p_1.Visible[cl
If none of the above hints help, then export both ur DWs and paste them here.
Cheers,
Rosh