Active Reports 12

Posted by: wrwhite0132 on 25 July 2018, 2:22 am EST

    • Post Options:
    • Link

    Posted 25 July 2018, 2:22 am EST

    Good Day, Im using active reports 12 and I have a question… I send my report to the preview viewer and i want to know when I click to print… is there a way to close the report after the print job is completed?

    TIA

    Walter

  • Posted 25 July 2018, 8:40 pm EST

    Hello,

    There is no direct to know the execution of the print job. However, you remove the default “Print” in Viewer and add the custom button to print the report and use threading to know execution of “Print” method. Please refer to the attached sample to implementing the same.

    Hope it helps.

    RdlReportApplication3.zip

  • Posted 26 July 2018, 2:36 am EST

    i program in vb.net, but had my son (who knows c#) show me how your example worked and I now have a working version… I was able to keep the image icon and even add the word print to the button…

    Public Class ReportPreview

    Private WithEvents tsbPrint As New ToolStripButton("Print")
    
    Private Sub ReportPreview_Load(sender As Object, e As EventArgs) Handles Me.Load
    
        tsbPrint.Image = Viewer1.Toolbar.ToolStrip.Items.Item(2).Image
    
        Viewer1.Toolbar.ToolStrip.Items.RemoveAt(2)
        Viewer1.Toolbar.ToolStrip.Items.Insert(2, tsbPrint)
    
    End Sub
    

    Private Sub tsbPrint_Click(sender As Object, e As EventArgs) Handles tsbPrint.Click

    Viewer1.Print(True, True, True)

    Me.Close()

    End Sub
    

    Thanks for all your help!

Need extra support?

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

Learn More

Forum Channels