locked
how client side user print a report from iis in thier local printers RRS feed

  • Question

  • User1637929244 posted

    how client side user print a report from iis in thier local printers

    Thursday, September 13, 2012 8:12 AM

Answers

All replies

  • User1410450975 posted
    <html>
    
    <head>
    
    
    
        <style type="text/css">
    
        #printable { display: none; }
    
        @media print
        {
            #non-printable { display: none; }
            #printable { display: block; }
        }
        </style>
    </head>
    <body>
        <div id="non-printable">
            Your normal page contents
        </div>
    
        <div id="printable">
    <h1>your sale print invoice put here</h1>
        </div>
    
    
    <input type="button" value="Print this page" onClick="window.print()">
    
    
    </body>
    
    
    </html>

    Thursday, September 13, 2012 9:27 AM
  • User1637929244 posted

    I user report document without using report viewer,

    May I ask you if that way can print report at client side default printer

    My code

    I define

    Public rpt As New ReportDocument

    then I call rpt

    dm1.rpt.Load(Server.MapPath("crystalreportBondDel.rpt"))
            dm1.rpt.SetDatabaseLogon("sa", "sa", ".", "carRent")
            dm1.rpt.SetParameterValue("BondID", ViewState("BondDelID"))
            dm1.rpt.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperA4
            dm1.rpt.PrintToPrinter(1, False, 1, 1)

    this code work well from vs 2010 then press F5  but when I deploy it to iis server

    when I press to print loading and no action and no print as well

    Thursday, September 13, 2012 9:50 AM
  • User1410450975 posted

    if you are using sheard hosting then its difficult becuse many hosting service not allowed to any report for reporting you can 

    use simple grid view with differnt style and for print use my above code

    Thursday, September 13, 2012 10:00 AM
  • User1637929244 posted

    no,i don't use sheared hosting , i deploy a package to iis server for test

    Thursday, September 13, 2012 10:21 AM
  • User1410450975 posted

    did you install Vs 2010+Sap crystal Report on your server ?

    Friday, September 14, 2012 10:09 AM
  • User1637929244 posted

    yes..

    Saturday, September 15, 2012 6:53 AM
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, September 15, 2012 10:39 AM