By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,985 Members | 1,776 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,985 IT Pros & Developers. It's quick & easy.

Crystal Report 8.5 and Visual Basic 6.0 Problem

P: 40
Hello guys,

I am having a difficult time connecting VB6 to CR 8.5... I have tried adding Crystal report 8.5 in my project and use it as a designer tool.. i am successful designing the report, here's my question...

1. How can i view my report?
2. is there any connection needed?
3. before i did this, there is an error message saying: "Failed to add viewer".
4. what could be the impact of this eror?
5. does the error related to my problem in viewing the report?
6. How can i get rid this error?

Thanks guys!
Jan 10 '08 #1
Share this Question
Share on Google+
7 Replies


debasisdas
Expert 5K+
P: 8,127
add a crystla report viewer to the form

try the sample code (this is for connection to Oracle)

Expand|Select|Wrap|Line Numbers
  1. Public Sub ReportDisplay(Query As String)
  2.  
  3. Set CRXReport = visitordetails
  4. Set CRXDb = CRXReport.Database
  5. CRXReport.DiscardSavedData
  6.  
  7. inti = 1
  8. Do Until inti = CRXReport.Database.Tables.Count + 1
  9. CRXReport.Database.Tables.Item(inti).SetLogOnInfo strdblocation, "das", "debasis", "debasis"
  10. inti = inti + 1
  11. Loop
  12.  
  13. visitordetails.SQLQueryString = Query
  14.  
  15. With FrmReport1
  16. .Show
  17. .CRV1.ReportSource = CRXReport
  18. .CRV1.ViewReport
  19. End With
  20.  
  21. Set CRXReport = Nothing
  22. End Sub
  23.  
  24.  
Jan 10 '08 #2

P: 40
Hi Sir,

i forgot to tell you...My database back-end is MS Access...will this code work for me??

Thanks,
Jan 10 '08 #3

debasisdas
Expert 5K+
P: 8,127
Please find a related discussion here.
Jan 10 '08 #4

P: 40
Hi sir,

Why is it that i can't find the .ViewReport, .EnableExportButton, .EnableCloseButton and .ReportSource??

is there a problem with my .dll's?

How can i solve this problem?

Thanks!
Jan 10 '08 #5

lotus18
100+
P: 866
Hi sir,

Why is it that i can't find the .ViewReport, .EnableExportButton, .EnableCloseButton and .ReportSource??

is there a problem with my .dll's?

How can i solve this problem?

Thanks!
I think you need to add a reference to it : )

Rey Sean
Jan 10 '08 #6

QVeen72
Expert 100+
P: 1,445
Hi sir,
Why is it that i can't find the .ViewReport, .EnableExportButton, .EnableCloseButton and .ReportSource??
did you add "Crystal Viewer" Control to your form...?

-Veena
Jan 10 '08 #7

P: 40
Hehehe.. Thanks guys!

whoooo!
Jan 11 '08 #8

Post your reply

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