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

    I'm looking
    for example direct printing (printing directly to the printer),
    no need to print preview,
    one example to share yourself
    with, thanks.
  • 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

    I
    have the code below to
    print preview very well:

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


      Dim
    tmpSQL As String           
      '
    View
    in list processing
    (Bill)
      tmpSQL =
    "SELECT * FROM TabSUDUNGCT  WHERE OrderID = "
    & Str(lSelectedOrder)

     
    ARinCheBien.DAODataInCheBien.RecordSource = tmpSQL

     ARinCheBien.PrintReport False  ' error in this line : Run-time error '482' Pritnter error

    I
    do not know how to
    fix
    ?



Need extra support?

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

Learn More

Forum Channels