Simplicty and flexibility!


Image Filed


Started by Handles
Search
You will need to Sign In to be able to add or comment on the forum!

Image Filed

I have asked the question before but thought I would try once more as I keep going back to the same solutions that will not work.

My question is to try and open a specific picture¬ís held in a folder on the C drive of my computer, I have a field that holds the data referencing the name of the picture/Pictures like 6007.tif being one of the picture names.

Under the above filed is a ImageField with the Derivation -

if ( image = blank ,"NIS.tif", concat( FileType ,".tif"))

Unfortunately the image filed is never blank just getting a number that does not exist, so get error message "Could Not Find File 1234.tif Please specify image path" .  

What I need to do is if picture 1234.tif is not on the computer, it brings up an Image like, NO IMAGE STORD .tif

If image 6007.tif is stored in a folder on the C drive the picture will display.

Any Help Please … If not any place I may be able to get help.


Written by Handles 29/10/23 at 21:59:30 LegEasy 6 Windows

Re:Image Filed

I have tried to add a test program if it helps :


Written by Handles 30/10/23 at 21:53:49 LegEasy 6 Windows

Re:Re:Image Filed

Did not attach on first attempt . 


Written by Handles 30/10/23 at 21:59:57 LegEasy 6 Windows

Re:Re:Re:Image Filed

Download Sample


In DE6 you need to use the CDF FileExist to check if the image exist before you open it, if it doesn't you open your default image.

You also need to use full path i.e. "C:\depics\Image.tiff" rather than just image name and rely on imagepath in Preferences as filexists won't relate to imagepath. Using imagepath in Preferences is a very "Old fashoned" and unrelaiable way as you have to updated it manually rather than doing via the app.

You are punishing yourself by trying to move forward in a what can only be said is a dark ages version of DataEase so limitted in function and functionality.

Attached is your sample converted to LE9 where we use the inhouse functions in DEOS() (DataEase Operating System).

https://books.dataease.com/viewdocument/?BookPrefi...

You can download a trial version of LE9 here 

Download LE9 Build#:6490


Written by DataEase 31/10/23 at 11:17:44 LegEasy 6 Windows

Re:Re:Re:Re:Image Filed

Thank you very much for sorting this, I would really like to upgrade to LE9, unfortunately the LE6 version we use as you know is very old, I have just tried to convert it to LE9 - and the amount of CDF errors I get along with some of the tricks  that  we have been doing, I don't think would work. To get things working correctly I think would take us so long to sort out.

