NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: astahl on December 28, 2016, 06:07:14 AM
-
Hi All,
I have a report that is called from a webform start button with a progress bar.
I see the report generating the pdf(25 pages) but the progress control has already disappeared without the link.
It does 1 and 2 page pdfs correctly but not larger reports 3 or above.
Looks like a timing issue where the report now returns to the form before the pdf is generated completely.
Anyone else seeing this?
Clarion 10 NetTalk 9.16
Ashley
-
Hi Ashley take a look at my topic
-
This is likely different to Terry's report, but I will need an example in order to debug exactly what you are doing wrong.
cheers
Bruce
-
Hi All,
I think I found the problem which is kinda weird. I was not using an key/index on this report.
I was using a filter only, the report works in a desktop application but not in a NetTalk app.
Since adding the key it now works as expected.
I also removed any of the code I had to print a second detail line after a certain number of records were printed.
The second detail line was a page totals line which accumulated totals for each page.
I moved the totals line into the footer and just summed the fields I needed.
I also removed any of the progress bar updates I had in there before and allowed the template to handle it.
So why is the key needed in the NetTalk app when a filter works to produce the report otherwise?
Inquiring minds want to know,
Ashley
-
Hi Ashley,
>> So why is the key needed in the NetTalk app when a filter works to produce the report otherwise?
It's not. The report is a report - there's no NetTalk code that makes the report work, or not work.
My guess is adding a key changes something in the timing, so masks the issue you are having.
You're no closer to discovering the real answer - but my offer of analyzing an example still stands.
cheers
Bruce
-
Adding a key may make the (normal) report progress bar work better.
Terry noted on the other thread that setting it to 1 is important, but it might be resetting _back_ to 0, which would be a bad thing.
I'm making a small tweak to the template in 9.17 to make sure it doesn't regress < 1.
Try with that when it's up.
Cheers
Bruce
-
Hi Bruce,
I tried the the example and it worked fine with 5000 records. The only visible difference between the 2 apps was using a key.
I cannot can give you an example when it works perfectly
Ashley
.
-
HI Ashley try this code between where you set the PercentageComplete in the loop and p_web.SetProgress()
PercentageComplete = RecordCount*100/FileRecords ! calculate the percentage complete, using whatever code is applicable to your process
If PercentageComplete < 1
PercentageComplete = 1
ELSIF PercentageComplete > 99
PercentageComplete = 99
END
p_web.SetProgress(loc:ProgressName,PercentageComplete,'') ! set the progress bar to that number.
-
Thanks Terry!!! Love this forum.
Ashley