?
Solved

Printing Reports in CRXI and VB 6

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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

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. …
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…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
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
Course of the Month10 days, 9 hours left to enroll

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