Alpha Video Training
Results 1 to 25 of 25

Thread: Image Reference File Question (Web Reports)

  1. #1
    "Certified" Alphaholic Rich Hartnett's Avatar
    Real Name
    Richard Hartnett
    Join Date
    Nov 2002
    Location
    Bowie, MD
    Posts
    1,456

    Default Image Reference File Question (Web Reports)

    I have a table that originally had photos stored in an image field within the table. I also had a report that when opened over the web via PDF, the picture would show up in it.

    I recently changed the field in the table to an Image File Reference type, and have the pictures stored in a separate folder. The problem is that now the pictures will show up the report when printed locally or saved locally to a PDF, but when opened over the web in PDF, the images do not show up.

    Just wondering if anyone has had a similar problem.
    Sergeant Richard Hartnett
    Hyattsville City Police Department
    Maryland

  2. #2
    "Certified" Alphaholic NoeticCC's Avatar
    Real Name
    Andrea Gill
    Join Date
    Nov 2007
    Location
    Golcar, West Yorkshire, UK
    Posts
    2,069

    Default Re: Image Reference File Question (Web Reports)

    I believe when you manually select an image for an image reference field it uses the full path, but there is a script Richard posted here:http://msgboard.alphasoftware.com/al...t=update+image

    which lets you use relative paths... give that a go...

  3. #3
    "Certified" Alphaholic Rich Hartnett's Avatar
    Real Name
    Richard Hartnett
    Join Date
    Nov 2002
    Location
    Bowie, MD
    Posts
    1,456

    Default Re: Image Reference File Question (Web Reports)

    Hi Andrea, and thanks for the reference link. I read it over, and it looks like it explains how to link a whole bunch of images to the image reference file field in the database by the activation of a script, and I will probably use that method later on when I have lots of images, but right now I only have a few, and I have already linked them to the main table.


    What I can't figure out is why the images display fine on the report when printed locally, but not when opened on the web.
    Sergeant Richard Hartnett
    Hyattsville City Police Department
    Maryland

  4. #4
    "Certified" Alphaholic peteconway's Avatar
    Real Name
    Peter Conway
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    2,553

    Default Re: Image Reference File Question (Web Reports)

    Did you publish the files? - are they on the server? - and if so are they in the correct folder? - write a small grid to check.

  5. #5
    "Certified" Alphaholic Rich Hartnett's Avatar
    Real Name
    Richard Hartnett
    Join Date
    Nov 2002
    Location
    Bowie, MD
    Posts
    1,456

    Default Re: Image Reference File Question (Web Reports)

    Pete I had NOT published them to the server, although I have now, and still nothing. The pictures are stored in the "images" folder, by the way.

    Since the report is actually a function of the desktop side of A5, I honestly didn't think that it would make a difference if the images had been published or not, although I realize it is necessary if the images are to be viewed over the web in a grid.

    If you have any other suggestions of things I should check, I'm all ears.
    Sergeant Richard Hartnett
    Hyattsville City Police Department
    Maryland

  6. #6
    "Certified" Alphaholic NoeticCC's Avatar
    Real Name
    Andrea Gill
    Join Date
    Nov 2007
    Location
    Golcar, West Yorkshire, UK
    Posts
    2,069

    Default Re: Image Reference File Question (Web Reports)

    Quote Originally Posted by Rich Hartnett View Post
    What I can't figure out is why the images display fine on the report when printed locally, but not when opened on the web.
    Because the image file paths are full paths, local to your dev machine, rather than relative paths.

  7. #7
    Member
    Real Name
    Daniel Kolbach
    Join Date
    Jun 2008
    Location
    New Jersey, USA
    Posts
    64

    Default Re: Image Reference File Question (Web Reports)

    I had similar problem and it was related to the paths from the point of view of the intranet and the internet. Whe i first made the program i had put a path for my pictures such as //server1/docs/pictures/ which is accesible from the intranet. But from the internet the access to the same document is something like http:\\mywebserver\pictures\
    I hope this help.

  8. #8
    "Certified" Alphaholic Rich Hartnett's Avatar
    Real Name
    Richard Hartnett
    Join Date
    Nov 2002
    Location
    Bowie, MD
    Posts
    1,456

    Default Re: Image Reference File Question (Web Reports)

    Okay I have solved the problem, although I still don't understand the "why."

    I had my images store in a folder within my project. The path was /NCPD/RMS/images. When in there, the images would show up in the report if printed from a desktop, but not over the web in PDF format, and when I created a test grid (as suggested by Pete, good idea by the way), the images would not show up in the web grid either. However, Pete's suggestion revealed that the path the grid was looking for, was BHPD/DailyLog/images, which was really odd, because I don't have an "images" folder in that project.

    I put a few images in the "that" folder (BHPD/DailyLog/images), and sure enough, they showed up everyplace. The problem is, I didn't want them in there, I wanted them to stay with the correct project. I kept playing around with it, and finally got it to work by creating the images folder in the /NCPD/project, but not any deeper. So now the images are in /NCPD/images, and they work fine.

    I still don't know why the system kept defaulting to the BHPD project, although it is the first (alphabetically) of many project folders I have on this server, so maybe that has something to do with it.

    Anyway, thanks everyone for the suggestions.
    Sergeant Richard Hartnett
    Hyattsville City Police Department
    Maryland

  9. #9
    "Certified" Alphaholic peteconway's Avatar
    Real Name
    Peter Conway
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    2,553

    Default Re: Image Reference File Question (Web Reports)

    Well done.

    It's the old "never Give Up" process.

  10. #10
    "Certified" Alphaholic peteconway's Avatar
    Real Name
    Peter Conway
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    2,553

    Default Re: Image Reference File Question (Web Reports)

    I kept at this, it was a bug - Jerry has now advised the following.

    Peter

    We had added a fix and it should be in the next release build. You can now have the same image in the grid and detail without any problems. If you use image file reference fields, we also found a problem. If you didn't specify an alias for the image path in the component, the system might not find the linked image if it was in the database folder or a subfolder under the data. The system now will add the alias to the database folder as a default. If you specifed a full path in the image file reference, that will still work.

    Jerry Brightbill

  11. #11
    "Certified" Alphaholic NoeticCC's Avatar
    Real Name
    Andrea Gill
    Join Date
    Nov 2007
    Location
    Golcar, West Yorkshire, UK
    Posts
    2,069

    Default Re: Image Reference File Question (Web Reports)

    Quote Originally Posted by peteconway View Post
    I kept at this, it was a bug - Jerry has now advised the following.

    Peter

    We had added a fix and it should be in the next release build. You can now have the same image in the grid and detail without any problems. If you use image file reference fields, we also found a problem. If you didn't specify an alias for the image path in the component, the system might not find the linked image if it was in the database folder or a subfolder under the data. The system now will add the alias to the database folder as a default. If you specifed a full path in the image file reference, that will still work.

    Jerry Brightbill
    Great news! I had wondered why there were problems with our news pages until I realised it was to do with the same image being used twice in a grid.

  12. #12
    Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,827

    Default Re: Image Reference File Question (Web Reports)

    I don't see that this fixed anything. I still cannot get an image to appear in a PDF report when run on a WAS server. It works at localhost, not on the server. Has anyone made this work?
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  13. #13
    "Certified" Alphaholic peteconway's Avatar
    Real Name
    Peter Conway
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    2,553

    Default Re: Image Reference File Question (Web Reports)

    I'll take a look - also is it just me or has the Print Genie disapeard in the latest patch? (In the dialog builder)

  14. #14
    "Certified" Alphaholic peteconway's Avatar
    Real Name
    Peter Conway
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    2,553

    Default Re: Image Reference File Question (Web Reports)

    Yep it works...

    http://117.74.99.4/wt_ozsaver/web_sample.a5w


    The above is a report that has a field called image from a table. The images in the image reference field are located in the:
    webroot\Project_Name.WebProjects\default.WebProjects\images\banners

    Location

  15. #15
    Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,827

    Default Re: Image Reference File Question (Web Reports)

    I get an error when I run the report, but I believe you. Can you just send me the table/report/dialog involved in this. I can't get it to work and its a vital last step of a near complete project.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  16. #16
    "Certified" Alphaholic peteconway's Avatar
    Real Name
    Peter Conway
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    2,553

    Default Re: Image Reference File Question (Web Reports)

    Give it a go now - I've restarted the WAS.

    Nothing special about th code all from the genie.

    Open your table, right click the image, see where it points to, if it's not in or under the data table folder it won't work.

  17. #17
    "Certified" Alphaholic peteconway's Avatar
    Real Name
    Peter Conway
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    2,553

    Default Re: Image Reference File Question (Web Reports)

    The code:
    Code:
    dim filter as c 
    dim order as c 
    Filter = ".T."
    Order = ""
    Dim filename as c 
    filename = session.session_folder + "tempreport.pdf"
    filename = report.saveas("web_banners@[PathAlias.ADB_Path]\web_banner_text.ddd","pdf",filter,order,filename,.f.)
    if file.exists(filename) 
    	currentform.RedirectTarget = session.session_url + "tempreport.pdf?" +  time("hms3")
    end if

    As for the error the temp.pdf does not clear - need to take a look.

  18. #18
    Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,827

    Default Re: Image Reference File Question (Web Reports)

    I see it, a series of header graphics! By the way, since this is on the ATG Web Template, did I give you the update that lets you put a different header image on each page?
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  19. #19
    "Certified" Alphaholic peteconway's Avatar
    Real Name
    Peter Conway
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    2,553

    Default Re: Image Reference File Question (Web Reports)

    Yep ! Just not got around to it, also I want to keep doing the banner and banner text grid for flex in the app for the moment - lots of potenital, I' send you a WIP on the email, what you will see is everything in alpha grids running as images and menu's - long way to go but it's getting there.

    Peter

  20. #20
    Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,827

    Default Re: Image Reference File Question (Web Reports)

    Well I'm embarassed, but I cannot get it to work. I've copied my image files to my where my data resides, what is referenced with [PathAlias.ADB_Path].

    I went remote to my server, opened the table and corrected the filenames to point to the images that did appear in my data location. I had to correct the filenames because my local system has a different folder structure as my server. But the images now appear in the table, on the server. Then I run the report and get just the field name where the images should appear.

    It works on the local system, it works published to Localhost, it does not work on the server. My version is not current, but it is past the 1923-3234 patch that updated how image reference fields behaved on the web.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  21. #21
    "Certified" Alphaholic peteconway's Avatar
    Real Name
    Peter Conway
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    2,553

    Default Re: Image Reference File Question (Web Reports)

    Send it (table\images\) to me.

  22. #22
    Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,827

    Default Re: Image Reference File Question (Web Reports)

    Here is the project for anyone to try. The two images are in the zip file, but not necessarily in the right folder for publishing.
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  23. #23
    "Certified" Alphaholic peteconway's Avatar
    Real Name
    Peter Conway
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    2,553

    Default Re: Image Reference File Question (Web Reports)

    Well it didn't like having img as the files or report name or fieldname, made some progress, 1am here - got to get some sleep, will look again tomorrow.

  24. #24
    Moderator Steve Wood's Avatar
    Real Name
    Steve Wood
    Join Date
    Nov 2003
    Location
    Bay Area, California
    Posts
    8,827

    Default Re: Image Reference File Question (Web Reports)

    Sleep?
    Steve Wood
    Join the ALPHA DEVELOPERS NETWORK
    There is no Cloud. It's just someone else's computer.
    Web - Mobile - Hosting - Products - Frameworks - Developer Resources
    AlphaToGo | IADN (100% Alpha Anywhere Websites)

  25. #25
    "Certified" Alphaholic peteconway's Avatar
    Real Name
    Peter Conway
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    2,553

    Default Re: Image Reference File Question (Web Reports)

    This is a real Bugga! - I'll put it into my system and try it.

Similar Threads

  1. Image Reference File - A5 Crashing when used on Reports
    By spain246 in forum Alpha Five Version 7
    Replies: 6
    Last Post: 06-28-2007, 03:55 PM
  2. image file reference field question
    By martinwcole in forum Alpha Five Version 7
    Replies: 1
    Last Post: 07-21-2006, 09:45 PM
  3. Bitmap, JPEG Image, or Image File Reference?
    By Elke in forum Alpha Five Version 6
    Replies: 4
    Last Post: 02-09-2005, 03:38 AM
  4. image reference file
    By martinwcole in forum Alpha Five Version 5
    Replies: 6
    Last Post: 02-11-2004, 05:56 PM
  5. Image file reference field problem on reports.
    By PhilD in forum Alpha Five Version 5
    Replies: 6
    Last Post: 12-23-2003, 06:52 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
  •