Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Required DLL's ----- How to find

Status
Not open for further replies.

Corinne

Programmer
May 15, 2001
146
US
I'm developing a VB6 program that will print crystal report documents using Crystal 8 not through the Crystal Report Control 4.6 that's included with VB. This program will be distributed to machines that do not have VB or Crystal reports installed on them. I'm having a difficult time trying to find the list of DLLs needed for the reports to be processed and printed. I'm also having a problem understanding how to get this on all the users machines........I have a bad feeling that you're going to tell me that these DLL's (once I can get a list of all the ones I need) have to be installed on EVERY machine. The program does work on machines that have Crystal Reports installed, so i'm assuming that DLLs are to blame. Does anyone have any suggestions on where to find the necessary DLL files? Thanks for any help or insight anyone can give me.
 
You need to build a Windows setup kit. You can use the VB Package and Deployment Wizard, or a 3rd party tool such as Wise or InstallShield. This is the standard way to distribute any custom VB application to users' desktops. The kit should include all of the DLLs necessary.

During the "Add other files" window of the wizard (at least the VB PDW), you can add the .RPT files (if you created these for your project...they will not automatically be scooped up by the kit builder). Brian J. Alves
Email: brian.alves@worldnet.att.net
VB / Crystal / SQLServer
 
Brian, Thanks for responding to my question. I understand what you're saying about using the Deployment Wizard to build a setup kit. I did that, thought I had all the required DLL's added to it. When I install that setup on my test client machine I get an error stating that the server has not yet been opened. I found a reference to that error message somewhere else on this site and the suggestion was that all the required DLL's were not in place. Any other insight for me?

Thanks,
Corinne
 
Usually it means that you're not connecting to the database correctly via either the .LogonServer or .SetLoginInfo method before viewing the report. Brian J. Alves
Email: brian.alves@worldnet.att.net
VB / Crystal / SQLServer
 
Can you tell me how to properly use either .LogonServer or .SetLoginInfo methods? Whee do the go in my code? What are the differences between the two, advantages, disadvantages? Any help at this point would be great.

Thanks,
Corinne
 
There's a somewhat vague Crystal article:


I have used .LogonServer in the past. You pass it 5 parameters: the DLL, servername, db name, username, password. If you pass an ODBC dsn as the servername, you can skip the db name parameter.

If your Crystal RDC report object is called Report:

Report.Database.LogOnServer "p2sodbc.dll", "server name", "db name", "username here", "password here"

If you use .SetLoginInfo, you need to login to the first table in the report. If all of the tables come from the same database, then you're done...you don't need to login to every table:

Report.Database.Tables(1).SetLogOnInfo "server name", "db name", "username", "password"

Brian J. Alves
Email: brian.alves@worldnet.att.net
VB / Crystal / SQLServer
 
Is it necessary to pass the .SetLoginInfo or .SetServerInfo if the data source is an ADO recordset? I am using an ADO connection object which already contains my servername and databasename, etc. It seems redundant to have to set it explicitly for CR. I am trying to pass the live recordset to my viewer, but am getting the Server Not Yet Open message
 
No. Open the recordset, then pass it to the report.

Assuming that your report object is called Report:

Set adoRs = New ADODB.Recordset
With adoRs
.ActiveConnection = adoConn
.CursorLocation = adUseServer
.CursorType = adOpenForwardOnly
.Open "Your SQL statement goes here"
End With

Report.Database.SetDataSource adoRs, 3
 
Thanks for the quick reply.
My code looks just like your example.

My next line is:
CRViewer1.ReportSource = crReport
CRViewer1.ViewReport

When I show the CRViewer, however, the report is empty of data. I have tested the recordset and it does have live data...Am I missing something?
 
It is not required that you use an installer program to distribute a report. If you would like to distribute the report without any setup program, create a network directory that you want to be your target for the dll's. Then use the Crystal Reports' report distribution expert to extract all of the dll's you need. Place all of the exported dll's into the directory you created. After that set the crystal component CRPE Path property to the directory you created on the network that contains the dll's. Later, after you have made the exe and placed in the network directory pull shortcuts to the desktops of the clients. I do this all the time with Delphi which uses the same component so there may be a few things you need to modify but other than that this is the absolute best way.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top