Hot Topic (More than 10 Replies) Adding a picture file to reports (Read 1172 times)
cbislander
Full Member
***
Offline



Posts: 132
Joined: Mar 22nd, 2018
Adding a picture file to reports
Nov 14th, 2025 at 7:32pm
Print Post Print Post  
I have made a statement to send out to some of our customers.  Our invoices have a picture file in the top of the page.  I want to do the same thing for these statements.

The instructions are below:

For a Report, the image file must exist in the Application Image Path. Fill in the Label
text box with the path to the image file, relative to the Image Path. Example:
Label: MyCompanyLogos\logo_12.bmp
Then press the Add Element to Form button. After the Static Picture has been added,
it can be moved or resized.

I've done that but the picture does not load on the page. See attached file.

Application Property Manager

IMAGE PATH: C:\Sesame2\Pics\

Static Picture on Report :

Label: CompanyLogo.jpg

The "picture not loading" icon appears where the picture should be.

I try opening the image in a new tab and I get this message:

Your file couldn’t be accessed
It may have been moved, edited, or deleted.
ERR_FILE_NOT_FOUND

The image location appears as:

file:///C:/Sesame2/SesameReports/SesameReports/STATEMENT_img_CompanyLogo.jpg

The image does load up in my Sesame Reports folder as a separate file.

What am I doing wrong?
« Last Edit: Nov 15th, 2025 at 2:35pm by cbislander »  
Back to top
 
IP Logged
 
Renato Piacenti
Junior Member
**
Offline


No personal text

Posts: 56
Location: Manaus - Amazonas - Brazil
Joined: Jun 20th, 2005
Re: Adding a picture file to reports
Reply #1 - Nov 17th, 2025 at 1:45pm
Print Post Print Post  
hi cbislander,
Place this HTML code in Program Layout in Global Code in the Report Module.

ReportHTMLFilter("SesameReports\", "", 0)
ReportHTMLFilter("<IMG SRC=", "<IMG WIDTH=""200"" HEIGHT=""70"" SRC=", 2)[size=9][/size]
  

Renato Piacenti&&Manaus Amazonas Brazil&&Aqui a Floresta esta sendo preservada.&&Preserve a sua tamb�m.
Back to top
 
IP Logged
 
cbislander
Full Member
***
Offline



Posts: 132
Joined: Mar 22nd, 2018
Re: Adding a picture file to reports
Reply #2 - Nov 18th, 2025 at 2:13am
Print Post Print Post  
Hi Renator,

Before your post, I had used a sample file CompanyLogo.jpg. (Sesame Seasons Outdoor Supply Store) Once, I used your settings it appear on the report header.  The odd thing is that a renamed my original file as CompanyLogo.jpg.  Despite this, I'm still getting the original logo.

I did a search for the logos and rename my logo as the only one that appears as the sample one.  Once I print the report, the sample one overs it. 

This is the Global Code

#include "sbasic_include.sbas"
ReportHTMLFilter("SesameReports\", "", 0)
ReportHTMLFilter("<IMG SRC=", "<IMG WIDTH=""500"" HEIGHT=""200"" SRC=", 2)

It kept giving me errors when I included [size=9][/size]
  
Back to top
 
IP Logged
 
Ray the Reaper
YaBB Administrator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2506
Joined: Aug 20th, 2003
Re: Adding a picture file to reports
Reply #3 - Nov 18th, 2025 at 4:54pm
Print Post Print Post  
cbislander wrote on Nov 18th, 2025 at 2:13am:
Hi Renator,

Before your post, I had used a sample file CompanyLogo.jpg. (Sesame Seasons Outdoor Supply Store) Once, I used your settings it appear on the report header.  The odd thing is that a renamed my original file as CompanyLogo.jpg.  Despite this, I'm still getting the original logo.

I did a search for the logos and rename my logo as the only one that appears as the sample one.  Once I print the report, the sample one overs it. 


In the SesameReports folder on your system delete the file named STATEMENT_img_CompanyLogo.jpg and then try it again.

Quote:
It kept giving me errors when I included [size=9][/size]
That part is not needed. That is a piece of code for the forum, not SBasic code.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
cbislander
Full Member
***
Offline



Posts: 132
Joined: Mar 22nd, 2018
Re: Adding a picture file to reports
Reply #4 - Nov 18th, 2025 at 10:36pm
Print Post Print Post  
Hi Ray,

I just tried it; it didn't work.
Is there any other location the original file could be that causing this?  I search my Pics folder on my workstation and the server.

Application Properties - Image Path: Pics
Image file Label - CompanyLogo.jpg

I've attached the image the report is suppose to print.  It is in my Pics folder (C:\Sesame2\Pics)
  

CompanyLogo.jpg ( 33 KB | 38 Downloads )
CompanyLogo.jpg
Back to top
 
IP Logged
 
Renato Piacenti
Junior Member
**
Offline


No personal text

Posts: 56
Location: Manaus - Amazonas - Brazil
Joined: Jun 20th, 2005
Re: Adding a picture file to reports
Reply #5 - Nov 19th, 2025 at 1:34pm
Print Post Print Post  
Hi Cbislander,
1) In sdesigner "Report", delete the Static Picture element.
2) Create a new Static Picture without the image address. "Without Label".
3) Save!
4) Click on the element without the Label and insert the image address in the Label.
5) Save!

