New call-to-action
Results 1 to 2 of 2

Thread: Saving report in RTF format - Runtime different results than developer

  1. #1
    Real Name
    Bill Ogden
    Join Date
    Jan 2008

    Default Saving report in RTF format - Runtime different results than developer

    I need to save reports in Word (RTF) format. The reports have images that are critical to the final product. I'm saving in "Advanced RTF" mode, as it formats better than "Full RTF". The reports work perfectly in V11 developer version. But when I open the shadow database with the runtime version, my report images are missing and some of the formatting is off. I think it's printing in "Formatted Text" mode.

    I am currently using V11 developer and V12 runtime. Of course, the shadow database has been refreshed, etc. Did I miss something?

    The print code follows:

    ' Report production:
    t = table.current()
    '''''''''''''''''''DIM GLOBAL vLayout as C = "PrintEndorsements"
    DIM GLOBAL vReport_name as C
    DIM GLOBAL vLayout as C
    dim global vsavename as C = t.INVOICENBR
    var->vLayout = var->vreport_name

    if vReport_name <> ""
    record_number = current_record_number()
    query.filter = "recno() = " + record_number
    query.order = ""

    end if

    Dim Global vNetwork as L
    Dim Global vLocal as L
    DIM GLOBAL vReport_name as C 'to use in the file name
    DIM GLOBAL vAcct_no as C
    DIM GLOBAL vBasepath as C
    DIM GLOBAL vLocalpath as C
    DIM GLOBAL vNetpath as C
    DIM vLocalDrive as C
    DIM GLOBAL vNetDrive as C
    Dim GLOBAL vPath as C
    DIM vFilename as C
    DIM GLOBAL vLayout as C 'the actual layout name
    DIM Global vLocalDir as C
    DIM Global vNetDir as C

    query.filter = ""
    query.order = ""

    var->vBasePath = A5.Get_Path()

    ''If empty get vBasepath from defaults table as this is the first run of the script
    ''If not null script has already run so use selected path"defaults",FILE_RO_SHARED)
    while .not. t.fetch_eof()
    if t.Active = .T. then
    vNetDrive = alltrim(t.Net_drive)
    vLocalDrive = alltrim(t.Local_Drive)
    vLocalpath = alltrim(t.Local_path)
    vNetpath = alltrim(t.Net_path)
    vReport_name = t.Report_name
    END if
    END While

    trace.WriteLn("vBasePath=" + var->vBasePath)
    trace.WriteLn("vnetdrive=" + var->vNetDrive)
    trace.WriteLn("vlocaldrive=" + var->vLocalDrive)
    trace.WriteLn("vLocalpath=" + var->vLocalpath)
    trace.WriteLn("vNetpath=" + var->vNetpath)
    trace.WriteLn("vReport_name=" + vReport_name)

    var->vLocalDir = alltrim(var->vLocalDrive) + alltrim(var->vLocalpath)+ Chr(92) + alltrim(vReport_name)
    trace.WriteLn("vLocalDir=" + vLocalDir)
    var->vNetDir = alltrim(var->vNetDrive) + alltrim(var->vNetpath) + Chr(92) + alltrim(vReport_name)
    trace.WriteLn("vNetDir=" + vNetDir)

    result = file.exists(var->vLocalDir)
    if result = .f. THEN
    dir_create (var->vLocalDir)
    ui_msg_box("Note", "Upload Directory Created")
    'ui_msg_box("Note", "Upload Directory Already Exists")
    end if

    If alltrim(vPath) = "" then ' get it from the defaults table
    vPath = vLocalDrive + var->vLocalpath
    end if

    vFilename = vPath+ Chr(92)+alltrim(vendnum)+" "+ alltrim(Endorsement_Select.endorsement_name)+".rtf"
    trace.WriteLn("vFilename=" + vFilename)
    vFilename = ui_get_file("Save file as","Word *.rtf",vFilename,"f")

    delete PrintOptions
    DIM PrintOptions as P

    With PrintOptions
    .MultilingualSupport = .f.
    .Colors2GrayScale = .f.
    .RTFType = "Advanced RTF"
    .JpegQuality = "Medium"

    End with

    ''Print report to Word RTF


  2. #2
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    In the Wolds, Louth, Lincolnshire, UK

    Default Re: Saving report in RTF format - Runtime different results than developer

    If you developed in V11, running the V12 RT may cause issues.
    Historically, the dev and rt should be the same version and build number.

    Suggest using V11 to create a RT and see if the problem persists.
    Ted Giles
    Example Consulting - UK
    See our site for Alpha Support, Conversion and Upgrade.

Similar Threads

  1. Bug in Developer when saving UX changes
    By fthall3 in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 02-10-2015, 04:38 PM
  2. Finding names in a memo field and saving results
    By Atta in forum Alpha Five Version 9 - Desktop Applications
    Replies: 2
    Last Post: 07-31-2008, 06:28 PM
  3. Saving the results of a query
    By phillip dziewior in forum Alpha Five Version 7
    Replies: 2
    Last Post: 04-21-2006, 11:08 AM
  4. saving report in pdf format
    By Ed Kohn in forum Alpha Five Version 5
    Replies: 4
    Last Post: 03-07-2004, 03:48 PM
  5. Format Calc Results
    By Alan Lucas in forum Alpha Five Version 5
    Replies: 2
    Last Post: 02-19-2003, 11:53 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