PDA

View Full Version : Strange Behaviour in WebReports



Raveen Ryan Sundram
6-Sep-2005, 08:26 PM
Hi,

In my WebReport, I've set the piMaxCount to 30 and the report
displays/prints 30 lines before stopping.
But it returns 26 as piLastRecord - how weird is this?

Could be confused with other webreports in my program? As I've declared
all/most of the webreport as being 'oReport' . But I have only one report
per Web-Object (WO)

Has anyone encountered this before?

My Code:
==================
Function RunOrderDtlReport Integer iHdrRec String sMode Integer iStartRecord
Integer iMaxCount Returns Integer
Integer iLastRecord iStatus

Set piOrdering To 3
Set piConstrainRecord To iHdrRec
Set psMode To sMode

Showln 'piMaxCount=' iMaxCount
Set piStartRecord To iStartRecord
Set piMaxCount To iMaxCount
Set piMaxCountBreakLevel To 0

Get DoRunReport To iStatus
Get piLastRecord To iLastRecord
Showln 'piLastRecord=' iLastRecord

Function_Return iLastRecord
End_Function // RunShowOrder

Ian Telfer
6-Sep-2005, 09:39 PM
Raveen,

Isn't that the Recnum of the last reported record?

Ian

Mike Cooper
7-Sep-2005, 07:53 AM
I agree with Ian...

if you are reporting on an index, the last record reported code be anything
(even 1)...

Sounds normal to me.

Mike

--
Grasp Software Corporation
www.grasp.ca
"Ian Telfer" <ian@informatica.com.au> wrote in message
news:e5ImGW1sFHA.3452@dacmail.dataaccess.com...
> Raveen,
>
> Isn't that the Recnum of the last reported record?
>
> Ian

Knut Sparhell
7-Sep-2005, 08:42 AM
Raveen Ryan Sundram wrote:

> In my WebReport, I've set the piMaxCount to 30 and the report
> displays/prints 30 lines before stopping.
> But it returns 26 as piLastRecord - how weird is this?

Not at all. It's the recnum value if the last reported record. When
this is fed to the report as StartRecId, to get the next "page", the
report will start from the row following this, according to the index.

If it's zero then there is no more rows to report and the displayed page
is the last one. You may use this to disable the "Next page" link. If
the StartRecId is zero then you may disable the "Previous page" link.

You might want to get the number of reported rows on the actual page.
To get this you have to use a counter (subtotal) and reset this at the
start of each page.

--
Knut Sparhell, Norway

Raveen Ryan Sundram
7-Sep-2005, 02:50 PM
Ian, Michael, Knut,

Thanks for the input, from the documentation it sounded like it was a record
count.
I understand now.

Thanks

Regards,
Raveen Ryan Sundram


"Knut Sparhell" <knut@sparhell.no> wrote in message
news:AwB7RI7sFHA.960@dacmail.dataaccess.com...
> Raveen Ryan Sundram wrote:
>
>> In my WebReport, I've set the piMaxCount to 30 and the report
>> displays/prints 30 lines before stopping.
>> But it returns 26 as piLastRecord - how weird is this?
>
> Not at all. It's the recnum value if the last reported record. When this
> is fed to the report as StartRecId, to get the next "page", the report
> will start from the row following this, according to the index.
>
> If it's zero then there is no more rows to report and the displayed page
> is the last one. You may use this to disable the "Next page" link. If
> the StartRecId is zero then you may disable the "Previous page" link.
>
> You might want to get the number of reported rows on the actual page. To
> get this you have to use a counter (subtotal) and reset this at the start
> of each page.
>
> --
> Knut Sparhell, Norway