To all:
From a button on a form I am running a script_play("xdiag_jobno2")
I am running a xdialog to ask for a job number
when the user clicks ok
I want to it continues and runs some xbasic code to print or preview report
Problem:
the xdailog comes up and the print preview shows over top of the xdialog preventing data entry into the xdialog.
xdialog:
'Create an XDialog dialog box to prompt for parameters.
DIM GLOBAL vjobnum as C
DIM GLOBAL varC_result as C
vjobnum = ""
ok_button_label = "&OK"
cancel_button_label = "&Cancel"
Delete XdialogStyle
dim XDialogStyle as p
XDialogStyle.AccentColor = "White"
XDialogStyle.Color = "#153+204+255"
dlg_title = "Enter Job Number "
varC_result = ui_modeless_dlg_box(dlg_title,<<%dlg%
{Windowstyle=Gradient Horizontal Top}
{region}
Enter Job Number:| [.20vjobnum];
{endregion};
{line=1,0};
{region}
<*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
{endregion};
%dlg%,<<%code%
if a_dlg_button = "OK" then
a_dlg_button = ""
trace.WriteLn("Job Number ="+ vjobnum)
ui_modeless_dlg_close(dlg_title)
end if
if a_dlg_button = "CANCEL" then
a_dlg_button = ""
trace.WriteLn("Job Number ="+ vjobnum)
ui_modeless_dlg_close(dlg_title)
end if
%code%)
Print preview code:
dim A_ASK_PRINT as c
A_ASK_PRINT = ui_get_radio(this.text, 1, "Print", "Preview")
if A_ASK_PRINT = "Print"
goto print1
elseif A_ASK_PRINT = "Preview"
goto preview1
else
goto cleanup1
end if
print1:
:Report.print("SB1 DailyASCII1",db_filter_get(db_current()),db_order_get(db_current()))
goto cleanup1
preview1:
:Report.preview("SB1 DailyASCII1",db_filter_get(db_current()),db_order_get(db_current()))
goto cleanup1
cleanup1:
end
From a button on a form I am running a script_play("xdiag_jobno2")
I am running a xdialog to ask for a job number
when the user clicks ok
I want to it continues and runs some xbasic code to print or preview report
Problem:
the xdailog comes up and the print preview shows over top of the xdialog preventing data entry into the xdialog.
xdialog:
'Create an XDialog dialog box to prompt for parameters.
DIM GLOBAL vjobnum as C
DIM GLOBAL varC_result as C
vjobnum = ""
ok_button_label = "&OK"
cancel_button_label = "&Cancel"
Delete XdialogStyle
dim XDialogStyle as p
XDialogStyle.AccentColor = "White"
XDialogStyle.Color = "#153+204+255"
dlg_title = "Enter Job Number "
varC_result = ui_modeless_dlg_box(dlg_title,<<%dlg%
{Windowstyle=Gradient Horizontal Top}
{region}
Enter Job Number:| [.20vjobnum];
{endregion};
{line=1,0};
{region}
<*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
{endregion};
%dlg%,<<%code%
if a_dlg_button = "OK" then
a_dlg_button = ""
trace.WriteLn("Job Number ="+ vjobnum)
ui_modeless_dlg_close(dlg_title)
end if
if a_dlg_button = "CANCEL" then
a_dlg_button = ""
trace.WriteLn("Job Number ="+ vjobnum)
ui_modeless_dlg_close(dlg_title)
end if
%code%)
Print preview code:
dim A_ASK_PRINT as c
A_ASK_PRINT = ui_get_radio(this.text, 1, "Print", "Preview")
if A_ASK_PRINT = "Print"
goto print1
elseif A_ASK_PRINT = "Preview"
goto preview1
else
goto cleanup1
end if
print1:
:Report.print("SB1 DailyASCII1",db_filter_get(db_current()),db_order_get(db_current()))
goto cleanup1
preview1:
:Report.preview("SB1 DailyASCII1",db_filter_get(db_current()),db_order_get(db_current()))
goto cleanup1
cleanup1:
end
Comment