joe_pool_is Posted January 30, 2004 Posted January 30, 2004 My application is not going to be as complex as most. I have a very small database of maybe 64 fields that I will be keeping in the same directory that my program is running in (maybe one directory higher). Current Problem: I store my projects on a USB Flash Drive. This drive pops up as E:\ on some PCs and F:\ on others. Predicted Problem: During installation, the user could install the program in C:\Program Files\Location1 or C:\Program Files\Company Name\Location2, etc. See the problem? When I developed my Crystal Reports application named CRViewer1, the source path to the data file was E:\VB\NewProgram\CrystalReport.rpt. It works great on the machine that has the E:\ drive as my Flash Drive. During runtime, if I try to open the database file CrystalReport.rpt with a call to the CRViewer1 on a machine where my Flash Drive shows up as drive F:\, then a Database Login screen pops up showing a field called Server Name with the default value E:\VB\NewProgram\database.mdb on display. I can manually change the drive letter at this point to the F:\ drive; however, this is an unwanted bug in my system. What parameter could I set to make this Server Name path use a variation of the Application.StartupPath? I'm thinking it would look something like this: CRViewer1.ReportSource = Application.StartupPath.Substring(0, Application.StartupPath.Length - 1))Obviously, this does not work, and something like this would require me to manually set all the fields for the Crystal Reports viewer all over again (since it would overwrite what I had already). Does anyone have any thoughts? Quote Avoid Sears Home Improvement
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.