Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB Components
|
VB Components Issues specific to components in VB.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 10th, 2007, 08:52 AM
Registered User
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Crystal Report Printing Problem

Hello,

I have visual Basic6 and Seagate Crystal Report

I've designed simple VB project with only one button "print"
This button will run crystal report
This report have only one text field: "Hello message"

The problem is that this program is working fine with some users
and it will not work for others especially when they have new PCs

There is no error message or warnings
The program is working
but when hitting the button, there will not be any response

I checked the Crystal report (.dll) files
(e.g. craxdrt.dll, crviewer.dll, craxdrt.dll) all are there.

The CODE of two testing buttons in the program:

Private Sub Command3_Click()
  crpPrintAll.Reset ' crystal report component name
  crpPrintAll.ReportFileName = App.Path & "\TestWaseem.rpt"
  crpPrintAll.Destination = crptToPrinter ' crptToWindow
  crpPrintAll.PrintReport
End Sub


Private Sub Command2_Click()
    crpPrintAll.Reset
    'crpPrintAll.Connect= "DSN=XXX;UID=XXX;PWD=XXX;DSQ=XXX"
    crpPrintAll.ReportFileName = "I have Put full path here"
    crpPrintAll.Destination = crptToWindow
    crpPrintAll.PrintReport
End Sub

'-------------------

Please, I have this prolem one week ago..

I appreciate your concern


Regards,

 
Old January 14th, 2007, 04:04 AM
Registered User
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I tried another project… with tow methods of viewing the report
One with crviewer.dll
The other is with craxdrt.dll

The second one is working… but the old is not…


Can any body tell me what is the problem ????

Here is my new code…
'-------

Dim crpRep As CRAXDRT.Report
Dim crpApp As CRAXDRT.Application

Private Sub Command1_Click()
    Set crpApp = New CRAXDRT.Application
    Set crpRep = crpApp.OpenReport("s:\testwaseem.rpt")

    CrystalReport1.Reset
    CrystalReport1.ReportFileName = "s:\testwaseem.rpt"
    CrystalReport1.Destination = crptToWindow
    CrystalReport1.WindowState = crptMaximized
    CrystalReport1.PrintReport

    CRViewer1.ReportSource = crpRep
    CRViewer1.ShowNextPage
    CRViewer1.Visible = True
    CRViewer1.ZOrder 0
    CRViewer1.ViewReport
    CRViewer1.PrintReport

End Sub
'--------------------


Regards,

 
Old January 14th, 2007, 04:27 AM
Registered User
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

http://www.geocities.com/w_almohsin/11.bmp
http://www.geocities.com/w_almohsin/22.bmp

 
Old January 14th, 2007, 04:40 AM
Registered User
 
Join Date: Jan 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

http://www.geocities.com/w_almohsin/12.bmp






Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Report 8.0 printing problem arumugavel VB How-To 0 August 29th, 2007 05:33 AM
printing problem in crystal report 8.0 arumugavel Crystal Reports 0 August 28th, 2007 10:33 PM
Printing crystal report problem sanjivbshinde Crystal Reports 0 November 7th, 2006 07:16 AM
problem in crystal report printing tarun VB Components 1 May 16th, 2005 07:08 AM
Crystal Report Printing Problem rinos Crystal Reports 0 September 23rd, 2004 02:57 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.