?
Solved

Crystal PrintDocument object help

Posted on 2011-09-07
2
Medium Priority
?
400 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 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

765 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