Need a better printer response for printing report

Posted by: ipads on 4 August 2017, 3:04 pm EST

  • Posted 4 August 2017, 3:04 pm EST

    Currently, we have a system that creates numerous shipments (can go from 10 shipments to thousands of shipments) for a day.  At the end of the day, the system processes all shipments and creates a report that contains all the shipments (around 3 pages per shipment).  What happens is it takes our report to process before the first page starts printing.  Is there any way where we can print the first page immediately while the rest of the page buffers itself?  We have tested 15,000 pages and it takes around 7 minutes before the printer starts printing.


    Process box says something like: Printing 45 of 15,055 pages (the first number increments as time goes by)


    It would be helpful to have something like: Printing 45 (then the number increments) - this way, it shows that the system didn't calculate the total number of pages before printing started.  It starts printing by sending the 1st page to the printer at once.


    There are no codes in the Details section, all formatting done on SQL (SQL runs around 3 seconds in query analyzer).


    Hope someone can help.  Thanks!


     

  • Replied 4 August 2017, 3:04 pm EST

    The report has to run to completion before ActiveReports sends the completed report to the printer. If you want to make this period shorter, you can create a report for each shipment (3 pages each) where you get a recordset of all the shipments (by ID) and then iterate this recordset and create a report for each shipment instead of one report for all the shipments. I mean you can have a WHERE clause in the reports SQL to create a report for a specific shipment:

    SELECT * FROM tblShipments WHERE ShipmentID = <%ShipmentID%>

    I think this would be better for printing and better than having the 15000 pages report all in memory at once. You can try this approach and compare with the current way you print the report.
  • Replied 4 August 2017, 3:04 pm EST

    If that would be the case, won't the page numbers reset for every report?  I need the page number to run continuously.
  • Replied 4 August 2017, 3:04 pm EST

    This is true. However, you can still print your reports this way and have a counter that starts with a value of 1 before you enter the loop and after you run a shipment report iterate its pages and use DrawText to draw the page numbering on the canvas and increment the counter as you go.

    Canvas Object's DrawText Method
    http://www.datadynamics.com/forums/253/ShowPost.aspx
Need extra support?

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

Learn More

Forum Channels