Alpha Video Training
Results 1 to 6 of 6

Thread: I can't create tempreport.pdf when I want generate a PDF report...

  1. #1
    Member
    Real Name
    Javier Jaramillo
    Join Date
    Dec 2005
    Location
    Maryland
    Posts
    5

    Default I can't create tempreport.pdf when I want generate a PDF report...

    I have a dialog component that ask for a reservation number. When end user hit the submit button, It's suppose to create a pdf report in his browser, but I can't get it.

    Here is the source code that I have reviewed a couple times and I didn't see anything wrong.

    Aftervalidate event:
    ******************************************************
    reservano = CurrentForm.Controls.reservano

    if CurrentForm.Controls.Choice = "1" Then

    IF eval_valid("reservano") = .f. Then


    goto skipreport
    else

    end if
    dim filter as c
    dim order as c
    Filter = "Reservationid = " + reservano
    Order = ""
    Dim filename as c
    filename = session.session_folder + "tempreport.pdf"
    filename = report.saveas("Slip Reserva@[PathAlias.ADB_Path]\reservas.ddd","pdf",filter,order,filename,.f.)
    if file.exists(filename)
    currentform.RedirectTarget = session.session_url "tempreport.pdf?" + time("hms3")

    end if
    skipreport:

    end if
    **********************************************************
    I found out that report.saveas don't generate any file on the web server session, so when the function file.exists look for the tempreport.pdf, it couldn't find it.

    Reservationid is the key from my reservation's file. It is numeric. I have pdf driver installed in my computer. I am using Alphafive Version 8.

    Any suggestions?

  2. #2
    Volunteer Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,842

    Default Re: I can't create tempreport.pdf when I want generate a PDF report...

    take the space out of your report name.

    Plus, this line has an obvious error; missing a + sign where needed:

    currentform.RedirectTarget = session.session_url "tempreport.pdf?" + time("hms3")
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  3. #3
    Member
    Real Name
    Javier Jaramillo
    Join Date
    Dec 2005
    Location
    Maryland
    Posts
    5

    Default Re: I can't create tempreport.pdf when I want generate a PDF report...

    Steve: I changed the report name and I have eliminated the blank space. I still have the problem. What else is missing?

  4. #4
    Volunteer Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,842

    Default Re: I can't create tempreport.pdf when I want generate a PDF report...

    The filter should be:

    Filter = "Reservationid = " + quote(reservano)

    Also try Filter="" just to see if you can get a report to produce, then you know its the filter.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  5. #5
    Member
    Real Name
    Javier Jaramillo
    Join Date
    Dec 2005
    Location
    Maryland
    Posts
    5

    Default Re: I can't create tempreport.pdf when I want generate a PDF report...

    Steve:

    It looks that is not filter problem, because following your advise I used filter="" and I got the same result. I couldn't get the pdf report.

    Any suggestions?

    Thank You

  6. #6
    Volunteer Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,842

    Default Re: I can't create tempreport.pdf when I want generate a PDF report...

    Any suggestions I would make would be guesses. These are are a pain, and the web environment makes it tougher due to browser cache and other factors. I know you have to islolate the problem, so the best thing to do is start a new dialog from scratch, use the genie to create the report code with no filters or anything.

    Delete all session_folders in the A5Webroot folder (assuming no real user is logged in. Close all browsers, stop then start the Application Server, then publish your new dialog and A5W page, run the page. Watch that a new session folder IS created and a file does appear in that folder.

    When you start to add back your filters, etc. look on this forum on how to handle a numeric filter value, you'll have to use convert_type(myvar,"N") somewhere in the filter.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

Similar Threads

  1. cannot create pdf
    By rching in forum Web Application Server v7
    Replies: 8
    Last Post: 07-09-2006, 08:24 PM
  2. PDF file - Unable to create
    By CJI in forum Alpha Five Version 7
    Replies: 9
    Last Post: 06-11-2006, 04:28 PM
  3. Create PDF / Email Attachment
    By graysarge in forum Web Application Server v6
    Replies: 1
    Last Post: 08-20-2005, 11:14 AM
  4. PDF: Can't create file
    By snyhof in forum Alpha Five Version 5
    Replies: 0
    Last Post: 05-16-2003, 07:18 AM

Bookmarks

Posting Permissions

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