| | |
Urgent - I cannot view crystal report in my VB application...
![]() |
•
•
Join Date: May 2007
Posts: 20
Reputation:
Solved Threads: 0
CrystalReport1.ReportFileName = "c:\arif\r1.rpt" ' file location
CrystalReport1.Connect = "Provider=MSDAORA,1;UserID=scott;PWD=tiger;dsn=arif"
CrystalReport1.PrintReport
that code u can use but u need to use crystal report 8 or 8.5. a components will require that is crystal32.ocx. when u installed crystal report it will automatically in ur components list or system32 directory.
ok use it and fun.
bye.
reply me
CrystalReport1.Connect = "Provider=MSDAORA,1;UserID=scott;PWD=tiger;dsn=arif"
CrystalReport1.PrintReport
that code u can use but u need to use crystal report 8 or 8.5. a components will require that is crystal32.ocx. when u installed crystal report it will automatically in ur components list or system32 directory.
ok use it and fun.
bye.
reply me
•
•
Join Date: Apr 2007
Posts: 7
Reputation:
Solved Threads: 0
Hi!
I tried with ur code but it didn't work..
When i try the debugger mode (in VB) i can see the window but it closes in a sec... are there some kind of settings to be done in crystal reports.
I am using Crystal Reports 8.5
Regards
Swati
I tried with ur code but it didn't work..
When i try the debugger mode (in VB) i can see the window but it closes in a sec... are there some kind of settings to be done in crystal reports.
I am using Crystal Reports 8.5
Regards
Swati
•
•
•
•
CrystalReport1.ReportFileName = "c:\arif\r1.rpt" ' file location
CrystalReport1.Connect = "Provider=MSDAORA,1;UserID=scott;PWD=tiger;dsn=arif"
CrystalReport1.PrintReport
that code u can use but u need to use crystal report 8 or 8.5. a components will require that is crystal32.ocx. when u installed crystal report it will automatically in ur components list or system32 directory.
ok use it and fun.
bye.
reply me
•
•
Join Date: Aug 2007
Posts: 16
Reputation:
Solved Threads: 0
•
•
•
•
CrystalReport1.ReportFileName = "c:\arif\r1.rpt" ' file location
CrystalReport1.Connect = "Provider=MSDAORA,1;UserID=scott;PWD=tiger;dsn=arif"
CrystalReport1.PrintReport
that code u can use but u need to use crystal report 8 or 8.5. a components will require that is crystal32.ocx. when u installed crystal report it will automatically in ur components list or system32 directory.
ok use it and fun.
bye.
reply me
CRViewer91.ReportSource = "c:\crystalreport.rpt" ' file location
CRViewer91.Container = "Provider=MSDASQL.1;Persist Security Info=False;User ID=test;Data Source=develop"
CrystalReport1.PrintReport
but still it doesnt work, it says Type Mismatch. Then I changed the value from ReportSource to ViewReport - Still now luck came up with an error message "Assignment to Constant not Permitted". I am not sure where I should be able to find crystal32.ocx as I have searched for it on my pc and I could not find it, although I have added number of coms into vb such as "CRviewer" "OCX".
Could you please help me and explain where should I put the code and how to get the ocx file? Where am I doing wrong?
Many Thanks
•
•
Join Date: Apr 2007
Posts: 7
Reputation:
Solved Threads: 0
I am using jet oledb provider which removes the dependancy on the DSN...
The following lines are in the module.
Public Application As New CRPEAuto.Application
Public Report As New CRPEAuto.Report
Public Sub ConInit()
Dim hh As String
' hh = App.Path + "\MIS"
hh = "d:\MIS\CommonDB.mdb"
If CN.State = adStateClosed Then
CN.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & hh & ""
CN.Open
End If
End Sub
Coninit is called wherever I need to access the database..
The following lines... where u call the report...
Screen.MousePointer = 11
Set Application = CreateObject("crystal.crpe.application")
Set Report = Application.OpenReport("d:\mis\reports\PrintQuotation.rpt")
'' Report.ParameterFields("mArea").SetCurrentValue mArea
Report.Preview "Quotation", 100, 100, 800, 500
Screen.MousePointer = 0
U need to include the following Crystal Reports components in ur project..
controls :
crystal report control
crystal report viewer control
designer :
crystal report 8.5
include references as follows :
crystal report viewer control
crystal report engine 8 object library
crystal report 8.5 activex designer runtime library
crystal report 8.5 activex designer design & runtime library
crystal data object
crystal reports 8.5 library
Try this if it works
best of luck
swati
The following lines are in the module.
Public Application As New CRPEAuto.Application
Public Report As New CRPEAuto.Report
Public Sub ConInit()
Dim hh As String
' hh = App.Path + "\MIS"
hh = "d:\MIS\CommonDB.mdb"
If CN.State = adStateClosed Then
CN.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & hh & ""
CN.Open
End If
End Sub
Coninit is called wherever I need to access the database..
The following lines... where u call the report...
Screen.MousePointer = 11
Set Application = CreateObject("crystal.crpe.application")
Set Report = Application.OpenReport("d:\mis\reports\PrintQuotation.rpt")
'' Report.ParameterFields("mArea").SetCurrentValue mArea
Report.Preview "Quotation", 100, 100, 800, 500
Screen.MousePointer = 0
U need to include the following Crystal Reports components in ur project..
controls :
crystal report control
crystal report viewer control
designer :
crystal report 8.5
include references as follows :
crystal report viewer control
crystal report engine 8 object library
crystal report 8.5 activex designer runtime library
crystal report 8.5 activex designer design & runtime library
crystal data object
crystal reports 8.5 library
Try this if it works
best of luck
swati
•
•
Join Date: Apr 2007
Posts: 7
Reputation:
Solved Threads: 0
•
•
•
•
Thanks for posting this info but this does not work when I applied over to my application. It does not recognise the "connect" and "reportfilename" objects. instead I used
CRViewer91.ReportSource = "c:\crystalreport.rpt" ' file location
CRViewer91.Container = "Provider=MSDASQL.1;Persist Security Info=False;User ID=test;Data Source=develop"
CrystalReport1.PrintReport
but still it doesnt work, it says Type Mismatch. Then I changed the value from ReportSource to ViewReport - Still now luck came up with an error message "Assignment to Constant not Permitted". I am not sure where I should be able to find crystal32.ocx as I have searched for it on my pc and I could not find it, although I have added number of coms into vb such as "CRviewer" "OCX".
Could you please help me and explain where should I put the code and how to get the ocx file? Where am I doing wrong?
Many Thanks
The following lines are in the module.
Public Application As New CRPEAuto.Application
Public Report As New CRPEAuto.Report
Public Sub ConInit()
Dim hh As String
' hh = App.Path + "\MIS"
hh = "d:\MIS\CommonDB.mdb"
If CN.State = adStateClosed Then
CN.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & hh & ""
CN.Open
End If
End Sub
Coninit is called wherever I need to access the database..
The following lines... where u call the report...
Screen.MousePointer = 11
Set Application = CreateObject("crystal.crpe.application")
Set Report = Application.OpenReport("d:\mis\reports\PrintQuotation.rpt")
'' Report.ParameterFields("mArea").SetCurrentValue mArea
Report.Preview "Quotation", 100, 100, 800, 500
Screen.MousePointer = 0
U need to include the following Crystal Reports components in ur project..
controls :
crystal report control
crystal report viewer control
designer :
crystal report 8.5
include references as follows :
crystal report viewer control
crystal report engine 8 object library
crystal report 8.5 activex designer runtime library
crystal report 8.5 activex designer design & runtime library
crystal data object
crystal reports 8.5 library
Try this if it works
best of luck
swati
•
•
Join Date: Aug 2007
Posts: 16
Reputation:
Solved Threads: 0
Hello and Morning Swati,
Thanks for your kind help, I have managed to create the crystal report. Now I want to create an application where different department staff members can choose different catagerories to create their own reports. This way our IT department wouldn't have to create reports for them.
Have you done anything like that before? or you simply create reports yourself?
Many thanks for the help once more
Kind Regards
Jay
Thanks for your kind help, I have managed to create the crystal report. Now I want to create an application where different department staff members can choose different catagerories to create their own reports. This way our IT department wouldn't have to create reports for them.
Have you done anything like that before? or you simply create reports yourself?
Many thanks for the help once more

Kind Regards
Jay
![]() |
Similar Threads
- How add Crystal Report Version 11 in VB6 (Visual Basic 4 / 5 / 6)
- Problem with Crystal Report in ASP.NET (ASP.NET)
- Session maintenance in Crystal Report X1 (ASP)
- Crystal report (VB.NET)
- C++ Builder 6 and Crystal Report (C++)
- Help me with Crystal Report (ASP.NET)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Need help printing from vb
- Next Thread: log analyze
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





