• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 184
  • Last Modified:

deployment of visual basic widnows application 2005 dilemma

I have deployed my program successfully in terms the users can save and retrieve the data.  What I am having issues with is opening various pdf's files.  What my program does is it pulls various pdf reports when the users conduct their search and when the user double clicks on a specific report found in a datagrid, it open up on my development machine, but not after deployment.  I have zipped over 50 pdf's into a zip folder which I added to Application folder and set the path to the zip folder where all the reports will be located after installation of the program.  
When I double click on the found report, I generate an error that"the system cannot find the file specified", but the report is there in an zipped file and the path to it is set withi an ACCESS 2007 database.
I am not familiar with how you can read the reports through the interface of the software that are located within a zip folder.
I even tried unzipping the folder that contrains all these pdf's and that generated the same error.
Can someone with knowledge with this issue please help me?
  • 3
  • 2
2 Solutions
If it is working in development and bot in production then you have a path issue.  Trap the error correctly and print the path\file you are trying to open.  It will most likely make sense then.
It looks like a path problem.

in your main declarations, declare
Public myAppPath As String = ""
-then- when you start your application call SetAppPath()
all your references to files and paths, include the myAppPath
dim pdfFileToRead as string=myAppPath & "MypdfDirectory\thisfile.pdf"

    Public Sub SetAppPath()
        myAppPath = Application.StartupPath
        myAppPath = myAppPath.Replace("\Debug", "")
        myAppPath = myAppPath.Replace("\bin", "")
        myAppPath = RemoveBackSlash(myAppPath) & "\"
    End Sub
    Public Function RemoveBackSlash(ByVal mPath As String) As String
        If mPath.EndsWith("\") Then
            Return mPath.Remove(mPath.Length - 1, 1)
            Return mPath
        End If
    End Function
systems_axAuthor Commented:
it was much simpler than that.  all I had to do is add a regular foler to application folder and populate it with reports.
thanks for helping
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

systems_axAuthor Commented:
what do I do if I answered my question myself?
You can request to close the question, with points refunded
simply award the points to one answer or more

My point of view.
When I ask a question I beleive that I take advantage of all the experts knowledge
I award points for an answer I get (cost-nothing {no-money}) and I get valuable answers (experts' time=money)

Have fun coding...
And indeed it was a "path issue" http:#20025719"-or- a "path problem" http:#20026981
I would award all points to Colemss as he/she was the first to point to the problem
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now