NetTalk Central

Author Topic: Download or email a (PDF)-report  (Read 3927 times)

rainerwallenius

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • Email
Download or email a (PDF)-report
« on: June 03, 2015, 01:05:55 AM »
Hi everybody,

I would like to have some guidelines on how to make reports so that the end user could decide if he wants to have them emailed or on screen.
I currently send one report to email and on screen. The problem is thet I currently have to use two different procedures to accomplish this.
I suspect there is a way to have only one report with the ability dynamically behave in both ways.
I have some 50 reports and I would like to maintain only one copy of the report procedure. It would be great to be able to dynamically let the end user decide if he wants to for example mail the report or use ftp for some archiving system and so on.

Anybody done this, any ideas are appreciated.
:: rainer

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Download or email a (PDF)-report
« Reply #1 on: June 03, 2015, 03:05:32 AM »
Hi Rainer,

Once you create a PDF of the report and you know where that is on disk you can easily code in the other options from a memory form.

so if the user wants email, call the report from the memory form and when complete email it. Same for FTP, downloading etc.

rainerwallenius

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • Email
Re: Download or email a (PDF)-report
« Reply #2 on: June 03, 2015, 03:33:20 AM »
Hi Kevin,

Thanks Kevin,
But how do I make a report understand that sometimes I want to behave well with NetTalk report-extension and now I dont.
As of today, I have one report that is acutally two separate reports, one with NT extension, one without.

But I don't want to copy ALL my reports just for this functionality. I hope there is a way to embed a little here and tweak a little there...

:: rainer


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Download or email a (PDF)-report
« Reply #3 on: June 03, 2015, 10:51:10 PM »
Hi Rainer,

You might be best off posting an example of a small app with 2 reports, set up in the way you describe. Then folk can suggest ways to "make them one".

Personally I only need 1 report procedure. I do it like this;

a) the p_web parameter to the report is set as "optional". (so if passed this is a web report, if not passed it is a "desktop" report)

b) in the code p_web is tested before doing anything "web". The templates already do this. So if the parameter is not passed then it doesn't do the web stuff.

But the exact setup that is right for you might be slightly different to this. Since you have the system already working, albeit with 2 reports, the best way to be specific about your case is to see an example of the setup.

I agree that keeping 2 copies of the report procedure is a really bad idea, and you certainly will not need to do that. So it's worth making the example to get this right.

cheers
Bruce


rainerwallenius

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • Email
Re: Download or email a (PDF)-report
« Reply #4 on: June 05, 2015, 02:20:42 AM »
Thanks Bruce

That was easy. Soon all my reports will have an "send as email" -button.And a "save in PDF-archive" too.Great job Bruce to make p_web omittable!

:: rainer