Alpha Video Training
Results 1 to 9 of 9

Thread: Image path problem with network

  1. #1
    Moderator
    Real Name
    James A. Talbott, Jr.
    Join Date
    Apr 2000
    Location
    Versailles, KY
    Posts
    1,432

    Default Image path problem with network

    Hi,

    I have an application on a server. The app works fine, along with the shadowed apps on workstations.

    The problem is that I want to add photos to the app. I can make the script work on my application which is running directly off of the server, but does not work on the network optimized workstations.

    Here is the script:

    vc_photo=t.file_name
    if vc_photo=""
    vc_photo="no_photo.jpg"
    end if
    this:bitmap1.bitmap.filename=vc_photo

    The script is on the OnInit event of the form. no_photo.jpg is a jpg which says "No photos available for this item".
    t.file_name is a field in the table which holds the name of the jpg.

    I set this up to accommodate records with multiple pictures. On a browse, I have an OnChangeRecord event which re-freshes the bitmap with a photo corresonding to the line in the browse.

    All works fine on my computer, but not on the workstations.

    I tried changing to the following:

    vc_path=chr(92)+"\tottser_repub\database\CC"+chr(92)
    vc_photo=alltrim(vc_path+t.file_name)
    if vc_photo=""
    vc_photo="no_photo.jpg"
    end if
    this:bitmap1.bitmap.filename=vc_photo

    (Our server name is tottser_repub and the shared folder is database, with the subfolder named CC)
    The above script resulted in the following on my computer:
    I get a message stating
    bad parameter passed to form
    and
    Cannot read bitmap file "\\tottser_repub\database\CC\e05-035.JPG"

    appears on the form.

    Any thoughts?

    Thanks.
    Jay Talbott




  2. #2
    Member Glen Payton's Avatar
    Real Name
    Glen Payton
    Join Date
    Dec 2003
    Location
    Columbus, Ohio
    Posts
    21

    Default RE: Image path problem with network

    Here is a quote from Jerry Brightbill

    "One of the problems using linked bitmaps is that the bitmap (jpg or bmp) has to be in the same relative folder on every machine. If you have it in the database folder on the server, then you will need a copy on every terminal in the shadow folder. Sometimes a good solution is to embed the bitmap. That works for forms, but not reports. You can also attach it to the database. Then it exists as a global bitmap and when a shadow is refreshed, the local shadow databse will have a local copy."

    This was his reply to me when I had a similar problem.

    FYI
    searching the board is recommended as a first choice

    Glen

  3. #3
    Moderator
    Real Name
    James A. Talbott, Jr.
    Join Date
    Apr 2000
    Location
    Versailles, KY
    Posts
    1,432

    Default RE: Image path problem with network

    Glen,
    Thanks for your suggestion.

    Yes, I did search the board, and looked in the CHM help file. Obviously, an ounce of Glen is worth a pound of search "grin".

    Thanks again.

    Jay

  4. #4
    "Certified" Alphaholic Tom Henkel's Avatar
    Real Name
    Tom Henkel
    Join Date
    May 2002
    Location
    New Jersey, USA
    Posts
    1,858

    Default RE: Image path problem with network

    James,

    We have an image folder on our server that contains images of our customers for identification purposes. We store them as bitmap files , but jpg's should also work. This is the code we use in the "on_fetch" event of the form when we display it.

    pict1=image-"image
    oldfile = "O:\IMAGES"+chr(92)+trim(pict1)+".bmp"
    if .not. file.exists(oldfile)
    oldfile = "O:\IMAGES"+chr(92)+"not_avail.bmp"

    end if

    topparent:Bitmap1.bitmap.filename = oldfile

    It works for us. If, for some reason, there is no image, we display a " Photo not available" bitmap.

    Hope it helps.

    Tom

  5. #5
    "Certified" Alphaholic
    Real Name
    John Koh
    Join Date
    Jan 2004
    Location
    Maryland, USA
    Posts
    1,062

    Default Re: Image path problem with network

    Tom,

    I am trying to get the "image (Electric - signature on)" for report. I stored the Image at shared storage and shared folder.

    Image's Storage path, Z:\shared Data\Images\Jk_Signature.jpg

    I have this code at OnPrinInit Event.
    Code:
    'vgEmpId is a Global variable and called it from form's button and carry over to report
    
    'find the path from EmpSign Table
    dim tSign as p
    tSign = table.open("Emp_sign",FILE_RO_EXCLUSIVE)
    query.filter ="Emp_id="+quote(vgEmpId)
    query.order =""
    qSign = tSign.query_create("n",query.filter)
    rSign = qSign.records_get()
    If rSign >0 then
    	vgImgPath = alltrim(tSign.Sign_path)    
    	msgbox("test Image path",vgImgPath)  '<==Test, I can see the path 
    	Bitmap1.bitmap.filename = vgImgPath
    else
    	Bitmap1.bitmap.filename = ""	
    end if
    qSign.drop()
    tSign.close()
    I can see the test path, but the report did not merge a Bitmap, has an error note here...

    Did I missing something on this code? How Do I get the signature on the report?

  6. #6
    "Certified" Alphaholic DaveM's Avatar
    Real Name
    Dave Mason
    Join Date
    Jul 2000
    Location
    Hudson, FL
    Posts
    5,986

    Default Re: Image path problem with network

    Hi John,

    I can see the test path, but the report did not merge a Bitmap, has an error note here...
    What was the error?
    Dave Mason
    dave@aldaweb.com

    Skype is dave.mason46

  7. #7
    "Certified" Alphaholic
    Real Name
    John Koh
    Join Date
    Jan 2004
    Location
    Maryland, USA
    Posts
    1,062

    Default Re: Image path problem with network

    Hi David,


    The Bitmap1 field is blank with report Preview mode and a note is " No Bitmap Specified " with Design Mode.

  8. #8
    "Certified" Alphaholic Tom Henkel's Avatar
    Real Name
    Tom Henkel
    Join Date
    May 2002
    Location
    New Jersey, USA
    Posts
    1,858

    Default Re: Image path problem with network

    We print ID cards for Employees. We capture the photo and signature using a camera and a topaz signature pad.

    This is the code we use in the onprintinit event of the card:

    Code:
    dim global badgeno as N
    dim filename1 as C
    filename1 = "G:\bcbss\PHOTO"+CHR(92)+alltrim(str(BADGENO))+".JPG"
    sigfile = "S:"+CHR(92)+alltrim(str(BADGENO))+"s.JPG"
    IF FILE.EXISTS(filename1)
    	bitmap6.bitmap.filename = filename1
      ELSE
      	bitmap6.bitmap.filename = "G:\bcbss\photo\not_avail.jpg"
    END IF
    IF FILE.EXISTS(sigfile)
    	bitmap1.bitmap.filename = sigfile
      ELSE
      	bitmap1.bitmap.filename = "G:\bcbss\PHOTO\blanksig.jpg"
    END IF
    Hope it Helps,

    Tom

  9. #9
    "Certified" Alphaholic DaveM's Avatar
    Real Name
    Dave Mason
    Join Date
    Jul 2000
    Location
    Hudson, FL
    Posts
    5,986

    Default Re: Image path problem with network

    Since a number (4) images are needed for certain reports, I have an extra table to imbed them in for each of the forms and reports. I built an automated up loader for the specifically named .png files.
    It is also possible to manually look them up.
    there is a specific folder under the shadow folder to hold the images. It also has a shortcut on the desktop to that folder for quick viewing and editing.
    after they are downloaded, the new images are all copied to the server in a similar folder .
    After a period of time the images are flushed from the image table due to the large size of the fpt files.
    These Images are autoprinted with the reports
    I can give better information if needed. I am not sure if all this is compatible with version 5 since it has been so many years since I even had v5 loaded.
    Dave Mason
    dave@aldaweb.com

    Skype is dave.mason46

Similar Threads

  1. Table background image path
    By randygreen in forum Web Application Server v6
    Replies: 0
    Last Post: 04-17-2005, 03:27 PM
  2. bitmap image problem on network
    By Glen Payton in forum Alpha Five Version 5
    Replies: 4
    Last Post: 08-12-2004, 05:42 AM
  3. Autoexec vs. No Network Path
    By Peter.Greulich in forum Alpha Five Version 5
    Replies: 6
    Last Post: 12-07-2003, 11:42 AM
  4. Network Optimize default path
    By tlyon in forum Alpha Five Version 4
    Replies: 14
    Last Post: 01-13-2002, 07:17 AM
  5. naming the path on network?
    By tcampb in forum Alpha Four Version 6 and Prior
    Replies: 2
    Last Post: 07-22-2001, 11:13 AM

Bookmarks

Posting Permissions

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