Print Search Rate
    
   10-16-2003, 4:44 PM
HOWTO: Printing on the Client Using ASP.NET
Attachment: PrintingToClient.zip

There are three steps to automatically printing a document in ASP.NET from the ActiveX Viewer Control.

  1. Placing the ActiveX Control on the page as an object. Setting the version to -1,-1,-1,-1 forces Internet Explorer to check for updates each time the page is rendered. Here's the code that goes in the ASPX page:

    <OBJECT id=arv codeBase=bin/arview2.cab#version=-1,-1,-1,-1 height=0 width=0 classid=CLSID:8569d715-ff88-44ba-8d1d-ad3e59543dde>

  2. Loading the data into the report. Set the DataPath of the viewer object. This can be anything from a byte array to a hard coded path:

    [DISABLEDSCRIPT] sub window_onload() arv.datapath = "temp.rdf" end sub

  3. Printing the report. This is done by syncing the LoadCompleted event of the viewer. Inside a call is made to the Viewer's PrintReport method:

    sub arv_loadcompleted() arv.PrintReport False end sub [/DISABLEDSCRIPT]




    Applies To:
    ActiveReports for .NET 1.0
    GrapeCity » Knowledge Base » KnowledgeBase f... » HOWTO: Printing on the Client Using ASP.NET
    Privacy Policy | Copyright © 1997-2012 — GrapeCity, inc.
    All trademarks mentioned are the property of their respective owners.