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.

SetEventHandler

FastReport for Xailer & [x]Harbour (English/Spanish)
Responder
a.ilic
Mensajes: 37
Registrado: Vie Sep 27, 2013 1:13 am

SetEventHandler

Mensaje por a.ilic »

Is there alternative for Spirin's method SetEventHandler and event OnSendMail?
I need to manually process the mail when user clicks on mail icon in preview window. I was doing something like this:
oFr:SetProperty("MailExport", "ShowDialog", .F.)
oFr:SetEventHandler("MailExport", "OnSendMail", {|aParams|AppSendMail(aParams)})
where AppSendMail() is my custom function.
Spirin explained that functionality in his group:
https://groups.google.com/d/msg/fastrep ... arbour/OTh 8XLo_kc4/0MqksEYG2ckJ
Aleksandar Ili?
Software developer
Wings Software
http://www.wings.rs
a.ilic
Mensajes: 37
Registrado: Vie Sep 27, 2013 1:13 am

SetEventHandler

Mensaje por a.ilic »

Still no answer. Are there any indices that event handlers will be supported in future versions?
Aleksandar Ili?
Software developer
Wings Software
http://www.wings.rs
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9252
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

SetEventHandler

Mensaje por ignacio »

Dear Sir,
Sorry for not answering before. I thought it was already answered.
We do not plan support that SetEventHandler method because we believe is a awkward way to work, Please consider to use the export to mail method and use the method SetProperty to set any of the filter parameters.
Example:
WITH OJBECT ::oFastReport1
:SetProperty( "MailExport", "Address", "..." )
:SetProperty( "MailExport", "Subject", "..." )
:SetProperty( "MailExport", "Lines", "..." )
:SetProperty( "MailExport", "FromMail", "..." )
:SetProperty( "MailExport", "FromName", "..." )
:SetProperty( "MailExport", "FromCompany", "..." )
:SetProperty( "MailExport", "Signature", "..." )
:SetProperty( "MailExport", "SmtpHost", "..." )
:SetProperty( "MailExport", "Login", "..." )
:SetProperty( "MailExport", "Password", "..." )
:DoExport( "MailExport" )
END WITH
BTW, if you use the standard FR for [x]Harbour libraries you will need to download again the demo which includes new libraries and a new FRX.DLL.
In case you wan to to use it with Xailer you must wait until next revision since actually there is a bug on the SetProperty method.
Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
a.ilic
Mensajes: 37
Registrado: Vie Sep 27, 2013 1:13 am

SetEventHandler

Mensaje por a.ilic »

ignacio wrote on Mon, 21 October 2013 19:31Please consider to use the export to mail method and use the method SetProperty to set any of the filter parameters.
Example:
WITH OJBECT ::oFastReport1
:SetProperty( "MailExport", "Address", "..." )
:SetProperty( "MailExport", "Subject", "..." )
:SetProperty( "MailExport", "Lines", "..." )
:SetProperty( "MailExport", "FromMail", "..." )
:SetProperty( "MailExport", "FromName", "..." )
:SetProperty( "MailExport", "FromCompany", "..." )
:SetProperty( "MailExport", "Signature", "..." )
:SetProperty( "MailExport", "SmtpHost", "..." )
:SetProperty( "MailExport", "Login", "..." )
:SetProperty( "MailExport", "Password", "..." )
:DoExport( "MailExport" )
END WITH
Dear Ignacio,
Thank you for a quick answer.
I'm aware of this option, but it won't let me to overcome the following situation. When user clicks on send mail icon in preview window, report should be exported to PDF, and then attached and sent via MAPI. This is just one usage example.
So what is needed is the possibility to set OnClick event on some export button(s), and then manually do the export and some other custom operations which may needed to be done.
Regards,
Aleksandar Ili?
Software developer
Wings Software
http://www.wings.rs
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9252
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

SetEventHandler

Mensaje por ignacio »

Hello,
Next FR for Xailer revision can show preview on Xailer forms and you can create your own toolbar.
Regards,
Ignacio Ortiz de Zúñiga
[Equipo de Xailer / Xailer team]
https://www.xailer.com
a.ilic
Mensajes: 37
Registrado: Vie Sep 27, 2013 1:13 am

SetEventHandler

Mensaje por a.ilic »

ignacio wrote on Tue, 22 October 2013 21:36Next FR for Xailer revision can show preview on Xailer forms and you can create your own toolbar.
Hi,
What about [x]Harbour users?
Regards,
Aleksandar Ili?
Software developer
Wings Software
http://www.wings.rs
Responder