NetTalk Central

Author Topic: Report Progress Bar with Hyperlink  (Read 4397 times)

Alan Cochran

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Report Progress Bar with Hyperlink
« 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Report Progress Bar with Hyperlink
« Reply #1 on: December 12, 2013, 10:01:12 PM »
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

Alan Cochran

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: Report Progress Bar with Hyperlink
« Reply #2 on: December 13, 2013, 05:00:18 AM »
PDF name is generated based on a set variable name. So could the hyperlink just reference the Loc:PDFName variable?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Report Progress Bar with Hyperlink
« Reply #3 on: December 13, 2013, 08:18:51 AM »
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

Alan Cochran

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: Report Progress Bar with Hyperlink
« Reply #4 on: December 13, 2013, 09:03:38 AM »
Thanks Bruce... will give it a go...

Alan

Alan Cochran

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: Report Progress Bar with Hyperlink
« Reply #5 on: December 13, 2013, 10:24:51 AM »
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