Get a Jumpstart with our Sample Apps
Results 1 to 2 of 2

Thread: xdialog and print preview

  1. #1
    "Certified" Alphaholic
    Real Name
    Charlie Crimmel
    Join Date
    Apr 2000
    Location
    West Virginia
    Posts
    1,695

    Default xdialog and print preview

    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

  2. #2
    "Certified" Alphaholic
    Real Name
    Charlie Crimmel
    Join Date
    Apr 2000
    Location
    West Virginia
    Posts
    1,695

    Default Re: xdialog and print preview

    I was able to get it working
    Thanks

Similar Threads

  1. Print preview
    By Bev Carlson in forum Alpha Five Version 8
    Replies: 2
    Last Post: 04-16-2007, 07:44 PM
  2. Preview report from xdialog
    By Tom Cone Jr in forum Alpha Five Version 7
    Replies: 10
    Last Post: 08-08-2006, 07:57 PM
  3. print preview
    By Cheryl Lemire in forum Alpha Five Version 6
    Replies: 2
    Last Post: 09-15-2004, 12:06 PM
  4. Print Preview
    By Phil Rolf in forum Alpha Five Version 5
    Replies: 0
    Last Post: 11-19-2002, 05:43 AM
  5. Print preview
    By Ales SKlepic in forum Alpha Five Version 4
    Replies: 2
    Last Post: 01-15-2001, 05:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •