Page 1 of 1

Fastreport y PDF sin pasar por un PREVIEW (SOLUCIONADO)

PostPosted: Wed Mar 06, 2013 9:36 pm
by Patricio Avalos Aguirre
Estimados

hay alguna forma de imprimir una archivo de fastreport a pdf sin pasar por vista preliminar que sea directo, ya que necesito enviar ese archivo por mail
sin que el usuario se entere

desde ya muchas gracias

Re: Fastreport y PDF sin pasar por un PREVIEW

PostPosted: Wed Mar 06, 2013 10:07 pm
by jrestojeda
Hola amigo...
Prueba así:

Code: Select all  Expand view
oFr:PrepareReport()
oFr:DOExport("PDFExport")


Espero te sirva.
Saludos, Esteban.

Re: Fastreport y PDF sin pasar por un PREVIEW

PostPosted: Wed Mar 06, 2013 10:13 pm
by joseluisysturiz
Haber si esto te ayuda, saludos... :shock:

////////////////////////////////////////////////////////////////////////
// GetProperty()/ Universal functions that set or return any property
// SetProperty() - (except object property) of any Fast Report object.
// Possible values of sObjectName:
//
// Report, Designer,
// PDFExport, HTMLExport, RTFExport, CSVExport,
// XLSExport, DotMatrixExport, BMPExport, JPEGExport,
// TIFFExport, GIFExport, SimpleTextExport, MailExport
//
// For properties of objects that is property of this
// "main" objects '.'-delimeter must be used. For
// example:
// "Designer.DefaultFont"
//
// For full list of values for sPropName param see Fast
// Report documentation:
// http://www.fast-report.com/en/documentation/
//
// Examples:
// SetProperty("Report", "ScriptLanguage", "PascalScript")
// SetProperty("PDFExport", "FileName", "My file.pdf")
// SetProperty("PDFExport", "ShowDialog", .f.)
//
// For Delphi enumerated types and set type use its
// string representation, for example:
// SetProperty("Designer.DefaultFont", "Style", "[fsBold, fsItalic]")
//
////////////////////////////////////////////////////////////////////////

METHOD SetProperty(sObjectName, sPropName, Value) class frReportManager
MEMVAR tmp_Param
PRIVATE tmp_Param := Value
RETURN Call_Func_CC_I(::_SetProperty, sObjectName, sPropName) == 1

Re: Fastreport y PDF sin pasar por un PREVIEW

PostPosted: Wed Mar 06, 2013 10:34 pm
by nnicanor
Para enviar directamente a PDF
Code: Select all  Expand view


   cFilenamePdf := "Prueba.pdf"

    oFr:SetProperty("PDFExport", "FileName", cFileNamePdf )
    oFr:SetProperty("PDFExport", "EmbeddedFonts", .t.)
    oFr:SetProperty("PDFExport", "PrintOptimized", .t.)
    oFr:SetProperty("PDFExport", "Creator", "Sistema Uno version 2.0")
    oFr:SetProperty("PDFExport", "OpenAfterExport", .t.)
    oFr:SetProperty("PDFExport", "ShowDialog",.f.)
    oFr:PrepareReport()
    oFr:DoExport("PDFExport")
 



Slds

Re: Fastreport y PDF sin pasar por un PREVIEW

PostPosted: Thu Mar 07, 2013 12:17 pm
by Patricio Avalos Aguirre
Hola

Muchas gracias a todos, funciona perfectamente

Re: Fastreport y PDF sin pasar por un PREVIEW (SOLUCIONADO)

PostPosted: Mon Mar 07, 2016 5:05 pm
by CARLOS ATUNCAR
Saludos,
Algun ejemplo para exportar a Word

Re: Fastreport y PDF sin pasar por un PREVIEW (SOLUCIONADO)

PostPosted: Tue Mar 08, 2016 1:28 pm
by Patricio Avalos Aguirre
Hola

Segun el manual estos son las salidas que soporta, puede que tenga mas ya que tengo una versian antigua
:DoExport(<cExportObjectName>)
Exports a report using the specified export filter object.
Parameters: <cExportObjectName> - character string containing the name of filter object.
Possible value one of:
"PDFExport", "HTMLExport", "RTFExport", "CSVExport", "XLSExport",
"DotMatrixExport", "BMPExport", "JPEGExport", "TXTExport",
"TIFFExport", "GIFExport", "SimpleTextExport", "MailExport",
"XMLExport", "ODSExport", "ODTExport"
The detailed descriptions of these objects see below.