Alpha Video Training
Results 1 to 27 of 27

Thread: Cannot display computed “Image File Reference” in report

  1. #1
    Member
    Real Name
    Harrison Schwall
    Join Date
    Mar 2009
    Location
    Omaha, NE
    Posts
    162

    Default Cannot display computed “Image File Reference” in report

    Page displays object Img1 without picture. Checked image name/path and okay.

    Note: My form displays images using same logic but using; Event: OnFetch same Action Script and same formula.

    Any suggestions how to display my images on a report ?

    Thanks
    Harrison

    INFO------------------------------------------
    Alpha Five V9 Build 2095 System AddIns 3264
    Table: tblAtl
    Field Name: Place1
    Field Type: Image File Reference (placeholder for computed field)

    Field Name: Image1 ( image number – “2135”)
    Field Type: Character (15)

    Report : rptAtl
    Section: Detail
    Object Name: Img1 (renamed after dragging table field Place1 onto report)
    Display mode: Best Fit

    Section Events: Detail: OnRecord
    Action Script: Set Image File Name in Linked Image Field
    Object Name: Img1
    Image Filename: ='D:\Reports\EMORY\Estate Atl Pictures\All\ThumbNail200\tn_DSCN' + if(convert_type(Image1,'N')<1000,0+trim(Image1)+".jpg",trim(Image1)+".jpg")

  2. #2
    Member
    Real Name
    Harrison Schwall
    Join Date
    Mar 2009
    Location
    Omaha, NE
    Posts
    162

    Default Re: Cannot display computed “Image File Reference” in report

    attcing bmp to view.

  3. #3
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default Re: Cannot display computed “Image File Reference” in report

    Just a guess. What's the response time for your form onfetch? Do you see a noticeable lag while the image loads?

    The report onrecord event may not be waiting.
    There can be only one.

  4. #4
    Member
    Real Name
    Harrison Schwall
    Join Date
    Mar 2009
    Location
    Omaha, NE
    Posts
    162

    Default Re: Cannot display computed “Image File Reference” in report

    No lag. PC is XP Prof 64bit with 8gb ram

  5. #5
    Member
    Real Name
    Harrison Schwall
    Join Date
    Mar 2009
    Location
    Omaha, NE
    Posts
    162

    Default Re: Cannot display computed “Image File Reference” in report

    New jpg files showing report

  6. #6
    Member
    Real Name
    robert muzik
    Join Date
    Nov 2007
    Posts
    406

    Default Re: Cannot display computed “Image File Reference” in report

    In the help, go to Reports/printing images and see if there's anything there that may help.

  7. #7
    Member
    Real Name
    Harrison Schwall
    Join Date
    Mar 2009
    Location
    Omaha, NE
    Posts
    162

    Default Re: Cannot display computed “Image File Reference” in report

    Already reviewed.

  8. #8
    "Certified" Alphaholic glenschild's Avatar
    Real Name
    Glen Schild
    Join Date
    Apr 2000
    Location
    Frome, Somerset, UK
    Posts
    1,520

    Default Re: Cannot display computed “Image File Reference” in report

    Hi Harrison

    Have you checked the image reference field properties on the report (set to "best fit" and not hidden?)

    Another thing that might be worth trying is setting up another image file reference field and hard coding the image details ie: replace the 'if' statement with the actual image name. If that works on the report then I would assume that the report is not processing the statement correctly.

    Regards

    Glen
    Glen Schild



    My Blog


  9. #9
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,725

    Default Re: Cannot display computed “Image File Reference” in report

    Can I ask... If you're computing the image name in your form, could you then just assign that name to the Image Ref. field and have it saved there?

    Then, it's a snap to report on. Not knowing what your app is up to this may not apply... just a first thought.

  10. #10
    Member
    Real Name
    Harrison Schwall
    Join Date
    Mar 2009
    Location
    Omaha, NE
    Posts
    162

    Default Re: Cannot display computed “Image File Reference” in report

    Display mode: is Best Fit.

    I tried your suggestion for another report with the image reference field and hard coded the action script for one file. sorry to report same result.

  11. #11
    Member
    Real Name
    Harrison Schwall
    Join Date
    Mar 2009
    Location
    Omaha, NE
    Posts
    162

    Default Re: Cannot display computed “Image File Reference” in report

    Yes, the form is computing the image name for the action script "Image File Reference " .

  12. #12
    Member
    Real Name
    Harrison Schwall
    Join Date
    Mar 2009
    Location
    Omaha, NE
    Posts
    162

    Default Re: Cannot display computed “Image File Reference” in report

    I created a new report with the reference field and hard coded one image file in the report event. still no luck in displaying.

  13. #13
    "Certified" Alphaholic glenschild's Avatar
    Real Name
    Glen Schild
    Join Date
    Apr 2000
    Location
    Frome, Somerset, UK
    Posts
    1,520

    Default Re: Cannot display computed “Image File Reference” in report

    Have you tried hard coding actually in the image file reference field in the table?
    Glen Schild



    My Blog


  14. #14
    Member
    Real Name
    Harrison Schwall
    Join Date
    Mar 2009
    Location
    Omaha, NE
    Posts
    162

    Default Re: Cannot display computed “Image File Reference” in report

    Still having problems display image. Yes, the image in the form is computed and displays. I've tried several ways cannot get the image to display. Please let me know how you did it.
    Thanks Harrison

  15. #15
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,204

    Default Re: Cannot display computed “Image File Reference” in report

    Isn't this the same questions as this?

  16. #16
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,204

    Default Re: Cannot display computed “Image File Reference” in report

    Quote Originally Posted by harrison4411 View Post
    Image Filename: ='D:\Reports\EMORY\Estate Atl Pictures\All\ThumbNail200\tn_DSCN' + if(convert_type(Image1,'N')<1000,0+trim(Image1)+".jpg",trim(Image1)+".jpg")
    You say it works in a form, but the quotations in the above expression don't look right besides what is Image Filename? Is this a variable? a field name?Couldn't be either.
    And what is Image Filename:=
    typo?

  17. #17
    "Certified" Alphaholic
    Real Name
    Mike Christensen
    Join Date
    Nov 2005
    Location
    Michigan U.P.
    Posts
    5,937

    Default Re: Cannot display computed “Image File Reference” in report

    Harrison,
    Here's a clue....after 16 posts in this thread and no closer to a solution---think maybe everyone is all "Guessed" out. Give a sample, with instructions as to where your code is, what it is Exactly you want to happen, what is currently happening. When you create your sample and Before attaching it here, open it up yourself as a separate project and see if the same problems occur and moreover, that it actually can be opened by others and has the images, etc. required for experimentation.


    Or not....
    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________




  18. #18
    Member
    Real Name
    Harrison Schwall
    Join Date
    Mar 2009
    Location
    Omaha, NE
    Posts
    162

    Default Re: Cannot display computed “Image File Reference” in report

    I created a small version for your reveiw. I zipped and am attching.

    Use calculated filed with report and form then action scripts to set image file reference to calculated fields.

    Please review and see if you can determine why images don't display on report.

    Same technique display on form; also included in adb.

    Thank you.

  19. #19
    "Certified" Alphaholic glenschild's Avatar
    Real Name
    Glen Schild
    Join Date
    Apr 2000
    Location
    Frome, Somerset, UK
    Posts
    1,520

    Default Re: Cannot display computed “Image File Reference” in report

    If I am following this correctly you have for each record as many as four images that you wish to display on a form and on a report.

    Would not a better solution be to either create four image file reference fields OR if the number of images can vary from item to item then create a child table and use a set for the form and report.

    I have amended your sample with 4 such fields and also the form and report to show this.

    Hope it helps

    Regards

    Glen
    Glen Schild



    My Blog


  20. #20
    Member
    Real Name
    Harrison Schwall
    Join Date
    Mar 2009
    Location
    Omaha, NE
    Posts
    162

    Default Re: Cannot display computed “Image File Reference” in report

    Beautiful. :)
    I am so happy you could get this to display by adding 4 image reference fields to the table and point to those im my form / report.

    Why do you think I could get the form could reuse the same object and work not the report?

    Your thought on child table? Do you mean to create table with filed for image and parent to link them together instead of a calculated filed on the form/report ?

  21. #21
    "Certified" Alphaholic glenschild's Avatar
    Real Name
    Glen Schild
    Join Date
    Apr 2000
    Location
    Frome, Somerset, UK
    Posts
    1,520

    Default Re: Cannot display computed “Image File Reference” in report

    I think that using calculated fields is over complicating the issue. The Image file reference field just works as it is.

    If you place the image reference field into a separate table then you can have as many or as few images for each item as needed.
    Glen Schild



    My Blog


  22. #22
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,725

    Default Re: Cannot display computed “Image File Reference” in report

    There's nothing wrong with your computed image name, or the image ref field. The problem, if we can call it that, is the way A5 handles reports - which I believe is the same as any other system.

    You have 4 images to display for 1 record. The report engine does not process per field, but rather per record. The code for OnRecord gets run once... all at once and therefore your Place1 field (not the object) gets set 4 times... all at once.

    In order to process this the way you want I believe you have two choices. Add more Image Ref. fields - as many as you will want to display per record. In your form, assign each image ref. field. Then, in your report, there's no need to assign anything... the image. ref. field already has the value assinged by the form.

    The 2nd option would be to normalize your image table and have each image as it's own record. This way, the OnRecord event will fire for each image and get set.

    But, since you're setting the Img. Ref. field in the form, there's no need to set it again.

  23. #23
    Member
    Real Name
    Harrison Schwall
    Join Date
    Mar 2009
    Location
    Omaha, NE
    Posts
    162

    Default Re: Cannot display computed “Image File Reference” in report

    All Images don't display. The report is 141 pages. Images start to appear on page 17 and top of 18 then no more.

    INcluding some of the reports images - about 200 for review.

    Any suggestions.
    Last edited by harrison4411; 04-20-2009 at 11:21 AM.

  24. #24
    Member
    Real Name
    Harrison Schwall
    Join Date
    Mar 2009
    Location
    Omaha, NE
    Posts
    162

    Default Re: Cannot display computed “Image File Reference” in report

    how can i run a action script to update the records that aren't displaying ? i think it would be against image file reference field and all records in table ?

    Can you use my sample data so i can see the code ?

  25. #25
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,725

    Default Re: Cannot display computed “Image File Reference” in report

    Harrison,

    I added a button on your form for updating the Image Ref. fields. I hope that's what you wanted. There are some images missing and I'm having trouble with your No Image jpg file - it isn't a valid jpg on my system.

  26. #26
    Member
    Real Name
    Harrison Schwall
    Join Date
    Mar 2009
    Location
    Omaha, NE
    Posts
    162

    Default Re: Cannot display computed “Image File Reference” in report

    Thank you. just what I needed. I found the functions and read up on them. I didn't find this when looking.

    So this was created with xbasic since action script wasn't written for this -- looping. Is this something that could be created with xdialog to keep in my library ?

    Very grateful, Harrison

  27. #27
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,725

    Default Re: Cannot display computed “Image File Reference” in report

    I guess you could save the code as a User Defined Function (UDF) and call it with Xdialog code. I have to wrap my mind around Xdialog - I see how powerful it is, but so much easier for me to create a small form with button on it to run code. I need to start getting into Xdialog more.

Similar Threads

  1. Deleting File from Image File Reference Field value
    By rcourtemanche in forum Application Server Version 9 - Web/Browser Applications
    Replies: 4
    Last Post: 12-01-2016, 05:20 AM
  2. Image File Reference
    By johnm in forum Alpha Five Version 7
    Replies: 1
    Last Post: 09-15-2006, 09:23 AM
  3. image reference--poor photo display quality
    By VA Carlson in forum Alpha Five Version 6
    Replies: 0
    Last Post: 03-29-2005, 07:15 PM
  4. Bitmap, JPEG Image, or Image File Reference?
    By Elke in forum Alpha Five Version 6
    Replies: 4
    Last Post: 02-09-2005, 04:38 AM
  5. Image File Reference
    By Patrick Browne in forum Alpha Five Version 5
    Replies: 10
    Last Post: 02-09-2004, 04:53 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
  •