Crash after oBrw:Report()

Crash after oBrw:Report()

Postby HunterEC » Tue May 27, 2008 8:59 am

Hi guys: :)
After doing a oBrw:Report() I tried to Create a report and the program crashes. What's wrong in this piece of code ?

Code:

FUNCTION Main()
LOCAL oDlg, oBrw, oReport, oFont1, oFont2, cTimeStamp

SET CENTURY ON

USE Test NEW

SET INDEX TO Test

DEFINE DIALOG oDlg;
SIZE 800, 600

@ 0, 0 LISTBOX oBrw FIELDS

oBrw:bLine := &( "{ || { Name, Lastname } }" )

ACTIVATE DIALOG oDlg;
ON INIT oDlg:SetControl( oBrw );
CENTER

oBrw:Report()

GO TOP

DEFINE FONT oFont1 NAME "ARIAL" SIZE 0,-10
DEFINE FONT oFont2 NAME "ARIAL" SIZE 0,-10 BOLD

cTimeStamp := "Fecha: " + DTOC(DATE()) + " Hora: " + TIME()

REPORT oReport TITLE "*** My First Report ***" ;
CAPTION "Reporte De Cuentas A Cobrar" ;
HEADER cTimeStamp ;
FONT oFont1, oFont2 ;
FOOTER "Pagina: " + LTRIM(STR(oReport:nPage,5)) CENTER ;
PREVIEW

COLUMN TITLE "First Name" DATA Test->Name
COLUMN TITLE "Last Name" DATA Test->Lastname
COLUMN TITLE "Balance Due", "Ultimo Pago" DATA Test->Balance, Test->Lastpmt ;
PICTURE "$99,999.99", "D" TOTAL RIGHT SHADOW

GROUP ON Test->Pat_city ;
FOOTER "Ciudad:" + TRIM(oReport:aGroups[1]:cValue) + ;
STR(oReport:aGroups[1]:nCounter,4) ;
FONT 2
GROUP ON Test->Pat_lastn ;
FOOTER " Total Para Cliente " + TRIM(oReport:aGroups[2]:cValue) + ": " + ;
STR(oReport:aGroups[2]:nCounter,4) ;
FONT 2

END REPORT

oReport:lsummary := .T.
oReport:aGroups[2]:bFootFont := {|| 2}

ACTIVATE REPORT oReport ON STARTGROUP JumpLines(@oReport, 2)

oFont1:End()
oFont2:End()

CLOSE ALL
RETURN NIL


Error Message:

Error description: Error BASE/1132 Bound error: array access

Called from: => LOCKERRHAN(0)
Called from: => (b)INITHANDL$(0)
Called from: => TPREVIEW:BUILDWINDO(0)
Called from: => TPREVIEW:NEW(0)
Called from: => RPREVIEW(0)
Called from: => (b)NEW(0)
Called from: => TREPORT:ACTIVATE(0)
Called from: => MAIN(69)
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Postby Antonio Linares » Tue May 27, 2008 10:19 am

Gustavo,

What FiveWin for Clipper version are you using ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby HunterEC » Wed May 28, 2008 12:59 am

Ver. 8.03
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Postby Antonio Linares » Wed May 28, 2008 8:02 am

Gustavo,

Whats the source code for function JumpLines() ?

Here your PRG is working fine without that function.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby HunterEC » Wed May 28, 2008 8:24 am

Antonio: source code for JumpLines()


STATIC PROCEDURE JumpLines (oReport, nLines)
LOCAL nI

FOR nI := 1 TO nLines
oReport:NewLine()
NEXT
RETURN
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am

Postby Antonio Linares » Thu May 29, 2008 9:20 am

Your code is working fine here using FWH 32 bits.

We strongly recommend you to port your application to 32 bits. It will save you from many troubles.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby HunterEC » Fri May 30, 2008 9:03 am

Thank you.
HunterEC
 
Posts: 723
Joined: Tue Sep 04, 2007 8:45 am


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 3 guests