Solved

Crystal PrintDocument object help

Posted on 2011-09-07
2
397 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 36497182
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 36497364
Why not use the Crystal export to PDF capability?

mlmcc
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

705 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