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

Background printing

edited July 2004 in General
i've enabled background printing capabilities
but it doesn't seem to work when i first present a print preview
when in the print preview i ask to print it simply doesn't do a thing, no
error, nothing
when i uncheck the background printing option all goes well
the report is getting its data from local memory datasets that aren't used
by other processes so that can't be the problem i guess
any ideas on where to start looking?
tia,
marc

Comments

  • edited July 2004
    Hi Marc,

    Please see the following examples on how to use the background printing
    feature in ReportBuilder.

    http://www.digital-metaphors.com/tips/BackgroundPrintDemos.zip

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2004
    Nico,
    before digging into the examples i've read the help file
    correct me if i'm wrong:
    when RB is going into another thread it makes a new instance of the
    datamodule to launch itself and do the printing?
    in that case it will not work cause i firstly have to move the data into the
    memdatasets in the datamodule and those are empty when the dataset is
    created of course
    is there a way to print my memdatasets in background using RB (is this
    documented in the samples?)

    tia,
    marc

  • edited July 2004
    Hi Marc,

    When are the memory datasets filled, or even opened? I assume when you open
    these datasets they are either filled or some event code is executed to fill
    them automatically. You could possibly use the TppDataPipeline.Open event
    to open your memory datsets so they contain data before the report is
    printed. I'm just a bit unclear about how your data access is set up
    because it seems like it should work.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2004
    Nico,

    well thats the problem, i now first fill the memdatasets before i start the
    printing job
    so what you are saying is that i should fill the datasets in the onopen
    event but at that point i have to get to objects who reside in the main
    thread and i don't even know if they still exists at that point
    so as i see it now the only thing i can do to make it work is to somehow
    write the memdata to a file and load it in the memdatasets when the onopen
    event is fired
    but then i have to deal with concurrency problems (potentially there are
    more than one instance running of the same app and printing at the same
    time, abstraction of the fact that i somehow have to pass the filename var
    but i guess thats a minor problem
    any other insights?
    tia,
    marc

  • edited July 2004

    You could also try opening the memdatasets in the OnCreate event of the
    Form/DataModule.

    --

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



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited July 2004
    Nard hi!
    no not possible,
    i'm passing a complex object-list-hiarchy
    to the created datamodule
    what i could try to do though is to create those memdata in another
    datamodule and somehow pass that reference into the creation of the
    datamodule...not sure how to do that but i think that is the only possiblity
    left...
    thx!
    marc

This discussion has been closed.