Print Report with navision application server

StoneStone Member Posts: 23
edited 2012-03-16 in Navision Attain
Hi,

Is'it possible to execute reports with NAS ?

When i try this procedure, i receive the message "you cannot print to ." in the event viewer ...

Many thanks for your help :(

Comments

  • PrebenRasmussenPrebenRasmussen Member Posts: 137
    My guess is that no printer is installed on the server.
    Is this the case?
  • StoneStone Member Posts: 23
    no :( a default printer is installed on the server. and, in the command GUIALLOWED Help, MBS wrote:

    Use this operating system function to check whether the C/AL code is allowed to show any information on the screen. When you run Navision Attain Application Server (where GUIALLOWED returns FALSE), any call to CONFIRM or d.OPEN, or any attempt to use a form, report or dataport will generate an error.

    Thanks for your answer :)
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Starting from Attain 3.60, it is possible to print reports using the Application Server.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • StoneStone Member Posts: 23
    Yes Luc, it's possible but that don't work :(:(

    The report properties are:

    UseSystemPrinter: YES
    ShowStatus: NO
    UseRequestForm: NO

    The server running NAS is using a windows default printer (not a local printer but network printer)

    The code-unit contains code:

    PrintReport(ReportSelection.Usage::"S.Shipment");

    and the function PrintReport:

    ReportSelection.RESET;
    ReportSelection.SETRANGE(Usage,ReportUsage);
    ReportSelection.FIND('-');
    REPEAT
    ReportSelection.TESTFIELD("Report ID");
    CASE ReportUsage OF
    ReportSelection.Usage::"S.Shipment":
    REPORT.RUN(ReportSelection."Report ID",FALSE,FALSE,SalesShptHeader);
    ReportSelection.Usage::"P.Ret.Shpt.":
    REPORT.RUN(ReportSelection."Report ID",FALSE,FALSE,ReturnShptHeader);
    ReportSelection.Usage::Inv2:
    REPORT.RUN(ReportSelection."Report ID",FALSE,FALSE,TransShptHeader);

    END;
    UNTIL ReportSelection.NEXT = 0;

    after running ADCS, nothing to printer and the message in the event viewer : "You cannot print to ."

    :evil: :evil: :evil:

    is't a joke from MBS ???
  • CenTCenT Member Posts: 12
    Don't see a real solution to the problem here. IS it or ISN'T it possible to print a report from the NAS?

    I get the following entry in my eventlog
    "Before you can perform printer-related tasks, you need to install a printer." while there is obviously a printer installed, running the codeunit manually does the trick.
  • CenTCenT Member Posts: 12
    Ok I got it working, just needed to make sure the printers were known to the user running the Navision Application Server.
  • superjetsuperjet Member Posts: 40
    CenT wrote:
    Ok I got it working, just needed to make sure the printers were known to the user running the Navision Application Server.
    does someone understand what CenT did here ?
  • garakgarak Member Posts: 3,263
    Search the forum for NAS and Print.
    Also on the MSDN site of MS schould alsoe be a tech.article
    Do you make it right, it works too!
  • bbrownbbrown Member Posts: 3,268
    superjet wrote:
    CenT wrote:
    Ok I got it working, just needed to make sure the printers were known to the user running the Navision Application Server.
    does someone understand what CenT did here ?

    NAS runs as a Windows user. He just needed to be sure that user was configured with a default printer on that computer.
    There are no bugs - only undocumented features.
  • henrikohmhenrikohm Member Posts: 30
    I have exact same problem:

    - 64 bit
    - NAS printing PDF
    - Using Windows Tasks to NET START <NASNAME>
    - Problem MAY have occured AFTER installation of Invoice Workflow solution, but not sure
    - Yes, printer assigned in NAV printer selection
    - Yes, printer is default
    - Yes, have logged in as nas user and testet directly in NAV

    The weird thing is that is HAS BEEN working and suddenly it doesn't :(

    Another weird thing is that if we restart the server then it works (1-2 times?), but the day after it doesn't.

    We have tried local administrator and domain administrator.

    We have re-installed PDFCreator printer driver.

    We have created and tried PDFCreator2 (new instance).

    All with no result and it's driving me crazy..

    Please somebody help :)

    Best regards
    Henrik
    Best regards
    Henrik Ohm
  • dick11dick11 Member Posts: 60
    We have the same problem.
    Technical details:

    Server 2008
    Navision 5.
    PDFCreator (latest version) is set to autosave to a fixed folder on the HD.

    I run the NAS now under my account.
    If I am logged on that server it works fine.

    But when I log off the pdf is no longer created.

    Has someone an idea?
    Dick van der Sar

    www.dasautomatisering.nl
  • henrikohmhenrikohm Member Posts: 30
    I have given up on PDFCreator.

    Then it works on the server... then it doesn't... then it works... then it doesn't. There can be weeks between failure.

    I have tried to install in server mode... didn't work.

    Now I have used 1-2 hours to rewrite the code to be using Bullzip PDF (free) and easy and SEEM TO work for now.

    Thank you for all your replies :)
    Best regards
    Henrik Ohm
  • henrikohmhenrikohm Member Posts: 30
    Have found the "solution". Apparently it is because there are 2 nas'es each with different user and tasks. If I stop one then it works. Solution for my customer: Install NAS2 on another server.
    Thank you everybody.

    sorry for the ... late... reply

    Henrik
    Best regards
    Henrik Ohm
Sign In or Register to comment.