NetTalk Central

Author Topic: NTWS - How to print report with image  (Read 4698 times)

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
NTWS - How to print report with image
« on: October 25, 2011, 04:42:39 AM »
Hello all,

I know I'm doing something wrong but how do I print a report as PDF with an image?

Currently, the PDF will generate but no image is present.  Same report works perfectly in Win32 app. 

Image file is located in Uploads directory.

I'm using SV's PDF generator.

C8.8658
NetTalk 5.38
Windows 7 Pro
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: NTWS - How to print report with image
« Reply #1 on: October 25, 2011, 07:19:27 AM »
there shouldn't be any difference - so I'm guessing it has to do with the image itself. ie perhaps it's not in the same "relative place" as the Win32 app?

In other words it's not the PDF at fault, but the report itself. Maybe? just a guess...

cheers
Bruce

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: NTWS - How to print report with image
« Reply #2 on: October 25, 2011, 07:47:51 AM »
Hey Bruce,

It an "uploaded" image to the UPLOADS directory in the WEB directory.

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: NTWS - How to print report with image
« Reply #3 on: October 25, 2011, 07:50:01 AM »
what "format" is the image? BMP? Jpg?

Cheers
Bruce

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: NTWS - How to print report with image
« Reply #4 on: October 25, 2011, 08:19:02 AM »
.JPG
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11183
    • View Profile
Re: NTWS - How to print report with image
« Reply #5 on: October 26, 2011, 09:13:56 PM »
Morning Don,

I got the C8 build 8740 today, and the following is in the release notes;

>> PTSS 38539: Report to PDF prints graphic file as a solid black area

so I'm thinking your issue may be around Clarion itself. try the update an let us know.

cheers
Bruce

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: NTWS - How to print report with image
« Reply #6 on: October 27, 2011, 02:16:01 AM »
Hey Bruce,

Which Tracker Software PDF product do I need?  Is it "PDF Tools?"  That's the one that works with NetTalk correct?  I think I'm going to ditch the Clarion PDF generator.

Thanks,

Don
« Last Edit: October 27, 2011, 02:32:06 AM by DonRidley »
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: NTWS - How to print report with image
« Reply #7 on: October 27, 2011, 02:36:16 AM »
No, I need the PDF Tools SDK....WOW...$599.00!   Someday...someday...  :)
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Johan de Klerk

  • Full Member
  • ***
  • Posts: 214
  • Johan de Klerk
    • View Profile
    • Designer Software
Re: NTWS - How to print report with image
« Reply #8 on: October 27, 2011, 03:08:44 AM »
Hi Don,

I know $599.00 is a lot as it was for me when I purchased it.

However with the speed increase, no problems creating PDF's, ease of use and size of the PDF file created PDF Tools SDK was well worth every $.

You can then also use it in your normal Win32 apps.

Just my 2c.

Regards

Johan de Klerk
Clarion 10, NT 11.57

Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
Re: NTWS - How to print report with image
« Reply #9 on: October 27, 2011, 07:56:37 PM »
Of late I've been creating some image-heavy reports in Nettalk, and the use of both PDFTools and Draw Image (+ FreeImage) controls on the reports has been invaluable.

Together they allow for a pretty awesome level of freedom.
Cheers,

Stu Andrews

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: NTWS - How to print report with image
« Reply #10 on: November 02, 2011, 07:21:34 AM »
Could my issue be the path to the image file?

I'm using SETTARGET and within that I have:

?Image1{PROP:Text} = LOC:ImagePath

LOC:ImagePath will equal:   uploads/myimagefile.jpg

There has got to be something simple that I'm doing wrong.  Does anyone have a working example of printing a PDF with an image? (Using SV's PDF generator).

Don 
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: NTWS - How to print report with image
« Reply #11 on: November 02, 2011, 08:16:39 AM »
Hi Don
Since your exe is running from a folder below which is probably your web folder and below that the uploads folder the path to the image should be
LONGPATH() & \web\' & CLIP(LOC:ImagePath)
I'm not sure if you should also change the / to \
Hope this helps.
I have got a working example of this somewhere  I'll try to hunt it up for you but I'm pretty sure the above should work.
 
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: NTWS - How to print report with image
« Reply #12 on: November 02, 2011, 10:59:39 AM »
Hello Terry,

I appreciate whatever help you can give.  This simple little thing is holding me back greatly.

I have tried LONGPATH() and '/' and '\' to no avail. 

Hopefully you can find your example...  ;D

Thanks!

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Stu

  • Hero Member
  • *****
  • Posts: 509
    • View Profile
    • Email
Re: NTWS - How to print report with image
« Reply #13 on: November 02, 2011, 03:04:38 PM »
Don,

If you've got access to p_web, then you have the Uploads path.

p_web.RequestData.WebServer._SitesQueue.Defaults.UploadsPath.

That's the absolute path (not relative for web use).
Cheers,

Stu Andrews

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: NTWS - How to print report with image
« Reply #14 on: November 03, 2011, 01:43:41 AM »
Hi Don
Found it
This code in Windowmanager OpenReport after the Parent call definitely prints my nominated image

SETTARGET(Report)
?Draw{PROP:Text} = 'web\client\client.jpg'
SETTARGET()  ! <-- don't forget this one

Hope this helps
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186