|
-
Apr 4th, 2008, 03:35 AM
#1
Thread Starter
New Member
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!!! Thank you in advance!
****************************************************************************
on the customer form ("frmCustomer"):
Code:
Private Sub cmdView_Click()
Call GenerateCrystalReport
End Sub
****************************************************************************
on module 1: (I put this on global)
Code:
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:
Code:
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
-
Apr 4th, 2008, 03:38 AM
#2
Re: How to connect Crystal Report 8.5 to VB 6
Its telling you that you are missing one of the referenced fields in your group selection formula perhaps.
Thread Moved
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 4th, 2008, 08:00 PM
#3
Hyperactive Member
Re: How to connect Crystal Report 8.5 to VB 6
Right-click the group section labels at the left of the designer. Select Format Section and then check out any of the buttons that show in Red. There will be a reference to a field that is incorrect in the current report.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|