How to connect Crystal Report 8.5 to VB 6 
Author Message
 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
CustomerManagement 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 frmCustomer:

"This group section cannot be printed becase its condition field is
nonexistent 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,
adCmdText
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

--
silentd
------------------------------------------------------------------------
Posted via http://www.*-*-*.com/
------------------------------------------------------------------------



Tue, 21 Sep 2010 16:03:01 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Crystal Reports 8.5 (VB6) to Crystal Reports NET (VB.NET) conversion

2. vb .net crystal reports not compatible with Crystal Reports 8.5

3. Crystal Report 8.5 and connecting to SQL Server?

4. Problems connecting to Web Report Server in Crystal 8.5

5. Crystal 8.5/VB.NET (Connecting)

6. Crystal 8.5/VB.NET (Connecting)

7. Crystal Report 8.5 and VB .net

8. Crystal Reports 8.5 Grouping Definition in VB.

9. VB Crashes when inserting a Crystal 8.5 Report Designer

10. how can i call the Crystal report(8.5) from vb 6.0

11. Running Crystal 8.5 Reports on Crystal 9 RAS

12. Crystal Report 8.5 and VB 6

 

 
Powered by phpBB® Forum Software