6) Reconcile.
  

Renato Piacenti&&Manaus Amazonas Brazil&&Aqui a Floresta esta sendo preservada.&&Preserve a sua tamb�m.
Back to top
 
IP Logged
 
Ray the Reaper
YaBB Administrator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2506
Joined: Aug 20th, 2003
Re: Adding a picture file to reports
Reply #6 - Nov 19th, 2025 at 2:29pm
Print Post Print Post  
If you are running Client/Server, the image used will be in the image path directory on the Server computer. It is transferred to the client system when the report is run.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
cbislander
Full Member
***
Offline



Posts: 132
Joined: Mar 22nd, 2018
Re: Adding a picture file to reports
Reply #7 - Nov 19th, 2025 at 4:06pm
Print Post Print Post  
Hi Renato,

Tried that it still didn't work.
If I used a different name, nothing comes up.
If I used the same name, the sample image still comes up.

Hi Ray,
The PICS folder on both the workstation drive and the server drive have our header as CompanyLogo.jpg.
It must be coming from some other location.
I deleted it from the SesameReports, but the sample returns each time.
  
Back to top
 
IP Logged
 
Ray the Reaper
YaBB Administrator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2506
Joined: Aug 20th, 2003
Re: Adding a picture file to reports
Reply #8 - Nov 19th, 2025 at 4:41pm
Print Post Print Post  
If you are running Client/Server, I assure you it's coming from the Server. That logo is not embedded in Sesame.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Renato Piacenti
Junior Member
**
Offline


No personal text

Posts: 56
Location: Manaus - Amazonas - Brazil
Joined: Jun 20th, 2005
Re: Adding a picture file to reports
Reply #9 - Nov 19th, 2025 at 5:14pm
Print Post Print Post  
In S Designer, check the image path in the Application Property Manager.
For a local application, the correct path would be C:\Sesame2\Pics.
If the application is client/server, for example, \\172.18.5.15\Sesame2\Pics or \\hostname\Sesame2\Pics
  

Renato Piacenti&&Manaus Amazonas Brazil&&Aqui a Floresta esta sendo preservada.&&Preserve a sua tamb�m.
Back to top
 
IP Logged
 
cbislander
Full Member
***
Offline



Posts: 132
Joined: Mar 22nd, 2018
Re: Adding a picture file to reports
Reply #10 - Nov 19th, 2025 at 6:48pm
Print Post Print Post  
I tried the C:\Sesame2\Pics.
This folder contains CompanyLogo.jpg (my header), but when the report still prints the Sample version of CompanyLogo.jpg .  I tried changing it to my original file name INVOICE-HEADER2.png, but nothing comes up.
Nothing worked using the Server address despite having the same folder.

The only thing I can figure is the report is actually looking for the images in a different folder.  I just don't know where.
  
Back to top
 
IP Logged
 
Renato Piacenti
Junior Member
**
Offline


No personal text

Posts: 56
Location: Manaus - Amazonas - Brazil
Joined: Jun 20th, 2005
Re: Adding a picture file to reports
Reply #11 - Nov 19th, 2025 at 7:24pm
Print Post Print Post  
Well, the only solution left on my menu is to press F5 on the browser to clear the cache!
Sorry I can't be of more help!
  

Renato Piacenti&&Manaus Amazonas Brazil&&Aqui a Floresta esta sendo preservada.&&Preserve a sua tamb�m.
Back to top
 
IP Logged
 
cbislander
Full Member
***
Offline



Posts: 132
Joined: Mar 22nd, 2018
Re: Adding a picture file to reports
Reply #12 - Nov 19th, 2025 at 7:39pm
Print Post Print Post  
Hi Renato,

I tried that but it didn't work.

If I resolve the issue, I'll let you know.

  
Back to top
 
IP Logged