NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: olu on March 04, 2015, 12:01:27 AM
-
Hi Everyone is there a way to click on a button that would create a report without preview and download it, all in one button click?
So what I mean is from the browse or form when they click get report button all this process happens and all what the user needs to do will be select where they want to save the generated pdf file.
-
Olu, did you call the report using NetWebPage procedure?
If yes, maybe this can help
In the Header Routine put the following code
! Start of "End of Header Routine"
! [Priority 5000]
p_web.ForceNoCache = 1
p_web.HeaderDetails.ContentDisposition = 'attachment; filename="'&CLIP(p_web.SessionID) & CLOCK() & '.pdf'&'"'
p_web.ReplyContentType = 'application/pdf'
p_web.ReplyContentFixed = true
packet.setvalue('')
p_web.SetHeader200()
The file name can be whatever you want. In my case i use that name to make sure reports doesn't get mix.
[attachment deleted by admin]
-
An example calling the report directly asking for download. Check the MailboxesReport procedure. (Bruce example modified)
Hope it helps. Cheers @ Ura
[attachment deleted by admin]
-
Thank you very much Urayoan that was what i was looking for, you have just made my day.Cheers.
-
Your welcome olu