473,326 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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!!!Thank you in advance!!

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

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdView_Click()
  2. Call GenerateCrystalReport
  3. End Sub
****************************************
************************************
on module 1: (I put this on global)

Expand|Select|Wrap|Line Numbers
  1. Public Function GenerateCrystalReport() As Long
  2.  
  3. Dim recReport As ADODB.Recordset
  4. Dim strSQL As String
  5.  
  6. ''Call connect
  7. Set recReport = New ADODB.Recordset
  8. strSQL = "select * from TableCustomer order by TransactionID, TranDateTime"
  9. recReport.Open strSQL, DBconnection, adOpenDynamic, adLockOptimistic, adCmdT
  10. ext
  11. Set m_crReport = New CrystalReport1
  12.  
  13. m_crReport.Database.Tables(1).SetDataSource recReport
  14.  
  15. frmViewReport.Show
  16.  
  17. GenerateCrystalReport = 1
  18.  
  19. End Function
****************************************
************************************
on the frmViewReport:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2. Screen.MousePointer = vbHourglass
  3. CRViewer1.ReportSource = m_crReport
  4. CRViewer1.ViewReport
  5. Screen.MousePointer = vbDefault
  6.  
  7. End Sub
  8.  
  9. Private Sub Form_Resize()
  10. CRViewer1.Top = 0
  11. CRViewer1.Left = 0
  12. CRViewer1.Height = ScaleHeight
  13. CRViewer1.Width = ScaleWidth
  14.  
  15. End Sub
Apr 4 '08 #1
0 1592

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: kristoff plasun | last post by:
I have a problem with a C++ DCOM application that prints Crystal Reports with data from Oracle. The SQL query is relatively complex but when the report is printed from the Crystal Reports...
0
by: Dr. Indera | last post by:
hello, i previously posted the questions below on several crystal reports newsgroups, including the one for the company that makes crystal reports, but never got an answer, so i'm hoping that...
1
by: bthomas71chevy | last post by:
I have just setup a WebServer and all the applications work fine, but when every any of the applications try to generate a Crystal Report the page errors out. "File or assembly name...
0
by: Big George | last post by:
Hello, I'm working with Visual Studio 2003 .NET and Crystal Reports for .NET. Database: Oracle 10g Develop PC: Windows XP I'm having problems trying to design a Crystal Report connecting to...
1
by: SanjayAgrawal | last post by:
Hi!! I am using VB 6.0 with Crystal Report 8.5. I want to connect Report with the connction string object used in project. Plz Help me.... Thanx
11
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
How can I stop receiving this message while calling a crystal report? "The report you requested requires further information." Thanks
1
Shashi Sadasivan
by: Shashi Sadasivan | last post by:
Hi, I have bumped into this issue where my application (which consistently reads the database) has to also create a crsytal report when requested. The crystal repost uses the same connection string...
3
by: kkshansid | last post by:
i can not connect my crystal report with sql server.at my home pc i can connect it on local host by making new ado connection but same process is not working to connect with server.its givig error...
1
by: ganeshvkl | last post by:
hi , i 'm using VB 6.0 with sql server 2000 .Report - Crystal Report 8.5 when i try to connect the database from vb 6.0. The Code is strDSNName = "Provider=sqloledb;Data Source=server;Initial...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.