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:
Do you mean that for each item on the ledger report you want to write back the page number it appears on into the original data?

if so, you are looking to run something like this for each detail in the report - in the run on entry property on the detail band

Code:
function LedgerPageUpdate
select myLedger
set order to LedgerKey
seek (myTempCursor.LedgerKey)
replace myLedger.ReportPage with _pageno
select myTempCursor
return(.t.)

I haven't tested this, never used the property...
 
I wonder why you would call printing storing. And if so, the simpler question is how to print a page number. It does not depend on what data you print. As you obviously struggle with the English language you would ask just that.

I wonder even more why you would want a report to store (save) something into data. You got both options as answers. And even though the request to store the current page number into data seems very odd, I bet you need Griffs answer considering what I said above.

I even can imagine a use case for this data, you could print an index page that tells on which pageno a ledger is to be found. But then, if you need to look up data, you best do it on a computer/tablet/phone, not on a printed report. To need an index page suggests the report has a magnitude of 100 pages, maybe even several 100s. Why would you even print out all that data at all?

Just one tip: If you're really that bad in English, you better use a translator like google translate, and to best ensure the meaning comes over, be verbose about it, don't stop at just two questions, especially two questions that are just the same. Always imagine yourself on the other end, would you get it? If you really want to store the page number in data, you will know yourself that this is very unusual and people might not assume you mean that, so that's one thing to mention to make clear you really mean it and it's not just a translation error. I actually looked up whether storing and printing look or sound the same in Hindi, but they don't.
 
Last edited:
Do you mean that for each item on the ledger report you want to write back the page number it appears on into the original data?

if so, you are looking to run something like this for each detail in the report - in the run on entry property on the detail band

Code:
function LedgerPageUpdate
select myLedger
set order to LedgerKey
seek (myTempCursor.LedgerKey)
replace myLedger.ReportPage with _pageno
select myTempCursor
return(.t.)
THANKS
I WILL TRY THIS CODE
 
This is an odd question. I can't imagine why you would store a page number someplace unless each page has some meaning.

For example, if there are 550 rows to print, and each page holds about 55 rows, you would get 10 pages. So, are you saying you want an index that tells you what page each row is on?

So the first 55 lines will have a column that says each of them are on page one, and the next 55 say page 2, etc.?

If that's the case, you could write a simple user defined function and pass the row number and page number as parameters. Then place that in a box on the report for example LogPageNo(keyfieldname, _PageNo). Then every row could call LogPageNo with the key field for the row, along with the page number it appears on. That function would simply create your index with the key field and page number for later reference.

Like I said, it's an odd request, but it would work.

Of course, if you know ahead of time how many rows fit on each page, you could mathematically determine what page each row will be on without actually running the report.
 
RESPECTED SIR,
YOUR CODE NOT WORK
PLEASE TELL ME HOW TO STORE (WANT TO REPLACE IN OTHER DATABASE) LEDGER REPORT'S PAGE NO. (FOR CREATING INDEX PAGE)
WHICH COMMAND/FUNCTION I GIVE IN LEDGER.FRX
THANX IN ADVANCE
Again, please don't SHOUT!!! Using UPPER case only is considered SHOUTING!!!
 
I can't be more specific with the code, without knowing your data structure etc.

But you trigger the function on entry to each detail line

1741510132433.png
 

Part and Inventory Search

Sponsor

Back
Top