If I were you I would look at the RUNTIME.HLP file included with Crystal - this tells you which files you need to include based on what you are doing in the report(s).
Then you can write your own CRAXDRT(9).DEP so the setup wizard works fine - for example, my CRAXDRT9.DEP file contains:
=========================
This includes all the files required by Crystal for reports based on SQL Server, with export destinations and formats included as well.
Just one word of warning, if you include a reference to CRVIEWER9.DLL in your CRAXDRT9.DEP file then the setup wizard will fail with an out of stack space error unless you delete (or rename) CRVIEWER9.DEP.
This is because CRVIEWER9 requires CRAXDRT9, which requires CRVIEWER9, which requires CRAXDRT9, which requires CRVIEWER9.... and so on...
'Buzby'
Visual Basic Developer "I'm moving to Theory. Everything works there."
"Then you can write your own CRAXDRT(9).DEP so the setup wizard works fine - for example, my CRAXDRT9.DEP file contains:"
=========================
I dont understand what you mean by creating my own .dep file. See I packaged my application and reports work fine on my PC. But I get an ActiveX error on everyone elses PC. Saying the file couldnt be found. How can I ensure all the files get packaged and which one to select? Do I need to create this .DEP file??? If so where / how / in what /???
Crystal Reports ships with .DEP (dependency) files for CRAXDRT9.DLL and CRVIEWER9.DLL, and it's these files that the Package & Deployment wizard uses to determine which files it needs to include with your setup.
However, the .DEP files provided by Crystal are crap. Crystal Reports are a pain in the ass to deploy because they need so many weird and wonderful files to run on other machines.
Crystal provide you with a help file called RUNTIME.HLP that tells you which files you need to include with your applications to access certain database formats, perform certain functions, export to certain file types etc etc etc. Run it and see it in it's glory!
Armed with this information you can then a) add each required file manually to the P&D wizard every time you create the package or b) edit the .DEP file(s) with the dependency files you will need for every project so they are automatically included by the P&D Wizard.
I opted for option B.
Since all of our apps use SQL Server as the database back end, and we allow the user to export their reports to practically every format, I created the .DEP file you see in the previous post based on the information in the RUNTIME.HLP file.
It took me all morning.
Hope this helps!?
As I said before, if you do this and include CRVIEWER9.DLL in your dependency file for CRAXDRT9.DLL make sure you rename or delete the CRVIEWER9.DEP file. Otherwise the P&D wizard will get upset and pop up an "Error 28 - Out of Stack Space" error. This also took me hours to work out what was going on.
'Buzby'
Visual Basic Developer "I'm moving to Theory. Everything works there."
As for where you find these .DEP file - do a search in Windows for CRAX*.DEP and CRVIEW*.DEP .. and replace each one with your own if you choose to follow my advice.
.DEP files are only text files - you can open and edit them in Notepad.
'Buzby'
Visual Basic Developer "I'm moving to Theory. Everything works there."
Originally posted by Buzby As for where you find these .DEP file - do a search in Windows for CRAX*.DEP and CRVIEW*.DEP .. and replace each one with your own if you choose to follow my advice.
.DEP files are only text files - you can open and edit them in Notepad.
Umm ok? But how do I include this in the packaging of the application....
should I just include all those files you have listed rather than create this dep file?
The Package & Deployment wizard analyzes your VB project and determines it's dependencies - eg MSCOMCTL.OCX (MS Common Controls), TDBGRID.DLL (True Database Grid), and, in the case of Crystal Reports, CRAXDRT.DLL.
It then looks for a .DEP (dependency) file with the same name (in this case CRAXDRT.DEP) and adds any files listed inside the .DEP file to the P&D project.
So, yes, you could add all the files one by one to the P&D wizard but it will be less time consuming to create a .DEP file that has them all in it already - the .DEP file will be picked up automatically by the P&D wizard (providing it's in the same place as the DLL it's referring to) and all the files you have included in the .DEP file will be added to your setup for you.
In other words - say you made your own .DLL that required MSCOMCTL.OCX on the user's machine to run.
You included this .DLL (let's call it MYDLL.DLL) in a VB app and create an .EXE.
Now you create a setup for the .EXE with the P&D wizard. The P&D wizard analyzes the .EXE and decides it needs to include MYDLL.DLL in the setup. So it does.
However, when you get to the user's PC and install the program you will find your app doesn't work because although MYDLL.DLL has been installed, MSCOMCTL.OCX hasn't been.
So, to fix the problem, you could recreate the SETUP and manually include MSCOMCTL.OCX (but you would have to remember to do this EVERY time you package an application using MYDLL.DLL). A far better answer is to create a file called MYDLL.DEP and put it in the same folder as MYDLL.DLL
In MYDLL.DEP you put:
[Version]
Version=1.0.0
[MYDLL.DLL]
Uses1=MSCOMCTL.OCX
Then you re-run the P&D wizard. This time, when it adds MYDLL.DLL to the setup it looks for MYDLL.DEP and discovers that it also needs to include MSCOMCTL.OCX. So it does.
(the Version number in the .DEP file is the version of the .DLL - if these are different you get a message in the P&D wizard about the 'dependency information being out of date')
Go searching for .DEP files - you will find there are loads of them on your machine, for different .DLLs and .OCXs alike.
Once you get the hang of it you can also include information in the .DEP files about where each file should be installed to (eg Windows/System, AppPath etc) - but don't worry about that yet!
Does this make it any easier to understand?
'Buzby'
Visual Basic Developer "I'm moving to Theory. Everything works there."
Although one thing troubles me...
earlier in one of your posts you said the following:
[QUOTE]
Just one word of warning, if you include a reference to CRVIEWER9.DLL in your CRAXDRT9.DEP file then the setup wizard will fail with an out of stack space error unless you delete (or rename) CRVIEWER9.DEP.
[\QUOTE]
And I noticed your dependency file made a reference to CRVIEWER9.dll ... so did you rename this file from CRAXDRT9.dep to something else? Because I noticed crystal already has this file made...is it ok if I edit this file?
And I noticed your dependency file made a reference to CRVIEWER9.dll ... so did you rename this file from CRAXDRT9.dep to something else?
No.. I mean if CRAXDRT9.DEP refers to CRVIEWER9.DLL (in other words, if CRAXDRT9.DLL has CRVIEWER9.DLL as a dependency), then you should rename CRVIEWER9.DEP to something else (or delete it), because CRVIEWER9.DEP contains a dependency of CRAXDRT9.DLL, and this causes a loop when the P&D wizard tries to work out the dependencies.
The installed .DEP files from Crystal don't have this problem because the CRAXDRT9.DEP file DOESN'T contain a reference to CRVIEWER9.DLL. However, I have built my CRAXDRT9.DEP file to include all files that are required by both CRAXDRT9 and CRVIEWER9 so I don't need the CRVIEWER9.DEP file.
'Buzby'
Visual Basic Developer "I'm moving to Theory. Everything works there."
The top half of your file lists all the files required by CRAXDRT9.DLL (as decided by Crystal Decisions, and are not necessarily the correct files for your requirements - that's why the provided the RUNTIME.HLP file) - the bottom half of the file tells each file in the top half where to be installed to on the client machine.. eg Dest=$(CommonFiles)\Crystal Decisions\2.0\bin
I have attached my full CRAXDRT9.DEP file - if you use SQL Server and Crystal Reports 9 Design and Run Time Active-X Control then this should be just fine.
Why not rename your CRAXDRT9.DEP file and put mine in it's place - you could then try the P&D wizard to see if it improves matters!
Oh.. you will also have to rename CRVIEWER9.DEP file to something else as previously mentioned.
Last edited by Buzby; May 30th, 2003 at 11:06 AM.
'Buzby'
Visual Basic Developer "I'm moving to Theory. Everything works there."
I dont know whats wrong here but my p&d wizard doesnt work anymore! I answer all the questions and select the files..and so on..like normal..and click finish..and it quickly just stops and shots out one file..namely a registry entry.
No other files are packaged???? What has happened?
Anytime I modify what crystal sent me in the .dep file than it does not work. I am going to post what they have on theres that was originally sent to me...
; ------------------------------------------------------------------------------
; Dependency file for setup wizards.
[Version]
Version=9.2.0.448
; ------------------------------------------------------------------------------
; Dependencies for CRAXDRT9.dll
Maybe you can look at it and modify? Note I dont have a windows path I have a WINNT path. I dont have that path that you mentioned for your entry for crviewer9.dll. My crviewer9.dll is found in:
C:\Program Files\Common Files\Crystal Decisions\2.0\crystalreportviewers\ActiveXViewer
I tried entering that in also but no luck..the package and deployment wizard just stops!
Im running win2k, CR9, SQL Server, VB6.
Plus help since these reports work good on my PC but dont work on other PC's.