My apologies afon & Hughs, I made the error of focusing on the possible Excel issues in the formula rather than the Jet Reports issue.
Glad someone with greater experience was able to step in to assist.
6 comments
-
Jet Reports Historic Posts Official comment Hi,
Michael and Heather, did either of you try the solutions you recommended? No solution involving nesting the Jet NL(Picture) formula inside another formula will work because (like replicators such as NL(Rows)), Jet will only expand the NL(Picture) formula if it is the first thing in the cell.
So you can do this if you write a small macro to detect the existence of a file, then wrap the path to your image with an Excel IF function that uses this macro to test whether the specified image file exists and uses and alternate path to a blank image if it does not. I will attach an example workbook with the macro in it. Does this help?
Regards,
Hughes -
Jet Reports Historic Posts Hi all,
there is a formula that loads the picture based on path.
=NL("Picture",,"C:\estdbpicture.bmp","Height=","25","Width=","30")
However my problem is at times when the file path is not found, picture is not loaded and it throws an error message Picture file 'C:\estdbpicture.bmp' could not be found.
Next the cell will display "#value".
How do I actually overcome this problem as such even if the picture not found, it can show a "No picture loaded" rather than #value. -
Jet Reports Historic Posts Hi,
i would try do use a workaround with the Excel-Function "ISERROR" to avoid the "#value"…
like:
=IF(ISERROR(NL("Picture",,"C:\estdbpicture.bmp","Height=","25","Width=","30"));"No Picture loaded";NL("Picture",,"C:\estdbpicture.bmp","Height=","25","Width=","30"))
Please give it a try…and a feedback
regards
Michael -
Jet Reports Historic Posts Hi Micheal,
thanks for your suggestion, however when i used the formula, the picture is not loaded.
I have attached a print screen of the output -
Jet Reports Historic Posts If you are using a later version of Excel (2007 and up) - instead of IF(ISERROR…., you can use the IFERROR formula which is easier for some people because it does not require duplicating the formula you are error checking.
Since you have a ribbon showing in your screenshot, you should be able to use the easier formula. I don't know why it should make a difference to Jet - but perhaps it does because I do know that "ISERROR" is not recommended use for newer Excel versions.
Instead of: =IF(ISERROR(NL("Picture",,"C:\estdbpicture.bmp","Height=","25","Width=","30"));"No Picture loaded";NL("Picture",,"C:\estdbpicture.bmp","Height=","25","Width=","30"))
Try: =IFERROR(NL("Picture",,"C:\estdbpicture.bmp","Height=","25","Width=","30"),"No Picture Loaded")
Also - now that I look at the ISERROR formula I wonder if the problem is the use of semi-colons instead of commas in the IF formula… -
Jet Reports Historic Posts Hi Hughes,
it's works very well.. thanks for the macro provided..