Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Printing Reports in CRXI and VB 6

Posted on 2006-10-26
4
Medium Priority
?
377 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 101

Accepted Solution

by:
mlmcc earned 600 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 101

Expert Comment

by:mlmcc
ID: 17813959
Glad i could help

mlmcc
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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…
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

609 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