Alpha Video Training
Results 1 to 5 of 5

Thread: Amyuni Low Level Print: Web Reports

  1. #1
    Member
    Real Name
    Ken Wickham
    Join Date
    Feb 2008
    Posts
    26

    Default Amyuni Low Level Print: Web Reports

    I am trying to generate pdf file report. I used the details described in ASWPRINTRPT.A5W Alpha Software Help file. The report is generated just fine when I have only one report in my web_report table. When I put two reports in the web_report table I get the following error:

    "Script Error
    Error:
    Amyuni Low Level Print:
    Layout name: ProjectbyOwner@C:\CirrusSoftware\Alpha5\BirdDog\emptoproj
    ProjectStatus
    Layout type: report
    Report not found: 'ProjectbyOwner@C:\CirrusSoftware\Alpha5\BirdDog\emptoproj
    ProjectStatus'."

    I have searched the message board but the replies to simmilar error messages didn't solve my problem. I can create either one of the two reports, but only when there is only one of them defined in my web_report table.

    The dialog component to go along with the report is the same as defined in the help file.

    Any ideas?

  2. #2
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,282

    Default Re: Amyuni Low Level Print: Web Reports

    Quote Originally Posted by WicksWar View Post
    I am trying to generate pdf file report. I used the details described in ASWPRINTRPT.A5W Alpha Software Help file. The report is generated just fine when I have only one report in my web_report table. When I put two reports in the web_report table I get the following error:

    "Script Error
    Error:
    Amyuni Low Level Print:
    Layout name: ProjectbyOwner@C:\CirrusSoftware\Alpha5\BirdDog\emptoproj
    ProjectStatus
    Layout type: report
    Report not found: 'ProjectbyOwner@C:\CirrusSoftware\Alpha5\BirdDog\emptoproj
    ProjectStatus'."

    I have searched the message board but the replies to simmilar error messages didn't solve my problem. I can create either one of the two reports, but only when there is only one of them defined in my web_report table.

    The dialog component to go along with the report is the same as defined in the help file.

    Any ideas?
    what is the xbasic code you are using to print the report?

    it will typically look something like this:

    Code:
    dim filter as c 
    dim order as c 
    Filter = ".T."
    Order = ""
    Dim filename as c 
    filename = session.session_folder + "tempreport.pdf"
    filename = report.saveas("Authors@[PathAlias.ADB_Path]\authors.ddd","pdf",filter,order,filename,.f.)
    if you test this code in the interactive window (replacing [pathalias.adb_path] with the actual folder where the ddd' file is (and of course replacing the report name and table dictionary), does it work?

    You would need to be able to get your test working in the Interactive window before trying it in the Web Server.

  3. #3
    Member
    Real Name
    Ken Wickham
    Join Date
    Feb 2008
    Posts
    26

    Default Re: Amyuni Low Level Print: Web Reports

    I have all that code. It works when I have only one row in the reports table.
    Any more than one row I get the error.
    I changed the last part of the following code from
    "Report_Id=\"" + report + "\""
    to
    "Report_Id=report"

    ---- "report" being the name of the control on the dialog. ----

    rpt_values = table.external_record_content_get("[PathAlias.ADB_Path]\reports", "alltrim(Report_Name)+ \"|\" + alltrim(Report_Table)", "", "Report_Id=report")

    Note: When I enter the line above in the interactive window I get.
    ?rpt_values
    = ProjectbyOwner|emptoproj
    ProjectStatus|projecthdr
    employee|employee

    Which is correct.
    end note

    The rest of the code that is in my a5w page is as follows:

    dim filter as C
    dim order as C
    filter = "" ' Print all records in report
    order = ""
    dim filename as C
    dim flname as C
    flname = word(rpt_values, 1, "|") ' create file name from rpt_values report name

    flname = stritran(flname, " ", "_") + "_" + dtoc(date(), "1-") + ".pdf"

    filename = session.session_folder + chr(92) + flname 'create report in current session folder

    filename = report.saveas(word(rpt_values, 1, "|") + "@[PathAlias.ADB_Path]\\" + word(rpt_values, 2, "|"), "PDF", filter, order, filename, .f.)

    wait_until(file_exists(filename), .1, 10) ' wait up to 10 seconds for report to complete

    if file.exists(filename)
    response.redirect(session.session_url + flname +"?" + time("hms3"))
    end
    else
    error_msg = "Report could not be Printed"
    end if


    ---- When I have a single row in the reports table the url is

    http://wick-laptop/session_folders/b....pdf?171948079

    So I am at a loss
    Last edited by WicksWar; 04-08-2008 at 07:22 PM. Reason: My url when I have a single entry in reports table

  4. #4
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,307

    Default Re: Amyuni Low Level Print: Web Reports

    Ken, you've posted this topic to the wrong forum. It might get better attention if you didn't post it in the desktop forum, since you're working on a web app, right?

  5. #5
    Member
    Real Name
    Ken Wickham
    Join Date
    Feb 2008
    Posts
    26

    Default Re: Amyuni Low Level Print: Web Reports

    I need to be more mindful of where I post.

    Figured out my issue. I had the report_id set to numeric thinking that using an incremental id would be the way to go. Anyway I added a character field (Report_Number) as C and used that to filter on. So, everything works as advertised.

Similar Threads

  1. Amyuni Low Level Print: Web Reports
    By WicksWar in forum Application Server Version 9 - Web/Browser Applications
    Replies: 1
    Last Post: 04-08-2008, 12:44 PM
  2. What does this error mean: Amyuni Low Level Print???
    By drgarytraub in forum Application Server Version 8
    Replies: 6
    Last Post: 01-07-2008, 10:36 PM
  3. Low level script recorder
    By BOB SULLIVAN in forum Alpha Five Version 8
    Replies: 3
    Last Post: 03-07-2007, 01:29 PM
  4. Low Level Warning
    By Keith Hubert in forum Web Application Server v6
    Replies: 1
    Last Post: 08-09-2004, 05:58 PM
  5. What happened to Script Recorder low level?
    By ronwills in forum Alpha Five Version 5
    Replies: 1
    Last Post: 01-03-2004, 11:05 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
  •