Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Samsung Printer problems

edited September 2007 in General
We are noticing some strange behavior on 3 different customer's machines
that have Samsung (and other) printers installed.
For some reason on these 3 installations, our Reports fail to run in an
ISAPI application. Specifically, it fails at the point where we load the RTM
file and try to parse the components.
We tried granting the IUSR user permissions to the printer but it did not
work. We resolved it by deleting and re-adding the Samsung printer. However,
it only lasted till we updated our program and it stopped working when we
released the new ISAPI dll. Once again, we deleted and re-added the printer
and it worked fine.

I don't know why Report builder depends on the printer canvas even when we
are just viewing the report on the screen. I am not sure what is going on
here. Any help is appreciated.

Thanks,
Vikram Kulkarni
Senior Software Engg.
Captools co.

--

Comments

  • edited September 2007

    - for future reference please specify Delphi version, Windows version,
    ReportBuilder version, data access components, database engine, etc.

    - Are you using RB Server Edition and its WebTier component to build an
    ISAPI solution? Or writing a custom web solution?

    - The intent is that RB /not/ require a printer. If no printers are
    installed, then RB will use a PrinterName called Screen. The Screen printer
    can be used to preview, but not print.

    - When Report.PrinterSetup.PrinterName = Default, then RB will use the
    default printer for the user account. If no default printer is found, RB
    will use Screen.



    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited September 2007
    Sorry, here are the details:
    Delphi 7 on Windows XP SP2 , RB PRO 10.06

    I am not using the webtier. We have built a custom ISAPI reporting
    solution.We also use Pragnaan components to convert a Report stream to PDF
    and then send it to the browser.

    The problem happens right at the point where it loads the report. As you
    indicate, RB probably doesn't need a printer but we don't know why just by
    deleting and re-adding the printer it works fine. I don't think the default
    printer is the problem here. The fact that there is a Samsung Printer driver
    on the machine is causing some problem. Also, everything works fine even
    when no printers are installed on the machine.

    I am not really saying there is a problem with RB as such because it works
    just fine for several other customers. There is some strange relation
    between the Samsung printer and RB running in a ISAPI app.

    Thanks,
    Vikram


  • edited September 2007
    Thanks for the additional info.

    Most likely the Report.PrinterSetup.PrinterName is set to 'Default' for the
    reports that you created. Therefore, RB will use the installed printer.

    You might try checking whether there is a newer Samsung driver available and
    if so download a test again.

    RB does not directly communicate with your driver, but makes Windows API
    calls. Drivers often contain bugs in which they do not properly support the
    Windows API.

    As a test a try running a standard Delphi and RB windows application using
    the Samsung driver
    You could try downloading a newer Samsung printer

    If the error only occurs within the context of the ISAPI application, make
    sure that the User Account under which the ISAPI application is executing
    has full access rights to the printer.

    Perhaps there is some sort of thread safety issue somewhere - that is always
    a possibility.




    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited September 2007
    Please see my answers inline.

  • edited September 2007

    - try a test in which you use RB's built-in PDF capability rather than
    Pragnaan. Perhaps the Pragnaan code is the culprit.

    - download a trial version of RB Server Edition and test using the RB
    WebTier.

    - ISAPI apps are multi-threaded. Otherwise, you could only handle one
    request at a time - which would not be much of solution. You don't have to
    create threads, the ISAPI architecture will do this for you. Delphi will
    create an instance of the WebModule created for each thread. 'Thread-safe'
    code means that the code can operate correctly in this type of
    multi-threaded environment.

    - As for the re-adding the printer, have never heard of that before.


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.