NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Richard I on January 10, 2018, 10:46:03 PM
-
Hi There,
Creating a PDF report inside a web browser app
I can see the PDF progress window run through but instead of displaying the PDF report, I get instead, "Page Cannot be Found"
However, No error 404 as in other postings.
-this message is inside the area where I would expect to see the report.
Despite comparing with a PDF report that does work... I cannot see where the problem is unless it is because it is on a login form.
Thanks
Cheers
Richard
NT 8.71
-
Hello Richard,
Just out of curiosity, if you open the "reports" directory while the PDF is generated, do you see the actual PDF file being made?
Might look like @@@something.pdf.
Don
-
Hello Don,
Thanks for replying...
I can run all reports in the NT Web server example 13 and get the PDF to display on the Page/ form/window, I have C10 PE with the SV pdf generate template- The reports displayfrom the the example and are just like I want in my app.
I can also run this from my server on a remote pc that is not on my LAN and get the PDF to display.
Despite dutifully copying every setting from the Web 13 example into my NT app Im still "getting the Page Cannot be found"
The only difference I can see is that Im trying to open the PDF on a log In form.
This unfortunately is non negotiable as the program is designed to enter login and print docket.
The application is processing 300 scans per hour so simple is best.
No, Im not seeing any PDF in web\reports
Can you please help me as I am on a deadline and have to deliver!!!
the client is one of the universities here in NZ and they have been running my Clarion app successfully, and printing dockets
For this year, Ive talked them into using a Web Browser app but now Im red faced !!!!
Look forward to your reply,
regards,
Richard
-
Don, This is appearing.. Is that what you were referring to?
But I do not have a pdf in the Web folder
Thanks
Richard
GET /reports/$$$57653.pdf HTTP/1.1
Host: localhost:8181
Connection: keep-alive
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: http://localhost:8181/BarCodeloginForm
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Cookie: SESSIONID=6OquBI1RcokRbv41SVP2fQ210jEdqJ
-
After fruitless hours... the Q has to be asked...
Is there any reason why a PDF report cannot be displayed on a Login form?
Thank you
Richard
-
Hi Richard,
>> Is there any reason why a PDF report cannot be displayed on a Login form?
no. A login form is like any other form. No difference there.
Of course the one thing that does spring to view is that you're using a very old NetTalk build. This makes it hard to comment on your problem, because you're using code last updated in 2015. So you're likely to waste a lot of time sooner or later encountering issues that have long since been fixed.
That said, you've got it working in the example, which is a good thing.
Perhaps your next test should be as follows;
a) create a new empty form procedure, in your program.
Add a report to that and get it working.
That will at least remove the "conflicting with LoginForm" suggestion, one way or the other.
Elsewhere you say;
>> GET /reports/$$$57653.pdf HTTP/1.1
>> I do not have a pdf in the Web folder
So it appears that the "process" is working ok. The form is expecting a PDF to be created. It should be in the \web\reports folder. It has a random name on creation, but in this case it was $$$57653.pdf
If you look in the \web\reports folder are there any files there? If there are presumably this wasn't one of them.
Aside: The $$$ in the name tells it the file can be deleted after serving. So it can only get served once.
If the file is not being created then check the settings in the _report_ carefully - both the normal report settings and the NetTalk Report Extension and compare them to the example. An incorrect setting here might result in a problem.
Also, if the report is "blank" then you might have this problem as well, so make sure the report actually has some data to display.
Cheers
Bruce
-
Hi Richard
One thing to look at. If you are using Windows Server make sure that the path to the pdf is full, not relative i.e. c:\application\web\report\file.pdf and not just web\report\file.pdf
I ran into this problem where developing on a Windows 10 unit I could use the relative path which I had been doing for years but suddenly last year the new Windows servers would not create the pdf unless I specified the whole path to the file
-
Thanks Terry,
I am using Windows 10 and its conceivable that some client may use Windows 10 Server, so thanks for that.
My Windows 10 will run the NT example 13 without complaint so at least at the moment its not that...
Regards,
Richard
-
Eureka !
Sorted.
Solved the issue by creating a new report rather than customising the Clarion imported one.
Many thanks to those who helped
regards,
Richard