Solved

Printing Reports in CRXI and VB 6

Posted on 2006-10-26
4
370 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
  • 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

744 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

12 Experts available now in Live!

Get 1:1 Help Now