NetTalk Central

Author Topic: Including on Report the total count of records displayed  (Read 2610 times)

Richard I

  • Sr. Member
  • ****
  • Posts: 398
    • View Profile
    • Email
Including on Report the total count of records displayed
« on: April 03, 2024, 07:41:07 PM »
Hi
I have a report where I am totalling the number of records being displayed  using loc:Count+=1
A stop statement  into the Serverside code  returns a total number correctly both as loc:Count and as p_web.GSV('loc:Count')

My problem is getting the count value to display in the Header of the report.

Ive tried in WindowManager OpenReport Procedure after Parent Call SetTarget(report)
and in PrimeReportOptions when run in web mode...

loctotal     = p_web.GSV('loc:Count')
where loc:Total is a long N_4

But both return 0 in the report
What do I need to do , please?
Thanks
Richard
NT 14.20


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Including on Report the total count of records displayed
« Reply #1 on: April 03, 2024, 09:52:13 PM »
Post a small example showing the affect and I can comment on what you might be doing wrong.

Jane

  • Sr. Member
  • ****
  • Posts: 372
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: Including on Report the total count of records displayed
« Reply #2 on: April 04, 2024, 10:08:33 AM »
Write a separate routine to read through and count all the records that will be in the report.
Run that BEFORE you OPEN the report.
That way the report header can have the correct information.

Richard I

  • Sr. Member
  • ****
  • Posts: 398
    • View Profile
    • Email
Re: Including on Report the total count of records displayed
« Reply #3 on: April 05, 2024, 12:34:49 AM »
Thank you Jane- Works Perfectly

I left the code in the ServerSide Code in  a Button, but removed the report name from Onclick
Then I created a second button  "write Report" and included the Reportname in OnClick
Ran them both
Report has the Count !!!
Cheers
Richard