Hello All I just hit a brick wall I have some controls on a web componet, long story short I am trying to pass varible values between these controls and for some reason I can not get one control to accept the value here is the script
dim tmpl as p
tmpl.ComponentName = "latecasenote"
tmpl.ComponentType = "Dialog"
tmpl.PreCalcMode = "Standard"
tmpl.GUID = "34eec5e4-3929-4a46-9989-982354649247"
tmpl.style_name = "Corporate"
tmpl.flagUseSimpleStyles = .f.
tmpl.show_row_labels = .t.
tmpl.fontsize = "Medium"
tmpl.LayoutColumns = 1
tmpl.Position_Field_Error_Messages = "Form Header"
tmpl.SecurityModel = "Group Based"
tmpl.has_submit_button = .t.
tmpl.submit_button_label = "Submit"
tmpl.submit_button_inlinestyle = ""
tmpl.has_reset_button = .t.
tmpl.Reset_button_label = "Reset"
tmpl.Reset_button_inlinestyle = ""
tmpl.button_alignment = "Right"
tmpl.EditRegion.Dialog.Top = <<%txt%
%txt%
tmpl.EditRegion.Dialog.Bottom = <<%txt%
%txt%
tmpl.EditRegion.Dialog.Left = <<%txt%
%txt%
tmpl.EditRegion.Dialog.Right = <<%txt%
%txt%
tmpl.ValidateBeforeSubmit = .f.
tmpl.Declarations = <<%code%
dim WCNDS_USER as c
WCNDS_USER = "TWilliams2"
%code%
tmpl.events.Initialize = ""
tmpl.events.Activate = ""
tmpl.events.Validate = ""
tmpl.events.AfterValidate = <<%code%
IF WC_CONTRACTID = "ALL"
IF eval_valid("WCFROM_DATE") = .f. .or. eval_valid("WCTO_DATE") = .f. .or. eval_valid("WC_CONTRACTID") = .f. Then
goto skipreport
end if
dim args as sql::arguments
args.set("RNDS_USER",WCNDS_USER)
args.set("RFROM_DATE",ctodt(WCFROM_DATE+" 12:00:00 00 am"))
args.set("RTO_DATE",ctodt(WCTO_DATE+" 12:00:00 00 am"))
Dim filename as c
dim libfolder as c
libfolder = a5_removetrailingbackslash(Request.ApplicationRoot) + chr(92)
reportname = "LAET_CASE_NOTE_DETAIL_AL@" + libfolder + "cms30r1.alb"
filename = session.session_folder + "tempreport.pdf"
filename = report.saveas(reportname,"pdf","","",filename,.f.,null_value(),args)
if file.exists(filename)
currentform.RedirectTarget = session.session_url + "tempreport.pdf?" + time("hms3")
end if
ELSE
IF eval_valid("WCFROM_DATE") = .f. .or. eval_valid("WCTO_DATE") = .f. .or. eval_valid("WC_CONTRACTID") = .f. Then
goto skipreport
end if
dim args as sql::arguments
args.set("RFKCONTRACTID",WC_CONTRACTID)
args.set("RFROM_DATE",ctodt(WCFROM_DATE+" 12:00:00 00 am"))
args.set("RTO_DATE",ctodt(WCTO_DATE+" 12:00:00 00 am"))
Dim filename as c
dim libfolder as c
libfolder = a5_removetrailingbackslash(Request.ApplicationRoot) + chr(92)
reportname = "LAET_CASE_NOTE_DETAIL@" + libfolder + "cms30r1.alb"
filename = session.session_folder + "tempreport.pdf"
filename = report.saveas(reportname,"pdf","","",filename,.f.,null_value(),args)
if file.exists(filename)
currentform.RedirectTarget = session.session_url + "tempreport.pdf?" + time("hms3")
end if
end if
skipreport:
%code%
tmpl.fields = 3
DIM tmpl.Variable_Info[tmpl.fields] as P
with tmpl.Variable_Info[1]
.Fieldname = "WC_CONTRACTID"
.Scope = "Local"
.DisplayFormat = ""
.DisplayUnFormat = ""
.Type = "N"
.Varname = "WC_CONTRACTID"
.Column.LabelPosition = "Left"
.Controltype = "DropDownBox"
.DropdownBox.InLineStyle = ""
.DropdownBox.Type = "Dynamic"
.DropdownBox.StyleFieldIfError = .t.
.DropdownBox.ErrorInLineStyle = ""
.DropdownBox.Size = 1
.DropdownBox.selectStyle = "Single"
.DropdownBox.NotInListRule = "Add To List if Not Null"
.DropDownBox.Datasource = "CS"
.DropDownBox.maxchoices = 0
.DropDownBox.CS.ConnectionString = "::name::PROD1"
.DropDownBox.CS.SQL = "SELECT DISTINCT PROGRAM_NAME, FK_CONTRACTID FROM CMS_USERS_PROGRAM WHERE NDS_USER_NAME = :NDS_USER_NAME ORDER BY PROGRAM_NAME"
DIM DropDownBox.CS.Parameters[1] as P
.DropDownBox.CS.Parameters[1].value = "[varC->WCNDS_USER]"
.DropDownBox.CS.Parameters[1].name = "NDS_USER_NAME"
.InitialValue = "ALL"
.BreakType = "None"
.nCols = 1
.Column.Hide = .f.
.Column.Heading = "PROGRAM"
end with
with tmpl.Variable_Info[2]
.Fieldname = "WCFROM_DATE"
.Scope = "Local"
.DisplayFormat = ""
.DisplayUnFormat = ""
.Type = "D"
.Varname = "WCFROM_DATE"
.Column.LabelPosition = "Left"
.Controltype = "TextBox"
.Textbox.Size = 20
.Textbox.MaxLength = 20
.Textbox.InLineStyle = ""
.Textbox.StyleFieldIfError = .t.
.Textbox.ErrorInlineStyle = ""
.Textbox.IsPassword = .f.
.DatePicker.Display = .t.
.DatePicker.UseComboBoxes = .t.
.DatePicker.DateFormat = "mm/dd/yyyy"
.DatePicker.LowYear = 1950
.DatePicker.HighYear = 2050
.DatePicker.SwitchYear = 20
.DatePicker.IconNumber = 2
.InitialValue = ""
.BreakType = "None"
.nCols = 1
.Column.Hide = .f.
.Column.Heading = "FROM DATE"
end with
with tmpl.Variable_Info[3]
.Fieldname = "WCTO_DATE"
.Scope = "Local"
.DisplayFormat = ""
.DisplayUnFormat = ""
.Type = "D"
.Varname = "WCTO_DATE"
.Column.LabelPosition = "Left"
.Controltype = "TextBox"
.Textbox.Size = 20
.Textbox.MaxLength = 20
.Textbox.InLineStyle = ""
.Textbox.StyleFieldIfError = .t.
.Textbox.ErrorInlineStyle = ""
.Textbox.IsPassword = .f.
.DatePicker.Display = .t.
.DatePicker.UseComboBoxes = .t.
.DatePicker.DateFormat = "mm/dd/yyyy"
.DatePicker.LowYear = 1950
.DatePicker.HighYear = 2050
.DatePicker.SwitchYear = 20
.DatePicker.IconNumber = 2
.InitialValue = ""
.BreakType = "None"
.nCols = 1
.Column.Hide = .f.
.Column.Heading = "TO DATE"
end with
I am trying to get the value stored in WCNDS_USER to .DropDownBox.CS.Parameters[1].value = "[varC->WCNDS_USER]"
.DropDownBox.CS.Parameters[1].value = "[varC->WCNDS_USER]" is not working .......
Thanks in advance for any help...
dim tmpl as p
tmpl.ComponentName = "latecasenote"
tmpl.ComponentType = "Dialog"
tmpl.PreCalcMode = "Standard"
tmpl.GUID = "34eec5e4-3929-4a46-9989-982354649247"
tmpl.style_name = "Corporate"
tmpl.flagUseSimpleStyles = .f.
tmpl.show_row_labels = .t.
tmpl.fontsize = "Medium"
tmpl.LayoutColumns = 1
tmpl.Position_Field_Error_Messages = "Form Header"
tmpl.SecurityModel = "Group Based"
tmpl.has_submit_button = .t.
tmpl.submit_button_label = "Submit"
tmpl.submit_button_inlinestyle = ""
tmpl.has_reset_button = .t.
tmpl.Reset_button_label = "Reset"
tmpl.Reset_button_inlinestyle = ""
tmpl.button_alignment = "Right"
tmpl.EditRegion.Dialog.Top = <<%txt%
%txt%
tmpl.EditRegion.Dialog.Bottom = <<%txt%
%txt%
tmpl.EditRegion.Dialog.Left = <<%txt%
%txt%
tmpl.EditRegion.Dialog.Right = <<%txt%
%txt%
tmpl.ValidateBeforeSubmit = .f.
tmpl.Declarations = <<%code%
dim WCNDS_USER as c
WCNDS_USER = "TWilliams2"
%code%
tmpl.events.Initialize = ""
tmpl.events.Activate = ""
tmpl.events.Validate = ""
tmpl.events.AfterValidate = <<%code%
IF WC_CONTRACTID = "ALL"
IF eval_valid("WCFROM_DATE") = .f. .or. eval_valid("WCTO_DATE") = .f. .or. eval_valid("WC_CONTRACTID") = .f. Then
goto skipreport
end if
dim args as sql::arguments
args.set("RNDS_USER",WCNDS_USER)
args.set("RFROM_DATE",ctodt(WCFROM_DATE+" 12:00:00 00 am"))
args.set("RTO_DATE",ctodt(WCTO_DATE+" 12:00:00 00 am"))
Dim filename as c
dim libfolder as c
libfolder = a5_removetrailingbackslash(Request.ApplicationRoot) + chr(92)
reportname = "LAET_CASE_NOTE_DETAIL_AL@" + libfolder + "cms30r1.alb"
filename = session.session_folder + "tempreport.pdf"
filename = report.saveas(reportname,"pdf","","",filename,.f.,null_value(),args)
if file.exists(filename)
currentform.RedirectTarget = session.session_url + "tempreport.pdf?" + time("hms3")
end if
ELSE
IF eval_valid("WCFROM_DATE") = .f. .or. eval_valid("WCTO_DATE") = .f. .or. eval_valid("WC_CONTRACTID") = .f. Then
goto skipreport
end if
dim args as sql::arguments
args.set("RFKCONTRACTID",WC_CONTRACTID)
args.set("RFROM_DATE",ctodt(WCFROM_DATE+" 12:00:00 00 am"))
args.set("RTO_DATE",ctodt(WCTO_DATE+" 12:00:00 00 am"))
Dim filename as c
dim libfolder as c
libfolder = a5_removetrailingbackslash(Request.ApplicationRoot) + chr(92)
reportname = "LAET_CASE_NOTE_DETAIL@" + libfolder + "cms30r1.alb"
filename = session.session_folder + "tempreport.pdf"
filename = report.saveas(reportname,"pdf","","",filename,.f.,null_value(),args)
if file.exists(filename)
currentform.RedirectTarget = session.session_url + "tempreport.pdf?" + time("hms3")
end if
end if
skipreport:
%code%
tmpl.fields = 3
DIM tmpl.Variable_Info[tmpl.fields] as P
with tmpl.Variable_Info[1]
.Fieldname = "WC_CONTRACTID"
.Scope = "Local"
.DisplayFormat = ""
.DisplayUnFormat = ""
.Type = "N"
.Varname = "WC_CONTRACTID"
.Column.LabelPosition = "Left"
.Controltype = "DropDownBox"
.DropdownBox.InLineStyle = ""
.DropdownBox.Type = "Dynamic"
.DropdownBox.StyleFieldIfError = .t.
.DropdownBox.ErrorInLineStyle = ""
.DropdownBox.Size = 1
.DropdownBox.selectStyle = "Single"
.DropdownBox.NotInListRule = "Add To List if Not Null"
.DropDownBox.Datasource = "CS"
.DropDownBox.maxchoices = 0
.DropDownBox.CS.ConnectionString = "::name::PROD1"
.DropDownBox.CS.SQL = "SELECT DISTINCT PROGRAM_NAME, FK_CONTRACTID FROM CMS_USERS_PROGRAM WHERE NDS_USER_NAME = :NDS_USER_NAME ORDER BY PROGRAM_NAME"
DIM DropDownBox.CS.Parameters[1] as P
.DropDownBox.CS.Parameters[1].value = "[varC->WCNDS_USER]"
.DropDownBox.CS.Parameters[1].name = "NDS_USER_NAME"
.InitialValue = "ALL"
.BreakType = "None"
.nCols = 1
.Column.Hide = .f.
.Column.Heading = "PROGRAM"
end with
with tmpl.Variable_Info[2]
.Fieldname = "WCFROM_DATE"
.Scope = "Local"
.DisplayFormat = ""
.DisplayUnFormat = ""
.Type = "D"
.Varname = "WCFROM_DATE"
.Column.LabelPosition = "Left"
.Controltype = "TextBox"
.Textbox.Size = 20
.Textbox.MaxLength = 20
.Textbox.InLineStyle = ""
.Textbox.StyleFieldIfError = .t.
.Textbox.ErrorInlineStyle = ""
.Textbox.IsPassword = .f.
.DatePicker.Display = .t.
.DatePicker.UseComboBoxes = .t.
.DatePicker.DateFormat = "mm/dd/yyyy"
.DatePicker.LowYear = 1950
.DatePicker.HighYear = 2050
.DatePicker.SwitchYear = 20
.DatePicker.IconNumber = 2
.InitialValue = ""
.BreakType = "None"
.nCols = 1
.Column.Hide = .f.
.Column.Heading = "FROM DATE"
end with
with tmpl.Variable_Info[3]
.Fieldname = "WCTO_DATE"
.Scope = "Local"
.DisplayFormat = ""
.DisplayUnFormat = ""
.Type = "D"
.Varname = "WCTO_DATE"
.Column.LabelPosition = "Left"
.Controltype = "TextBox"
.Textbox.Size = 20
.Textbox.MaxLength = 20
.Textbox.InLineStyle = ""
.Textbox.StyleFieldIfError = .t.
.Textbox.ErrorInlineStyle = ""
.Textbox.IsPassword = .f.
.DatePicker.Display = .t.
.DatePicker.UseComboBoxes = .t.
.DatePicker.DateFormat = "mm/dd/yyyy"
.DatePicker.LowYear = 1950
.DatePicker.HighYear = 2050
.DatePicker.SwitchYear = 20
.DatePicker.IconNumber = 2
.InitialValue = ""
.BreakType = "None"
.nCols = 1
.Column.Hide = .f.
.Column.Heading = "TO DATE"
end with
I am trying to get the value stored in WCNDS_USER to .DropDownBox.CS.Parameters[1].value = "[varC->WCNDS_USER]"
.DropDownBox.CS.Parameters[1].value = "[varC->WCNDS_USER]" is not working .......
Thanks in advance for any help...