Ralph Green
asked on
Missing something on the deployment computers. VB6 and Crystal 11.5
I am a newbie with VB6 and Crystal, so I apologize for my simple question.
I am trying to integrate VB6 and Crystal 11.5 and I can do everything I want if I use the Access db. We are now switching to SQL db and I can get the reports to work fine on the Dev machine, but not on the Deployed Computers.
Is there a tool to use to tell me what control or dll is missing?
I am using RDC with ADO and I keep getting a 429 error Axtivex cannot create object.
I've registered all the dlls that I know of.
Dim crxApplication As New CRAXDRT.Application
Public Report As New CRAXDRT.Report
ConnectionString = "Provider=SQLOLEDB.1;DSN=" & SQLServerName & ";" & "Password=" & SQLPassword & ";Persist Security Info=True;User ID=" & SQLUsername & ";Initial Catalog=LimitlessDailyTran sactions;D ata Source=" & SQLServerName
ConnectionString2 = "Provider=Microsoft.Jet.OL EDB.4.0;Da ta Source=" & DB & ";Persist Security Info=False"
Adodc1.ConnectionString = ConnectionString
Adodc2.ConnectionString = ConnectionString2
Adodc1.Refresh 'sql DailyTransactions
Adodc2.Refresh 'xl.mdb
Set Report = crxApplication.OpenReport( DatabaseFo lderLocati on & ReportName)
Report.Database.Tables.Ite m(1).SetDa taSource Adodc1.Recordset, 3
If BolSingleTable = True Then
Else
Report.Database.Tables.Ite m(2).SetDa taSource Adodc2.Recordset, 3
End If
Report.ReportTitle = ReportTitle
'------------------------- ---------- -----
' Dim ConnectionString As String
' Dim Conn1 As New ADODB.Connection
' ConnectionString = "Provider=Microsoft.Jet.OL EDB.4.0;Da ta Source=" & DB & ";Persist Security Info=False"
' Conn1.ConnectionString = ConnectionString
' Adodc1.ConnectionString = ConnectionString
' Adodc1.Refresh
'------------------------- ---------- ---
Me.WindowState = 2
Me.Refresh
CRViewer1.ReportSource = Report
Screen.MousePointer = 0 'Default
CRViewer1.Top = 0
CRViewer1.Left = 0
CRViewer1.Height = Me.Height
CRViewer1.Width = Me.Width
CRViewer1.ViewReport
Me.Refresh
ResetVariables
ResetForm
Exit Sub
I am trying to integrate VB6 and Crystal 11.5 and I can do everything I want if I use the Access db. We are now switching to SQL db and I can get the reports to work fine on the Dev machine, but not on the Deployed Computers.
Is there a tool to use to tell me what control or dll is missing?
I am using RDC with ADO and I keep getting a 429 error Axtivex cannot create object.
I've registered all the dlls that I know of.
Dim crxApplication As New CRAXDRT.Application
Public Report As New CRAXDRT.Report
ConnectionString = "Provider=SQLOLEDB.1;DSN="
ConnectionString2 = "Provider=Microsoft.Jet.OL
Adodc1.ConnectionString = ConnectionString
Adodc2.ConnectionString = ConnectionString2
Adodc1.Refresh 'sql DailyTransactions
Adodc2.Refresh 'xl.mdb
Set Report = crxApplication.OpenReport(
Report.Database.Tables.Ite
If BolSingleTable = True Then
Else
Report.Database.Tables.Ite
End If
Report.ReportTitle = ReportTitle
'-------------------------
' Dim ConnectionString As String
' Dim Conn1 As New ADODB.Connection
' ConnectionString = "Provider=Microsoft.Jet.OL
' Conn1.ConnectionString = ConnectionString
' Adodc1.ConnectionString = ConnectionString
' Adodc1.Refresh
'-------------------------
Me.WindowState = 2
Me.Refresh
CRViewer1.ReportSource = Report
Screen.MousePointer = 0 'Default
CRViewer1.Top = 0
CRViewer1.Left = 0
CRViewer1.Height = Me.Height
CRViewer1.Width = Me.Width
CRViewer1.ViewReport
Me.Refresh
ResetVariables
ResetForm
Exit Sub
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
because i had something similar some years ago ...i think this the missing piece in users machines..just search crystal reports 11.5 runtime
ASKER
OK I'll try that
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OK I have the msm files but no clue how to "install them"
To be clear, all I am trying to do is run a 11.5 report from my VB6 code. I will be connecting to an SQL db.
On the dev machine they work but always either an active X error or a dll error on the deployed machine.
Is there just a list of dll's needed for RDC?
Thank you for your help, again I apologize for having to ask it but I'm just getting started with programming. One other note, I can get everything to work if I use an open access db but the sql is what is killing me.
Ralph
To be clear, all I am trying to do is run a 11.5 report from my VB6 code. I will be connecting to an SQL db.
On the dev machine they work but always either an active X error or a dll error on the deployed machine.
Is there just a list of dll's needed for RDC?
Thank you for your help, again I apologize for having to ask it but I'm just getting started with programming. One other note, I can get everything to work if I use an open access db but the sql is what is killing me.
Ralph
The list of required dlls is lengthy and trying a manual install would be prone to errors.
So you are saying it works fine on the server with Access?
Is the SQL client installed and the ODBC connection defined on the server?
mlmcc
So you are saying it works fine on the server with Access?
Is the SQL client installed and the ODBC connection defined on the server?
mlmcc
ASKER
I can deploy using an access connection. In crystal it is a DAO connection. That deploys fine. Crystal 8.5.
The head programmer is now wanting me to replace my ODBC/DAO connection and connect to an sql db and use Crystal 11.5.
I think I am connecting to the sql db and use CRViewer. At this point I have available VB6 and either Crystal 8.5 or 11.5.
here is the my sample test code I am using with 11.5:
Dim crxApplication As New CRAXDRT.Application
Public Report As New CRAXDRT.Report
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
Set Report = crxApplication.OpenReport( "C:\report 3.rpt")
Report.Database.LogOnServe rEx "p2soledb.dll", "SQLServerName", "DB Name", "user", "PW", "OLE DB(ADO)", "Provider=SQLOLEDB.1;DSN=S QLServerna me;Passwor d=PW;User ID=user;Initial Catalog=DB;Data Source=SQLServername"
CRViewer1.ReportSource = Report
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
SQL server and sql db are on the deployment computer. No network connection at this point.
I'm not sure what sql client is..
the error I get on the deployment computer is
Runtime error 339
Component crviewer.dll or one of its dependencies is not properly registered a file is missing or invalid.
have run regsvr32 crviewer.dll and windows says its registered successfully.
If need be I can use Crystal 8.5...
Again, thank you for your reply..
The head programmer is now wanting me to replace my ODBC/DAO connection and connect to an sql db and use Crystal 11.5.
I think I am connecting to the sql db and use CRViewer. At this point I have available VB6 and either Crystal 8.5 or 11.5.
here is the my sample test code I am using with 11.5:
Dim crxApplication As New CRAXDRT.Application
Public Report As New CRAXDRT.Report
Private Sub Form_Load()
Screen.MousePointer = vbHourglass
Set Report = crxApplication.OpenReport(
Report.Database.LogOnServe
CRViewer1.ReportSource = Report
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
SQL server and sql db are on the deployment computer. No network connection at this point.
I'm not sure what sql client is..
the error I get on the deployment computer is
Runtime error 339
Component crviewer.dll or one of its dependencies is not properly registered a file is missing or invalid.
have run regsvr32 crviewer.dll and windows says its registered successfully.
If need be I can use Crystal 8.5...
Again, thank you for your reply..
Is this on the development machine?
mlmcc
mlmcc
ASKER
Yes this is the code I'm using with vb6 and Cr11.5
ASKER
The error is on the deployed computer
The development computer is time.
The development computer is time.
Did you install the runtimes for CR XI R2?
mlmcc
mlmcc
ASKER
On Thr dev computer I loaded everything
Nothing on the deployed computer specifically.
Nothing on the deployed computer specifically.
Go to: https://blogs.sap.com/2011/06/07/where-did-all-the-crystal-reports-xi-r1-and-r2-fixes-go/
and use the CR XI R2 SP6 MSM for RDC link at the bottom.
mlmcc
and use the CR XI R2 SP6 MSM for RDC link at the bottom.
mlmcc
ASKER
I actually have that file, but no clue how to install(run) an MSM file. this is for the Development computer, correct? I have upgraded it to X1 SP6, or is this run on the deployment computer?
NO, it is installed on the client or server. The development machine just needs Crystal Reports installed as that will install the appropriate dls for use in an application.
I believe it is generally included with the application in the deployment package.
See this from MS
https://docs.microsoft.com/en-us/windows/desktop/msi/merge-modules
mlmcc
I believe it is generally included with the application in the deployment package.
See this from MS
https://docs.microsoft.com/en-us/windows/desktop/msi/merge-modules
mlmcc
ASKER
Thank you,
I have been doing some research and I downloaded the Visual Installer Package 1.1 and was able to create an .exe that installs the msm files.
Now I just have to test it. I hope this gets me farther along down the road...
Ralph
I have been doing some research and I downloaded the Visual Installer Package 1.1 and was able to create an .exe that installs the msm files.
Now I just have to test it. I hope this gets me farther along down the road...
Ralph
ASKER
Ok, I've made a lot of progress with the crviewer runtime exe I made to install the msm file with the dlls. My issue now it that the report is not getting the location variables. It always tries to connect to the server that the report has in it.
This is how I am connecting:
Report.Database.LogOnServe rEx "p2soledb.dll", SQLServerName, "LimitlessDailyTransaction s", SQLUsername, SQLPassword, "OLE DB(ADO)", _
"Provider=SQLOLEDB" _
& ";Password=" & SQLPassword _
& ";Persist Security Info=True" _
& ";User ID=" & SQLUsername _
& ";Initial Catalog=LimitlessDailyTran sactions" _
& ";Data Source=" & SQLServerName
I can only runt the report if I go in and change the reports location to what the clients is and obviously I can't do that.
I can't seem to use Logonserver to work but logonserverEX does work but not passing the location variables to the report.
Thanks for your assistance!
This is how I am connecting:
Report.Database.LogOnServe
"Provider=SQLOLEDB" _
& ";Password=" & SQLPassword _
& ";Persist Security Info=True" _
& ";User ID=" & SQLUsername _
& ";Initial Catalog=LimitlessDailyTran
& ";Data Source=" & SQLServerName
I can only runt the report if I go in and change the reports location to what the clients is and obviously I can't do that.
I can't seem to use Logonserver to work but logonserverEX does work but not passing the location variables to the report.
Thanks for your assistance!
CHanging data source can be problematic. That is one reason I recommend pushing the data to the report from an application dataset.
What location variables are you talking about?
Do you have parameters?
mlmcc
What location variables are you talking about?
Do you have parameters?
mlmcc
ASKER
Yes I have parameters and they are getting passed.
The sqlservername, sqluserid, sqlpassword are the “location” I’m talking about not really a location but a sql dB on server for the report to use
im not against sending a record set and I could create one in vb, but I have no clue what I would need to do on the crystal side.
If I could get an example I could probably run with it.
The sqlservername, sqluserid, sqlpassword are the “location” I’m talking about not really a location but a sql dB on server for the report to use
im not against sending a record set and I could create one in vb, but I have no clue what I would need to do on the crystal side.
If I could get an example I could probably run with it.
Here is an excellent example
https://www.emoreau.com/Entries/Articles/2016/10/Crystal-Reports-for-Net-revisited-10-years-later.aspx
mlmcc
https://www.emoreau.com/Entries/Articles/2016/10/Crystal-Reports-for-Net-revisited-10-years-later.aspx
mlmcc
ASKER
Sorry I was away on a project for a few weeks.
That link is for .net and I am using VB6.
I am obviously not up to writing the code to pass the db location to the report(CRViewer)
Can you recommend someone or get with me on doing some training me (Paid, of course) or even at this point I would consider paying someone to write the code so I can run my crystal reports from VB from a computer that does not have the db on it. I have the code done to get the variables and can pass them. My only issue is passing the database location(data source?) to the report.
VB6
Crystal 11.5
The main db is an access.mdb and the sales db is an sql db. Some reports use one or the other or both.
Thank you for your reply.
That link is for .net and I am using VB6.
I am obviously not up to writing the code to pass the db location to the report(CRViewer)
Can you recommend someone or get with me on doing some training me (Paid, of course) or even at this point I would consider paying someone to write the code so I can run my crystal reports from VB from a computer that does not have the db on it. I have the code done to get the variables and can pass them. My only issue is passing the database location(data source?) to the report.
VB6
Crystal 11.5
The main db is an access.mdb and the sales db is an sql db. Some reports use one or the other or both.
Thank you for your reply.
Is the database always in the same place?
Can you define the report using a common location? (network share)
mlmcc
Can you define the report using a common location? (network share)
mlmcc
ASKER
Thank you for your input.
I have figured out the code needed to pass the db location.
Report.Database.LogOnServe rEx "p2soledb.dll", SQLServerName, "LimitlessDailyTransaction s", SQLUsername, SQLPassword, "OLE DB(ADO)", _
"Provider=SQLOLEDB" _
& ";Password=" & SQLPassword _
& ";Persist Security Info=True" _
& ";User ID=" & SQLUsername _
& ";Initial Catalog=LimitlessDailyTran sactions" _
& ";Data Source=" & SQLServerName
Report.Database.Tables(1). SetLogOnIn fo SQLServerName, "LimitlessDailyTransaction s", SQLUsername, SQLPassword
I guess one creates a connection and the other logs on the SQL db.
Now I am getting the old error crviewer.dll or one of it's components is either missing or invalid. I guess this is going to fight me every step of the way, but I'll figure it out. I thought from an earlier post that since I created an exe that loads the crviewer XI viewer files that this error was taken care of but I guess not.
Again thanks for your help and thoughts for this.
I have figured out the code needed to pass the db location.
Report.Database.LogOnServe
"Provider=SQLOLEDB" _
& ";Password=" & SQLPassword _
& ";Persist Security Info=True" _
& ";User ID=" & SQLUsername _
& ";Initial Catalog=LimitlessDailyTran
& ";Data Source=" & SQLServerName
Report.Database.Tables(1).
I guess one creates a connection and the other logs on the SQL db.
Now I am getting the old error crviewer.dll or one of it's components is either missing or invalid. I guess this is going to fight me every step of the way, but I'll figure it out. I thought from an earlier post that since I created an exe that loads the crviewer XI viewer files that this error was taken care of but I guess not.
Again thanks for your help and thoughts for this.
Is that on the development machine or the client?
mlmcc
mlmcc
ASKER
The client machine
I assume I’m need to load something other that the crviever.dll
I have loaded or I should say created annexe that loads the msm files that was mentioned earlier in the post.
I assume I’m need to load something other that the crviever.dll
I have loaded or I should say created annexe that loads the msm files that was mentioned earlier in the post.
The CRViewer should load with the msi or msm files
Try to do a new install.
Try to do a new install.
ASKER
On the dev machine or on the deployed computer?
I have not specifically installed that, but I do have a list of dll's that I was told to install and I do that on the deployed computer.
Where would I find it?