In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Batch printing - prepared report
Batch printing - prepared report
In FR documentation there is a neat feature which enables FR to print multiple documents in one go. Like this:
frxReport1.LoadFromFile('Invoice.fr3');
frxReport1.PrepareReport;
frxReport1.LoadFromFile('StorageOrder.fr3');
frxReport1.PrepareReport(False);
frxReport1.ShowPreparedReport;
The idea is to print Invoice, Storage order (...) in one go.
There is FRX support for PrepareReport(), but I always get first report.
Is this supported? Example?
--
Dusan Majkic
Wings Software
frxReport1.LoadFromFile('Invoice.fr3');
frxReport1.PrepareReport;
frxReport1.LoadFromFile('StorageOrder.fr3');
frxReport1.PrepareReport(False);
frxReport1.ShowPreparedReport;
The idea is to print Invoice, Storage order (...) in one go.
There is FRX support for PrepareReport(), but I always get first report.
Is this supported? Example?
--
Dusan Majkic
Wings Software
- ignacio
- Site Admin
- Mensajes: 9257
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Batch printing - prepared report
dmajkic escribió el mar, 28 octubre 2014 16:59In FR documentation there is a neat feature which enables FR to print multiple documents in one go. Like this:
frxReport1.LoadFromFile('Invoice.fr3');
frxReport1.PrepareReport;
frxReport1.LoadFromFile('StorageOrder.fr3');
frxReport1.PrepareReport(False);
frxReport1.ShowPreparedReport;
The idea is to print Invoice, Storage order (...) in one go.
There is FRX support for PrepareReport(), but I always get first report.
Is this supported? Example?
--
Dusan Majkic
Wings Software
Yes is supported. The example would almost like your, just change the dot with double dot.
Regards,
frxReport1.LoadFromFile('Invoice.fr3');
frxReport1.PrepareReport;
frxReport1.LoadFromFile('StorageOrder.fr3');
frxReport1.PrepareReport(False);
frxReport1.ShowPreparedReport;
The idea is to print Invoice, Storage order (...) in one go.
There is FRX support for PrepareReport(), but I always get first report.
Is this supported? Example?
--
Dusan Majkic
Wings Software
Yes is supported. The example would almost like your, just change the dot with double dot.
Regards,
Re: Batch printing - prepared report
Tried this again, but it is not working. I do this:
But the data on both invoices are from first report. Like the new AddDbf() is not replacing data.
Setting variables to new values do work.
Código: Seleccionar todo
// First Invoice
frxReport1:LoadFromFile('Invoice.fr3')
frxReport1:AddDbf( "INVOICE", {"INVOICE->*"} )
frxReport1:PrepareReport()
// Second Invoice (code is not there, invoice data is different )
frxReport1:LoadFromFile('Invoice.fr3')
frxReport1:AddDbf( "INVOICE", {"INVOICE->*"} )
frxReport1:PrepareReport(.T.)
frxReport1:ShowReport(.T.)
Setting variables to new values do work.
- ignacio
- Site Admin
- Mensajes: 9257
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Re: Batch printing - prepared report
Please try calling TFastReport:ForceReload() before calling AddDbf() the second time. Something like this:
Regards,
Código: Seleccionar todo
WITH OBJECT ::oFrx
SET FILTER TO ...
GO TOP
:AddDbf("biolife", "biolife->*" )
:PrepareReport(.F.)
SET FILTER TO ...
GO TOP
:ForceReload()
:AddDbf("biolife", "biolife->*" )
:PrepareReport(.T.)
:ShowPreparedReport()
END WITH
Re: Batch printing - prepared report
Thank you Ignacio for your fast response!
With ForceReload I have distinct data, but variables are gone.
Please find minimal example attached. You can build it with "hbmk2 b.hbp". Set your licence and copy latest frx.dll in folder.
With ForceReload I have distinct data, but variables are gone.
Please find minimal example attached. You can build it with "hbmk2 b.hbp". Set your licence and copy latest frx.dll in folder.
-
- Mensajes: 42
- Registrado: Sab Ago 10, 2013 2:39 am
Re: Batch printing - prepared report
This program works:
Report writes:
P1: Field 1111
P2: Field 2222
But this does not work:
Pages:
P1: Field 1111 x = 1
P2: Field 1111 x = 2
When I im change order to:
oFr:LoadFromFile ("report.fr3")
oFr:AddVariable ("VAR", "X", 1) // 1
oFr:AddDbf ("ART", {"ART->*"})
Then report does not see variable X.
Código: Seleccionar todo
oFr:Create()
Art->a_name := "Field 1111"
oFr:LoadFromFile ("report.fr3")
oFr:AddDbf ("ART", {"ART->*"})
oFr:PrepareReport(.F.)
Art->a_name := "Field 2222"
oFr:LoadFromFile ("report.fr3")
oFr:AddDbf ("ART", {"ART->*"})
oFr:PrepareReport(.T.)
oFr:ShowReport (.T.)
P1: Field 1111
P2: Field 2222
But this does not work:
Código: Seleccionar todo
oFr:Create()
Art->a_name := "This is 1111"
oFr:LoadFromFile ("report.fr3")
oFr:AddDbf ("ART", {"ART->*"})
oFr:AddVariable ("VAR", "X", 1) // 1
oFr:PrepareReport(.F.)
Art->a_name := "This is 2222"
oFr:LoadFromFile ("report.fr3")
oFr:AddDbf ("ART", {"ART->*"})
oFr:AddVariable ("VAR", "X", 2) // 2
oFr:PrepareReport(.T.)
oFr:ShowReport (.T.)
P1: Field 1111 x = 1
P2: Field 1111 x = 2
When I im change order to:
oFr:LoadFromFile ("report.fr3")
oFr:AddVariable ("VAR", "X", 1) // 1
oFr:AddDbf ("ART", {"ART->*"})
Then report does not see variable X.
- ignacio
- Site Admin
- Mensajes: 9257
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Re: Batch printing - prepared report
Hello,
Here is working fine! See report attached.
BTW, I have just upload the latest version of FRX for console mode on our download area:
http://www.xailer.com/download?en&file=103
Regards,
Here is working fine! See report attached.
BTW, I have just upload the latest version of FRX for console mode on our download area:
http://www.xailer.com/download?en&file=103
Regards,
- Adjuntos
-
- Report.rar
- (1.46 KiB) Descargado 4207 veces
-
- Mensajes: 42
- Registrado: Sab Ago 10, 2013 2:39 am
Re: Batch printing - prepared report
After new version instalation:
Error BASE/1082 Argument error: -
Called from TFRARRAYDATASET:LOAD(549)
Called from FRAPP:LOADDATA(400)
Called from FRAPP:LOADREPORT(486)
Called from FRAPP:LOADFROMFILE(661)
Called from FR_REPORT(582)
Error BASE/1082 Argument error: -
Called from TFRARRAYDATASET:LOAD(549)
Called from FRAPP:LOADDATA(400)
Called from FRAPP:LOADREPORT(486)
Called from FRAPP:LOADFROMFILE(661)
Called from FR_REPORT(582)
- ignacio
- Site Admin
- Mensajes: 9257
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Re: Batch printing - prepared report
Hello,
Array can not be empty. BTW, run time error controlled for next release.
Regards,
Array can not be empty. BTW, run time error controlled for next release.
Regards,
-
- Mensajes: 42
- Registrado: Sab Ago 10, 2013 2:39 am
Re: Batch printing - prepared report
I use the older version (1.5.1411.27) and it accepts empty arrays (= DBF tables without records) without any problems. It is impossible for me to change the all program/reports and looking for all the places where they appear empty arrays. Is there a some solution at the FastReport level? I think that some run time error control handler is not a good solution.ignacio escribió:Hello,
Array can not be empty. BTW, run time error controlled for next release.
Regards,
-
- Mensajes: 42
- Registrado: Sab Ago 10, 2013 2:39 am
Re: Batch printing - prepared report
Sorry to bother you, but this is very important to me.
Is there any chance of returning to the old way of working with empty arrays? Older versions accepts empty arrays and not report an error when this happens.
Regards, NB
Is there any chance of returning to the old way of working with empty arrays? Older versions accepts empty arrays and not report an error when this happens.
Regards, NB
- ignacio
- Site Admin
- Mensajes: 9257
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Re: Batch printing - prepared report
Hello,
Sorry, your message has been unintentionally forgotten.
I hope you can include a simple line in the source code of FrDataset.prg. In case not I will upload a new version. Here is the code:
Regards
Sorry, your message has been unintentionally forgotten.
I hope you can include a simple line in the source code of FrDataset.prg. In case not I will upload a new version. Here is the code:
Código: Seleccionar todo
METHOD Load( lDesign ) CLASS XFrArrayDataset
.....
.....
.....
oRep := ::oReport
nPos := 1 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< NEW LINE
aData := ::aData
.....
.....
.....
RETURN .T.
-
- Mensajes: 42
- Registrado: Sab Ago 10, 2013 2:39 am
Re: Batch printing - prepared report
I found FrDataset.prg, but do not know how to include this PRG into my program?
Regards, NB
Regards, NB
ignacio escribió:Hello,
Sorry, your message has been unintentionally forgotten.
I hope you can include a simple line in the source code of FrDataset.prg. In case not I will upload a new version. Here is the code:
RegardsCódigo: Seleccionar todo
METHOD Load( lDesign ) CLASS XFrArrayDataset ..... ..... ..... oRep := ::oReport nPos := 1 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< NEW LINE aData := ::aData ..... ..... ..... RETURN .T.
- ignacio
- Site Admin
- Mensajes: 9257
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Re: Batch printing - prepared report
New install file: https://dl.dropboxusercontent.com/u/318 ... /frx15.exe
Please confirm it works as expected. TIA.
Please confirm it works as expected. TIA.
-
- Mensajes: 42
- Registrado: Sab Ago 10, 2013 2:39 am
Re: Batch printing - prepared report
Unfortunately, there is still a problem. Pleas look this test program:
This program work perfect with old version. In new version, designer does not see variable X!
One more thing: please add "instalation dir" in instalation procedure. Now you can not even see where the program is installed. Also, without question FRX is install on the old path and overwrite the old version with no questions asked.
Regards, NB
Código: Seleccionar todo
PROC Main
USE Art NEW EXCLUSIVE
oFr := frReportManager():New()
oFr:cFRLicense := ...
oFr:cXALicense := ...
Art->a_name := "This is 1111"
oFR:Create()
oFr:LoadFromFile ("report.fr3")
oFr:AddDbf ("ART", {"ART->*"})
oFr:AddVariable ("VAR", "X", 1)
oFr:DesignReport()
oFr:ShowReport (.T.)
RETURN
One more thing: please add "instalation dir" in instalation procedure. Now you can not even see where the program is installed. Also, without question FRX is install on the old path and overwrite the old version with no questions asked.
Regards, NB
ignacio escribió:New install file: https://dl.dropboxusercontent.com/u/318 ... /frx15.exe
Please confirm it works as expected. TIA.
- ignacio
- Site Admin
- Mensajes: 9257
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Re: Batch printing - prepared report
Hello,
Review FUNCTION Sergey() on module FRConsole.prg (line 364). Here is working fine.
Regards,
Review FUNCTION Sergey() on module FRConsole.prg (line 364). Here is working fine.
Regards,
-
- Mensajes: 42
- Registrado: Sab Ago 10, 2013 2:39 am
Re: Batch printing - prepared report
Sorry, I do not understand? Line 364 is:ignacio escribió:Hello,
Review FUNCTION Sergey() on module FRConsole.prg (line 364). Here is working fine.
Regards,
:AddVariable( "Categoria", "Nombre", 123 )
I use:
oFr:AddVariable ("VAR", "X", 1)
This is the same? I rewrote the program so it does not use the Sergey-specific commands (I think). Can you tell me exactly which command is the problem?
-
- Mensajes: 42
- Registrado: Sab Ago 10, 2013 2:39 am
Re: Batch printing - prepared report
Sorry, I still do not understand?
ignacio escribió:http://www.kresin.ru/en/hrbfaq_3.html#Doc2
- ignacio
- Site Admin
- Mensajes: 9257
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Re: Batch printing - prepared report
From the link given:
Another new operator - WITH OBJECT:
It allows to simplify the code for the reasonable use :
Another new operator - WITH OBJECT:
Código: Seleccionar todo
WITH OBJECT expression
...
ENDWITH
It allows to simplify the code for the reasonable use :
Código: Seleccionar todo
// you can write
WITH OBJECT myobj:a[1]:myitem
:message( 1 )
:value := 9
ENDWITH
// instead of
myobj:a[1]:myitem:message( 1 )
myobj:a[1]:myitem:value := 9
-
- Mensajes: 42
- Registrado: Sab Ago 10, 2013 2:39 am
Re: Batch printing - prepared report
Ok, but I do not see the connection with this problem? This program with the new version does not work properly.
Why? This is a very simple program and I do not see why it does not work properly?
Regards, NB
Código: Seleccionar todo
PROC Main
USE Art NEW EXCLUSIVE
oFr := frReportManager():New()
oFr:cFRLicense := ...
oFr:cXALicense := ...
Art->a_name := "This is 1111"
oFR:Create()
oFr:LoadFromFile ("report.fr3")
oFr:AddDbf ("ART", {"ART->*"})
oFr:AddVariable ("VAR", "X", 1)
oFr:DesignReport()
oFr:ShowReport (.T.)
RETURN
Regards, NB
ignacio escribió:From the link given:
Another new operator - WITH OBJECT:
Código: Seleccionar todo
WITH OBJECT expression ... ENDWITH
It allows to simplify the code for the reasonable use :Código: Seleccionar todo
// you can write WITH OBJECT myobj:a[1]:myitem :message( 1 ) :value := 9 ENDWITH // instead of myobj:a[1]:myitem:message( 1 ) myobj:a[1]:myitem:value := 9
Re: Batch printing - prepared report
Is there any solution for this problem ?
I too have the same issue. The variables added from PRG does not appear in the FastReport
oFr:AddVariable ("VAR", "X", 1)
I too have the same issue. The variables added from PRG does not appear in the FastReport
oFr:AddVariable ("VAR", "X", 1)