Could I just ask how should this code be written in DE6 if it is even possible   

  if (DEOS("@FileExists",concat(".\DePics\",ConcatMaterialCode))="yes", concat(".\DePics\",ConcatMaterialCode),".\DePics\NoImage.tif"))

I have tried, but the dataease expert we used in the passed has now retired and no longer undertakes programing work, I have been teaching myself for the last few years but admit I do struggle with the more complicated parts, that cant be copied from his old programs. 

I will keep trying with the conversion, allowing us to upgrade but its going to take along time, Do you offer the conversation service if so how do we get a costing for that.

   

       


Written by Handles 31/10/23 at 21:17:34 LegEasy 6 Windows

Re:Re:Re:Re:Re:Image Filed

The CDF's should work the same in LE9 as in LE6 but you might have to copy the libraries used from where they are installed in your DE6 installation.

The best way to migrate is go via DE8 and then move to LE9 from there as the testing is always against the previous version so do everything in one big jump might cause extra problems.

If you need assistance we can help you in moving the app and checking what the problems are. We only charge for the time consumed and we can put a limit etc. on the spending.


Written by DataEase 01/11/23 at 08:29:17 LegEasy 6 Windows

Re:Re:Re:Re:Re:Re:Image Filed

Download: RecordSaveNew.png

Thanks' for the information - I am getting to grips with LE9 now, starting to get things working before taking the next step in purchasing if all goes as well as its looking so far, are you able to help with this situation

define "act1" text .

Act1 := RecordSaveNew () . 

I have this is quite a lot of places in LE6 that works great in the OML but in LE9 for some reason it will not save the record correctly  , if its on record 0001 and its saved the next time you go into the form its jumped to 0006 and not 0002 as it should ?   I'm using it to basically save 0001 as soon as you enter the form Under ValueChanged  option ? 

If its easier I can forward a small demo ?


Written by Handles 02/11/23 at 20:10:03 LegEasy 6 Windows

Re:Re:Re:Re:Re:Re:Re:Image Filed

if (DEOS("@FileExists",concat(".\DePics\",JoinCode )) ="yes", concat(".\DePics\",JoinCode ),".\DePics\NoImage.tif")) NOT WORKING

if (DEOS("C:\FileExists",concat(".\DePics\",JoinCode )) ="yes", concat(".\DePics\",JoinCode ),".\DePics\NoImage.tif")) NOT WORKNING

if (DEOS("C:\DePics , FileExists",concat(".\DePics\",JoinCode )) ="yes", concat(".\DePics\",JoinCode ),".\DePics\NoImage.tif")) NOT WORKING

if (DEOS("@FileExists",concat("C:\DePics\",ConcatMaterialCode))="yes", concat("C:\DePics\",ConcatMaterialCode),"C:\DePics\NoImage.tif")) NOT WORKING

Just don't understands that something that works so well in LE9, and I know should be very easy to reproduce in LE6, is so hard to figure out.

Does Dataease offer a pay as you go service for problems like this,  will be upgrading to LE9 but need to get this resolved in LE6 before I can start allowing time for upgrading.  


Written by Handles 03/11/23 at 12:10:05 LegEasy 6 Windows

Re:Re:Re:Re:Re:Re:Re:Image Filed

Putting RecordSaveAsNew() on a ValueLoaded event is not a good idea. 

THe problem here is most likely that the event is called more than once and I'm pretty sure it will be called when you save a NewRecord so this is something that need to be avoided.


Written by DataEase 03/11/23 at 15:01:40 LegEasy 6 Windows

Re:Re:Re:Re:Re:Re:Re:Re:Image Filed

You can't use DEOS in LE6 as it doesn't have the function.

Almost everything in DE6 had to be resolved with CDF's when in DE9 you don't have to resort to use CDFs for almost anything.

The function library in DE9 is 10 times bigger than in DE6.


Written by DataEase 03/11/23 at 15:03:26 LegEasy 6 Windows

Re:Re:Re:Re:Re:Re:Re:Re:Image Filed

Yes, we do offer a PayAsYou go service. You can find the prices and services in the SHOP under Services.

All the best.


Written by DataEase 03/11/23 at 15:09:30 LegEasy 6 Windows

Re:Re:Re:Re:Re:Re:Re:Re:Re:Image Filed

Perfect - your demo Written by DataEase 31/10/23 at 11:17:44 was for LE9 that's how I want it to work but in LE6

if (DEOS("@FileExists",concat(".\DePics\",JoinCode )) ="yes", concat(".\DePics\",JoinCode ),".\DePics\NoImage.tif"))

would the above code to be written to work in DE6 be covered by your "Quick Support Incident" or "Support Incident" I don't know what one to add to cart ?


Written by Handles 03/11/23 at 15:21:17 LegEasy 6 Windows

Re:Re:Re:Re:Re:Re:Re:Re:Re:Re:Image Filed

Sen d us the application and what it is you want fixed and we will give you a quote on the time.

It can't  be done exactly the same as the functions aren't available in DE6 but we can achieve the same result with other functions.


Written by DataEase 03/11/23 at 16:26:55 LegEasy 6 Windows

Re:Re:Re:Re:Re:Re:Re:Re:Re:Re:Re:Image Filed

This was the file I sent before, and your chap got it done but in  LE9 , as discussed I just need the same but in LE6, the program I want it working in is very large and been added to over decades , but if you can get it working in the attached I can copy and past it over. Thanks Again.    


Written by Handles 03/11/23 at 16:38:46 LegEasy 6 Windows

Re:Image Filed

OK! We will have a look and get back to you.
All the best.


Written by DataEase 06/11/23 at 11:12:32 LegEasy 6 Windows

Re:Re:Image Filed

Hi again.

We have had a quick look at it and if the job is simply to make the sample work in LE6 this will be covered by support Incident.


Written by DataEase 06/11/23 at 11:44:33 LegEasy 6 Windows

Re:Re:Re:Image Filed

Thanks Again , I have paid it on line : 


Written by Handles 06/11/23 at 12:36:04 LegEasy 6 Windows

Re:Re:Re:Re:Image Filed

Download: ImageTestProgram.zip

Dear Raymond.

Your problem was a little harder to resolve in LE6 than anticipated as the CDF?s that was supposed to do the deal ?misfired? i.e. they worked the first time but after that they would return the previous value … most likely a bug but a little late to fix in a library that was developed 30 years ago…

However we managed to work around it by not checking if the file exist but if its bigger than 0…

It works fine and the good news is that it is a CDF that is shipped with LE6.

I think you will find that working in LE9 is much more appreciative than working in LE6…I?ve almost pulled my hair out (if I had any).