Solved

Crystal PrintDocument object help

Posted on 2011-09-07
2
393 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 100

Expert Comment

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

mlmcc
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Telerik RadEditor Control Save 8 36
Stop Git from being my repository 1 44
sql views 3 50
Disable the weekends on datepicker control 6 49
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

736 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