can't get

Posted by: progame-dd on 4 August 2017, 3:02 pm EST

  • Posted 4 August 2017, 3:02 pm EST

    <U>Viewer.PrintReport bShowPrinterDialog</U>

    when i print some reports continues to pdf printer, only the first printing can get correct, others is 0.

    after i add code behide it:

    <U>Viewer.PrintReport bShowPrinterDialog</U>


    so i can get the right pagecount.


    if i print them to office image writer printer, it's ok.

  • Replied 4 August 2017, 3:02 pm EST


    Could you please detail how do you call PrintReport(bDisplayDialog As Boolean) method exactly? Do you pass True or False value?

    <span class="txt2">If you want to print the report to PDF you may want to  take a look at the following KB article on how to print directly to the printer:<b>

    You will need to specify the name of the
    printer device before you print:
    Dim rpt As ActiveReport1
    Set rpt = New ActiveReport1
    rpt.Printer.DeviceName = "<NAME OF PDF PRINTER DEVICE"
    rpt.PrintReport False

    How do you get the Pages.Count property?

    Is it possible to post a code sample here?
  • Replied 4 August 2017, 3:02 pm EST

    we need save report as rdf binary stream:


    so we must use viewer to print report

    bShowPrintDialog is boolean value

  • Replied 4 August 2017, 3:02 pm EST

    if i print a report, then click button to print the next, it works fine. but if i let it print many reports at one time, only the first printing can get the right pages.count value.

    but select "Microsoft Office Document Image Writer" is ok, i guess because printing is broken when i save the image file.

    and i add "Doevents" after print also can get the right value.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels