Solved

Printing Reports in CRXI and VB 6

Posted on 2006-10-26
4
374 Views
Last Modified: 2007-12-19
How can I just pritn a CRXI report from VB6 without going thru the ActiveXReportViewer and adding the report in as a Designer. Really Dont do a lot of viewing of reports Just want them to go directly to the printer.  Or am I going to have to "hide" the viewer and then print it?  Which just seems like a waste.

Thanks in advance
0
Comment
Question by:KOCUBA
[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
  • 2
4 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 150 total points
ID: 17813117
Here is the basic code for printing.  You will need to add CRAXDRT.DLL to the references. (Crystal Reports ActiveX Designer Runtime

Option Explicit
    Private crApp As CRAXDRT.Application
    Private crRpt As CRAXDRT.Report

'
'   Check if report is already in use
'
        If IsObject(crRpt) Then
           Set crRpt = Nothing
        End If

'
'   Open report
'
        Set crApp = New CRAXDRT.Application

        Set crRpt = crApp.OpenReport("C:\Crystal\MyReports\MyReport.rpt", 1)

'
'  Filter the data if desired
'
        crRpt.RecordSelectionFormula = "{SomeField} = 'SomeValue'"

'
'   Set flags for CRViewer
'
        crRpt.MorePrintEngineErrorMessages = False
        crRpt.EnableParameterPrompting = False
        crRpt.DiscardSavedData

'
'   Print Report
'
      crRpt.DisplayProgressDialog = False
      crRpt.PrintOut False

End Sub

mlmcc
0
 

Author Comment

by:KOCUBA
ID: 17813719
Thanks.  Just didn't have the time to search for it with running on a evaluation copy.
0
 

Author Comment

by:KOCUBA
ID: 17813734
Man do you and frodoman work for Crystal?   lol

Thanks Again

Now I can get back to testing the solution to my other qustion
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 17813959
Glad i could help

mlmcc
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

696 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