From: Pedro M. Espinosa on
Hi,
I´m having problems with ReportPro not printing my report after
applying VO 2.8 SP2.
The code I use is:
METHOD pImprime(lPrevia) CLASS ReportesR
LOCAL oReport as RpReport2
LOCAL cFiltro as STRING
LOCAL cJobName,cPrint2Filename,cCaption,cMessage as STRING
LOCAL cReporte as String
LOCAL nReceta as dword
local nPrecio as float
LOCAL nPrecioTot as Float
local aDbfSwap as Array

aDbfSwap := {{[NkIngredSA], gCIngreds, gCIngredsIdx, nil, nil, nil}}

Default(@lPrevia, FALSE)

nReceta := self:Owner:nNumReceta
nPrecio := self:Owner:oRecetasMaster:FIELDGET(FCPRECIO)
nPrecioTot := Round(nPrecio*self:nComensales,2)
cReporte := self:oDCbReportes:Server:FIELDGET(3)
oReport := RpReport2{ self, cReporte,[.],aDbfSwap }

IF oReport:IsValid
cJobName := "Consinfo"
cPrint2Filename := "Consinfo.PRN"
cCaption := "NutriKcal SA"
cMessage := "Imprimiendo"

oReport:Connect2Source()

oReport:SetVariableValue([Usuario],gUsuario)
oReport:SetVariableValue([dgp],gReg01)
oReport:SetVariableValue([ssa],gReg02)
oReport:SetVariableValue([Direccion],gDir1)
oReport:SetVariableValue([Telefonos],gDir2)
oReport:SetVariableValue([Email],gDir3)
oReport:SetVariableValue([nReceta],nReceta)
oReport:SetVariableValue([nPorcionOrig], self:Owner:nComensales )
oReport:SetVariableValue([nPorcionRep],self:nComensales)
oReport:SetVariableValue([nPrecio],nPrecio)
oReport:SetVariableValue([cPrecio],Transform(nPrecio, [$99,999.99]))
oReport:SetVariableValue([cPrecioTot],Transform(nPrecioTot,
[$99,999.99]))

oReport:SetVarUpdateExpression([Usuario], gUsuario)
oReport:SetVarUpdateExpression([dgp], gReg01)
oReport:SetVarUpdateExpression([ssa], gReg02)
oReport:SetVarUpdateExpression([Direccion], gDir1)
oReport:SetVarUpdateExpression([Telefonos], gDir2)
oReport:SetVarUpdateExpression([Email], gDir3)
oReport:SetVarUpdateExpression([nReceta], nReceta)
oReport:SetVarUpdateExpression([nPorcionOrig],
self:Owner:nComensales )
oReport:SetVarUpdateExpression([nPorcionRep], self:nComensales )
oReport:SetVarUpdateExpression([nPrecio], nPrecio )
oReport:SetVarUpdateExpression([cPrecio],Transform(nPrecio,
[$99,999.99]))
oReport:SetVarUpdateExpression([cPrecioTot],Transform(nPrecioTot,
[$99,999.99]))

// oReport:PrinterDevice:Landscape := FALSE
oReport:SetLandscape(FALSE)

IF lPrevia
oReport:PrintPreview(cJobName,cPrint2Filename,cCaption,CMessage)
ELSE
oReport:Print(cJobName,cPrint2Filename,cCaption,CMessage)
ENDIF

ENDIF
oReport:Close()
oReport := null_object
RETURN nil
From: Robert van der Hulst on
Hi Pedro,
On Mon, 17 Nov 2008, at 19:52:52 [GMT -0800 (PST)] (which was 04:52 where I live)
you wrote about: 'Having problems with ReportPro after upgrading VO2.8 to SP2'

> I�m having problems with ReportPro not printing my report after
> applying VO 2.8 SP2.
> The code I use is:

Do you have any other info that can help us to help you ?
--
Robert van der Hulst
AKA Mr. Data
Vo2Jet & Vo2Ado Support
VO & Vulcan.NET Development Team
www.heliks.nl

From: Pedro M. Espinosa on
On Nov 18, 2:39 am, Robert van der Hulst <E-55525A53-325...(a)heliks.nl>
wrote:
> Hi Pedro,
>  On Mon, 17 Nov 2008, at 19:52:52 [GMT -0800 (PST)] (which was 04:52 where I live)
> you wrote about: 'Having problems with ReportPro after upgrading VO2.8 to SP2'
>
> > I´m having problems with ReportPro not printing my report after
> > applying VO 2.8 SP2.
> > The code I use is:
>
> Do you have any other info that can help us to help you ?
> --
> Robert van der Hulst
> AKA Mr. Data
> Vo2Jet & Vo2Ado Support
> VO & Vulcan.NET Development Teamwww.heliks.nl

Hi Robert,
The only additional information I have is that I'm using ReportPro
2.14d and exactly the same code worked without problems before. I have
a demo app you can see in http://www.ogali.com.mx/NutriKcal/NutrikcalSAPrueba.exe
(7MB)
One other thing is that if I add a picture (by example 9,999.99) using
2.14d I get the error msg "An undeterminable error was encountered
while moving to the first logical record", but if I added the same
picture to the same field using Rpro 2.11 it works fine. I can then
open it in 2.14d and it works without a problem.
TIA
Pedro
From: frinchis on
Pedro, I see that error message very frequently too (I use the
linkable designer). The workaround is to exit RP and reenter again.
If you have some report that stops working, edit it, make a dummy
change, save it and the error should be gone. At least this is my
experience.

Greetings
Carlos Vazquez.
From: Pedro M. Espinosa on
On Nov 19, 12:45 pm, frinc...(a)gmail.com wrote:
> Pedro, I see that error message very frequently too (I use the
> linkable designer).  The workaround is to exit RP and reenter again.
> If you have some report that stops working, edit it, make a dummy
> change, save it and the error should be gone.  At least this is my
> experience.
>
> Greetings
> Carlos Vazquez.

Carlos:
Are you talking about the picture problem or the non printing problem?
I tested taking out all the Connect2Source, SetVariableValue and
SetVarUpdateExpression statements and it doesn't work either. But if I
test it from the designer (i.e. RP2_32.exe) it works ok
So I think it's a matter of recompiling the RP dll's.
TIA
Pedro