Good afternoon!
Now it always sets fixed (1.25), even if the report has more rows.
Grateful!
To follow up on a comment I just made:
If you use a dataWINDOW control, it should work, but if you use a dataSTORE, you FIRST have to activate print.preview before getting the lastrowonpage and firstrowonpage.
ldatastore.Object.DataWindow.Print.Preview='yes'
At least it works for me with a simple report. I haven't tried with nested reports.
long ll_start, ll_end
string ls_ret
datastore lds
dw_1.dataobject = 'myreport.psr'
ll_start = long(dw_1.object.datawindow.FirstRowOnPage)
ll_end = Long(dw_1.Object.DataWindow.LastRowOnPage)
lds = create datastore
lds.dataobject = 'myreport.psr'
// both return a value of 1:
ll_start = long(lds.object.datawindow.FirstRowOnPage)
ll_end = Long(lds.Object.DataWindow.LastRowOnPage)
//ls_ret = lds.Object.DataWindow.Print.Preview
// this should work:
lds.Object.DataWindow.Print.Preview='yes'
ll_start = long(lds.object.datawindow.FirstRowOnPage)
ll_end = Long(lds.Object.DataWindow.LastRowOnPage)
regards
Unfortunately it didn't work!
I receive a datastore that already comes with the terms of the contract and, soon after, the signatures. The value that is returning from LastRowOnPage or FirstRowOnPage, in this case, are always returning 1.
Is there any other way?
Grateful.
Thank you very much!
I'll test it and give you feedback.
I'll give you an example:
I have to generate contracts, which the cooperative member needs to sign. I don't know how many members will sign, because there could be many. Depending on the number of signatures, the line to sign is on one page and the member's name on another. I would need to know how many lines I still have left in the report to validate if I put everything on another page or not.
Did you understand?
Grateful.
Hi,
The amount of rows on a page might vary, depending on possible group headers etc.
If you want to know the amount of rows on a "specific" page, scroll to that page and substract the results of
// something like this?
long ll_rowsOnPage
ll_rowsOnPage = Long(dw_1.Object.DataWindow.LastRowOnPage) - Long(dw_1.Object.DataWindow.FirstRowOnPage)
Question not clear.
Would you like to know the number of (code) rows or no. of lines in the report output (data). If you want to know the number of output lines (data), then dw_1.RowCount() could do that.
Happiness Always
BKR Sivaprakash
"Even if the report has more rows". ... yes but you said you only want to count the rows on a certain page not all of the rows?
I also said that first you have to "scroll to the row on the page for which you want to count the rows of that page. (ldatastore.ScrollToRow() ).
Maybe I don't understand what you do.
regards.