Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LEDGER PAGE NO.

mohinder singh

Programmer
Jun 30, 2021
10
CA
HI
I WANT TO STORE EACH PAGE NO. IN MY ACCOUNTING LEDGER REPORT FOR INDEX PAGE
 
Last edited:
I was trying to empathize is that it should update a row, rather than insert one into a log.
That's what I understood was asked for anyway: To update a pageno field in a ledger record, which obviously already exists.

And as it is for creating an index page as appendix of the report, perhaps in a separate report, perhaps in the same report which creates that data on the fly, there also is no need to avoid inserting new rows into another table, as this is temporary information about this report run and you can purge it after priting.

I'd consider SYS(2040) even more important, therefore, as it helps to act differently when a report is run with vs without preview. You might not want to preview the index pages, for example and add the data in the printing phase only. You might want the opposie and therefore do it in the preview phase, if there is one, then skip it in the printing phase or you program as you and I suggest with updates that don't create duplicate data.
 
That's what I understood was asked for anyway: To update a pageno field in a ledger record, which obviously already exists.

And as it is for creating an index page as appendix of the report, perhaps in a separate report, perhaps in the same report which creates that data on the fly, there also is no need to avoid inserting new rows into another table, as this is temporary information about this report run and you can purge it after priting.

I'd consider SYS(2040) even more important, therefore, as it helps to act differently when a report is run with vs without preview. You might not want to preview the index pages, for example and add the data in the printing phase only. You might want the opposie and therefore do it in the preview phase, if there is one, then skip it in the printing phase or you program as you and I suggest with updates that don't create duplicate data.
All valid points.

We often see odd requests from people in these forums from developers who don't explain their question well. Then after we offer them advice or even pseudocode we come to realize they likely are modifying a system that was designed by somebody else years ago who had more experience with fundamentals than them.

When he said the suggested code didn't work, I realized he likely tried it word for word and is a new developer who may lack certain skills.

So I just wanted to be sure he realized that the function will run every time that the user reprints or even previews the report, so they understand that whatever index he will be creating should be maintained using updates to existing records rather than inserts to a log.
 

Part and Inventory Search

Sponsor

Back
Top