Image in ReportListener Image in ReportListener newtofoxpro (Programmer) (OP) 28 Feb 18 15:27 I am using ReportListener class for watermark. Working fine if Image exist in HDD. What I am trying If image include in EXE. watermark does not print. CODEloBmp = CREATEOBJECT("GpBitmap") loBmp.CreateFromFile(This.watermarkimage)] Is it possible to call image/jpg/png from exe ? RE: Image in ReportListener GriffMG (Programmer) 28 Feb 18 18:17 You could store the bitmap file in a binary field in a free table in your exe and then write it out at run time to the same folder as your exe is in... Is that what you are asking? Regards Griff Keep ing There are 10 kinds of people in the world, those who understand binary and those who don't. I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you. RE: Image in ReportListener newtofoxpro (Programmer) (OP) 1 Mar 18 07:47 Thanks. CODEif ApplicationUnRegistered watermarkimage="30DaysTrial.png" else watermarkimage="YourCompanyLogo.png" endif User should not modify content of watermarkimage and make it readonly attribute. Please any other way ? Thank you. RE: Image in ReportListener Mike Lewis (Programmer) 1 Mar 18 09:29 I think Griff's solution would meet that requirement. If you are worried that users will somehow figure out where you are storing the watermark and attempt to modify it, then store it in the Temp folder (which is usually full of files with meaningless names) and give it a random name that the user won't recognise - and a different name each time you run the report. It's true that a really determined (and knowledgeable) user might still be able to hack the file, but you've got to ask yourself what the risk is of that happening and what the cost will be if it does - then balance that against the cost and effort of safeguarding against it. Mike __________________________________ Mike Lewis (Edinburgh, Scotland) Visual FoxPro articles, tips and downloads RE: Image in ReportListener newtofoxpro (Programmer) (OP) 1 Mar 18 10:05 Thanks. If user working with unpaid version, Invoice prints with trial.png (Watermark). User can veryfy and satisfy contents of invoice, but he may not give to his buyer. I like your idea to generate random name files in temp folder. (Thanks) If listner pick-up file inside from exe, this would be better way. I think so. Thank you RE: Image in ReportListener Olaf Doschke (Programmer) 1 Mar 18 11:09 >If listner pick-up file inside from exe, this would be better way. I think so. Images included in an EXE can appear in image controls on forms and don't need an external image file, even though at design time you set the picture to an image file, that is included in project manager in the others section, included in the exe and doesn't need the image file separate. In a report olebound/picture control you have that same mechanism, if you stay with control source type "image file name". Seems you're switching to "expression or variable name" and use watermarkimage as controlsource. When you do so the report will evaluate but look for external files of that name, obviously (as you didn't get it to work). Well, go for image file name and create two report picture control, then control which picture to print via PrintWhen condition. Bye, Olaf.