How to print directly without view before printing in ActiveReport 2.0?

Posted by: dongtrien on 4 August 2017, 3:22 pm EST

  • Posted 4 August 2017, 3:22 pm EST

    <span id="result_box" class=""><span class="">I'm looking</span>
    <span class="hps">for</span> <span class="hps">example</span> <span class="hps atn">direct printing (</span><span class="">printing</span> <span class="hps">directly</span> <span class="hps">to</span> <span class="hps">the</span> <span class="hps">printer</span><span>)</span><span>,</span>
    <span class="hps">no</span> <span class="hps">need</span> <span class="hps">to</span> <span class="hps">print preview</span><span>,</span>
    <span class="hps">one</span> <span class="hps">example</span> <span class="hps">to</span> <span class="hps">share</span> <span class="hps">yourself
    with, thanks.
    </span></span>
  • Replied 4 August 2017, 3:22 pm EST

    dongtrien,

    I would suggest you to take a look at this KB article which explains how you can print the report directly without showing it on the screen.

    Regards,
    Sankalp
  • Replied 4 August 2017, 3:22 pm EST

    <span id="result_box" class="short_text"><span class="">I</span>
    <span class="hps">have</span> <span class="hps">the</span> <span class="hps">code</span> <span class="hps">below</span> <span class="hps">to</span>
    <span class="hps">print preview</span> <span class="hps">very well</span><span class="">:

      Dim tmpSQL As String           
      '</span></span><span id="result_box" class=""><span>View</span> <span class="hps">in</span> <span class="hps">list</span> <span class="hps">processing</span></span><span id="result_box" class="short_text"><span class=""> (Bill)
      tmpSQL = </span></span>"SELECT * FROM TabSUDUNGCT  WHERE OrderID = " & Str(lSelectedOrder)
    <span id="result_box" class="short_text"><span class="">  ARinCheBien.DAODataInCheBien.RecordSource = tmpSQL
      ARinCheBien.Show
     
    </span></span><span id="result_box" class=""><span class="">  because I</span>
    <span class="hps">want</span> <span class="hps">to</span><span class="hps"></span><span class="hps"> print directly</span><span></span> <span class="hps">I</span> <span class="hps">changed</span><span>  </span><span class="hps"></span></span><span id="result_box" class="short_text"><span class="">ARinCheBien.Show  </span></span><span id="result_box" class=""><span class="">converted into </span></span><span id="result_box" class="short_text"><span class="">ARinCheBien</span></span><span id="result_box" class=""><span>.</span><span class="hps">PrintReport</span></span> <span id="result_box" class=""><span>but</span> <span class="hps">an</span> <span class="hps">error</span> <span class="hps">when
    running</span> <span class="hps">it</span></span>
    <span id="result_box" class="short_text"><span class="">
    </span></span><span id="result_box" class="short_text"><span class="">  Dim
    tmpSQL As String           
      '</span></span><span id="result_box" class=""><span>View</span>
    <span class="hps">in</span> <span class="hps">list</span> <span class="hps">processing</span></span><span id="result_box" class="short_text"><span class=""> (Bill)
      tmpSQL = </span></span>"SELECT * FROM TabSUDUNGCT  WHERE OrderID = "
    & Str(lSelectedOrder)

    <span id="result_box" class="short_text"><span class=""> 
    ARinCheBien.DAODataInCheBien.RecordSource = tmpSQL</span></span>
    <span id="result_box" class="short_text"><span class=""> ARinCheBien.PrintReport False  ' </span></span><span id="result_box" class=""><span class="">error</span> <span class="hps">in</span> <span class="hps">this</span> <span class="hps">line : Run-time error '482' Pritnter error

    </span></span><span id="result_box" class="short_text"><span class="">I</span>
    <span class="hps">do</span> <span class="hps">not</span> <span class="hps">know</span> <span class="hps">how</span> <span class="hps">to
    fix</span><span class=""> ?</span></span>
    <span id="result_box" class=""><span class="hps">
    </span></span><span id="result_box" class="short_text"><span class="">
    </span></span>
Need extra support?

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

Learn More

Forum Channels