NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alan Cochran on December 12, 2013, 11:39:25 AM
-
Hi Bruce,
I added a button with a "Start" type to show the progress bar when it generates a report. During the report process, it generates a PDF (using PDFTools 4.1) and places it in a "FinalBills" folder under the "web" folder. The name of the PDF for example is "333-F20-15_Hadley.pdf". The problem that I am having is when I press the "View Final Bill" link, it is trying to open "localhost:4025/reports/$$$65444.pdf" and gives me the "404 Page Not Found" error page. Where can I set the hyperlink with the saved PDF name under "FinalBills" folder instead of the generated $$$ pdf name?
Using C9 and NT 7.31
Thanks...
Alan
-
before I explain how to override the name - have you thought through the implications of having a fixed name. For example;
a) all users will be using the same report name - meaning if one is generating or downloading others cannot generate the report.
b) the report won't be deleted after download.
cheers
Bruce
-
PDF name is generated based on a set variable name. So could the hyperlink just reference the Loc:PDFName variable?
-
yes. right click on the report procedure in the app tree, choose "source", and search for p_web. You should see how the name is set, and used, and thus you can tweak it as you wish.
cheers
Bruce
-
Thanks Bruce... will give it a go...
Alan
-
I was able to resolve this by adding
p_web.SetProgress(loc:ProgressName,loc:PDFName) !set to report name variable instead of default variable
in the ThisWindow.Kill embed (Priority 1900) right after
p_web.SetProgress(loc:ProgressName,loc:URL)
which the template sets.
Thanks for pointing me in the right direction Bruce. Now I am able to publish C9 NT web app to production web server.
Alan