Select printer
-
- Mensajes: 42
- Registrado: Sab Ago 10, 2013 2:39 am
Select printer
Hi to all
Is this forum still active?
I need to select a specific printer that is not Windows default for one specific report. Is there a way to do that?
Regards, Nenad
Is this forum still active?
I need to select a specific printer that is not Windows default for one specific report. Is there a way to do that?
Regards, Nenad
Re: Select printer
First you have to identify tthe correct name for the printer you need, (check tprinter class) then you have to send it to your fr3 with this:
::oFastReport:oPrintOptions:cPrinter:="your printer"
Regards
::oFastReport:oPrintOptions:cPrinter:="your printer"
Regards
Saludos
Héctor García
Héctor García
-
- Mensajes: 42
- Registrado: Sab Ago 10, 2013 2:39 am
-
- Mensajes: 42
- Registrado: Sab Ago 10, 2013 2:39 am
-
- Mensajes: 42
- Registrado: Sab Ago 10, 2013 2:39 am
Re: Select printer
Ah, I realized what the problem was! I use FrReportManager as base class instead TFastReport. Unfortunately, it's a big problem for me to change this, is there a way to set up a printer from this class? I try
::Super:oPrintOptions:cPrinter
but :oPrintOptions is NIL??
::Super:oPrintOptions:cPrinter
but :oPrintOptions is NIL??
- ignacio
- Site Admin
- Mensajes: 9256
- Registrado: Lun Abr 06, 2015 8:00 pm
- Ubicación: Madrid, Spain
- Contactar:
Re: Select printer
Hi,
Regards,
::Super NOT NEEDED.CLASS frReportManager FROM TFastReport
Regards,
-
- Mensajes: 42
- Registrado: Sab Ago 10, 2013 2:39 am
Re: Select printer
Ignacio, thank you very much!
The problem is of course in my code. I did that part a long time ago (Spirin version), so I forgot how it works. Basically, all my reports look like this:
oFr := FRInit()
...
...
oFr:activate()
FRInit() doing this:
:activate() is this method:
The problem occurs because variable oPrintOptions = NIL before the ::create() activation! As I put oFr:oPrintOptions:cPrinter := "..." before ::activate(), I got an error.
The problem is of course in my code. I did that part a long time ago (Spirin version), so I forgot how it works. Basically, all my reports look like this:
oFr := FRInit()
...
...
oFr:activate()
FRInit() doing this:
Código: Seleccionar todo
oFr := FrReportManager():New()
oFr:SetProperty("DESIGNER", "DefaultFont.Charset", 238)
oFr:SetFormatSettings(frxThousandSeparator, ".")
...
Código: Seleccionar todo
::Create()
::LoadFromFile (::cScript)
::Init()
::ShowReport()