Solved

Crystal PrintDocument object help

Posted on 2011-09-07
2
377 Views
Last Modified: 2012-06-27
Hi,
I was wondering if someone is able to help. I need to be able to create a PrintDocument object from a generated crystal report within vb.net. I have previously used the following for printing a document (please see attached code). The requirement has now changed to the user now needing a .PDF copy. I am using novaPdf which I am able to call but I need to pass through a PrintDocument object in order to get it to work.

Regards,

Ross

Dim objReport As clsReport
        Dim objFrmReport As New frmreport
        Dim objUD17 As clsUD17
        Dim myReport As PackSlip

        objOrder = New clsOrder ' Created for the connection
        objUD17 = New clsUD17(dtBatch, objOrder.getConnection) ' pass the connection
        '  objUD17.CheckBatch() ' Check the batch

        myReport = New PackSlip()
        objReport = New clsReport(dtBatch)
        objReport.ExtractReport()
        myReport.PrintOptions.PrinterName = "HP LaserJet 1100 (MS)"

        myReport.PrintToPrinter(1, True, 1, 0)


        'objFrmReport.Show()
        ' dtBatch = objUD17.getDt ' return the datatable as this could have items that have been removed due to them being scanned.

        'objUD17.CheckBatch() ' Check the batch
        objUD17.createNewBatch() 'Create the new batch


        objReport = Nothing
        objFrmReport = Nothing
        objOrder = Nothing
        MsgBox("Complete")

Open in new window

0
Comment
Question by:ross13
2 Comments
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 500 total points
Comment Utility
0
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
Why not use the Crystal export to PDF capability?

mlmcc
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now