Results 1 to 3 of 3

Thread: How to view image files without specifyng file's path

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2008
    Posts
    61

    How to view image files without specifyng file's path

    Hello,

    I am trying to use crystal reports to view PNG files listed in ACCESS, without specifying the files’ path, the PNG files are on the same path as the application when the application is installed. Can you please help me with the proper syntax from the ACCESS table or .NET code to view the PNG files without specifying the files’ path. I would like to give the users the flexibility to install the program to the folder of their choice.
    Code:
    Dim myaop6report As New AOP6Annex
    Dim myaop6viewer As New AOP6VIEWER
    Dim crConnectionInfo As ConnectionInfo = New ConnectionInfo
    
    crConnectionInfo.ServerName = (Application.StartupPath & "\AOP6Annexes.mdb")
    setDBLogonForReporta(crConnectionInfo, myaop6report)
    myaop6report.RecordSelectionFormula = "{image.SN} like " & "'*" & 100 & "*'" & ""
    
    With myaop6viewer
    .CrystalViewer22.DisplayGroupTree = True
    .CrystalViewer22.ReportSource = myaop6report
    .Show()
    End With
    Me.Cursor = Cursors.Default
    The Image table currently looks like this

    SN IMAGE
    100 c:\Program Files\AOP6\Image1.png
    100 c:\Program Files\AOP6\Image2.png
    100 c:\Program Files\AOP6\Image3.png
    100 c:\Program Files\AOP6\Image4.png

    Thanks,

    Victor
    Last edited by Hack; Jun 3rd, 2009 at 07:56 AM. Reason: Added Code Tags

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: How to view image files without specifyng file's path

    The program has to know where the files are unless you want to code in a disk wide hard drive search when they want to view them.

    By default, install them in the project folder. You can build in a feature for the user to move them to a folder of their choice later using an interface you will provide. This interface will store the path the users have chosen and feed it to your program if your program can't find the files in the project folder.

    I've been doing that kind of thing for years. Typically I will store the file path in a db table field.

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2008
    Posts
    61

    Re: How to view image files without specifyng file's path

    Sorry, I don't quiet follow your comments. Can it be done without writing the files' path in the database field?. The /image.png doesn't work, but I think there's a way to do it from ACCESS.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width