Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

How to connect Crystal Report 8.5 to VB 6
Hi everyone, Im really new at VB and Crystal Report and i know nothing about
 Crystal Report 8.5. My problem is, i have this application called CustomerM
anagement that will keep data in Microsoft Access called 'dbCustomer'
In the form customer ('frmCustomer') i've created a command button 'cmdView'
 so that the user may view the data in Crystal Report.
My problem is, i've created the link from the form to the CrystalReport1 but
 this error appear when i click the button 'View' (cmdView) on my frmCustome
r: 

"This group section cannot be printed becase its condition field is nonexist
ent or invalid. Format the section to choose another condition field."  

 Please help me!!! and Thank you in advance!

 ****************************************
*****************************
on the customer form ("frmCustomer"):

Private Sub cmdView_Click()
Call GenerateCrystalReport
End Sub
 ****************************************
*****************************

on module 1: (I put this on global)


Public Function GenerateCrystalReport() As Long

Dim recReport As ADODB.Recordset
Dim strSQL As String

''Call connect
Set recReport = New ADODB.Recordset
strSQL = "select * from TableCustomer order by TransactionID, TranDateTime"
recReport.Open strSQL, DBconnection, adOpenDynamic, adLockOptimistic, adCmdT
ext
Set m_crReport = New CrystalReport1

m_crReport.Database.Tables(1).SetDataSource recReport

frmViewReport.Show

GenerateCrystalReport = 1

End Function

 ****************************************
*****************************

on the frmViewReport:

Private Sub Form_Load()
Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = m_crReport
CRViewer1.ViewReport
Screen.MousePointer = vbDefault

End Sub

Private Sub Form_Resize()
CRViewer1.Top = 0
CRViewer1.Left = 0
CRViewer1.Height = ScaleHeight
CRViewer1.Width = ScaleWidth

End Sub

Report this thread to moderator Post Follow-up to this message
Old Post
silentd
04-04-08 08:03 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Visual Basic archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:24 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.