NetTalk Central

Author Topic: Progress Bar not seeming to work the same.  (Read 5672 times)

astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
Progress Bar not seeming to work the same.
« 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

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Progress Bar not seeming to work the same.
« Reply #1 on: December 29, 2016, 10:16:41 PM »
Hi Ashley take a look at my topic
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Progress Bar not seeming to work the same.
« Reply #2 on: December 30, 2016, 05:36:13 AM »
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

astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
Re: Progress Bar not seeming to work the same.
« Reply #3 on: January 01, 2017, 03:59:48 PM »
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
« Last Edit: January 01, 2017, 04:23:28 PM by astahl »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Progress Bar not seeming to work the same.
« Reply #4 on: January 02, 2017, 03:37:17 AM »
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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Progress Bar not seeming to work the same.
« Reply #5 on: January 02, 2017, 03:42:43 AM »
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

astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
Re: Progress Bar not seeming to work the same.
« Reply #6 on: January 02, 2017, 01:08:53 PM »
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
.

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Progress Bar not seeming to work the same.
« Reply #7 on: January 07, 2017, 10:57:17 PM »
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.
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

astahl

  • Sr. Member
  • ****
  • Posts: 308
    • View Profile
    • Email
Re: Progress Bar not seeming to work the same.
« Reply #8 on: January 09, 2017, 03:08:52 AM »
Thanks Terry!!! Love this forum.

Ashley