Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Image in ReportListener

Image in ReportListener

Image in ReportListener

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.


loBmp = CREATEOBJECT("GpBitmap")

Is it possible to call image/jpg/png from exe ?

RE: Image in ReportListener

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?


Keep Smileing

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



if ApplicationUnRegistered

User should not modify content of watermarkimage and make it readonly attribute.
Please any other way ?

Thank you.

RE: Image in ReportListener

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 Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Image in ReportListener


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

>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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close