Page 1 of 1

FastReport

PostPosted: Sat Nov 28, 2009 8:33 pm
by Kleyton
Dear, friends

I can tell 3 titles via PRG, can you please tell me how?

Waiting, thanks.

Code: Select all  Expand view

Function Main(_desig_, _arq_, _fastRep_, _tit01_, _tit02_, _tar01_, _arai_ )
local oWnd, oFrPrn
usuario := "ADM"

if empty(_arq_)
   quit
Endif

REQUEST DBFCDX
use (_arq_) alias tmp
tmp->( browse() )

oFrPrn := frReportManager():new()
oFrPrn:SetTitle( "Teste Title not visible in relat  1" )         //título da janela do FRH
oFrPrn:SetIcon(1)                                                     //ícone da janela do FRH
oFrPrn:LoadLangRes( "brazil.xml")                            //arquivo de idioma
oFrPrn:SetWorkArea("tmp", 1 )
oFrPrn:SetTitle( "Teste Title not visible in relat 2" )         //título da janela do FRH
oFrPrn:SetDefaultFontProperty("Name", "Lucida Console")
oFrPrn:SetDefaultFontProperty("Size", 08)

oFrPrn:LoadFromFile(_fastRep_)                           // para leitura direta de arquivo FR3
*oFrPrn:LoadFromResource('NOVO')                       // leitura dos recursos do relatório ( FR3 ) incluído no arquivo RES

oFrPrn:PreviewOptions:SetAllowEdit( .t. )             // inibe o botão de edição do relatório pelo usuário

if _desig_="S"
   oFrPrn:DesignReport()                        // aqui para "desenhar" o relatório
else
   oFrPrn:ShowReport()                       // aqui para gerar o preview do relatório.
endif

oFrPrn:DestroyFR()


RETURN NIL

 

Re: FastReport

PostPosted: Sun Nov 29, 2009 9:18 am
by Otto
Maybe you can use AddVariable.

Code: Select all  Expand view

 _tit01_   := "Demo Title_tit01_"
 _tit02_  := "Demo Title_tit02_"
 _tar01_  := "Demo Title_tar01_"


oFrPrn:AddVariable( "TITOL", "cTitol1", "'" + _tit01_ +"'")
oFrPrn:AddVariable( "TITOL", "cTitol2", "'" + _tit02_ +"'" )
oFrPrn:AddVariable( "TITOL", "cTitol3", "'" + _tar01_ +"'" )
 


Best regards,
Otto

Image

Image

Re: FastReport

PostPosted: Sun Nov 29, 2009 1:48 pm
by Kleyton
Thanks, Otto

Putting the field ReportTitle, will leave only on page one?

Now if I put in the "PageHeader" will go on every page, is it?

Re: FastReport

PostPosted: Sun Nov 29, 2009 4:50 pm
by Kleyton
I need to get the company logo and play in space and size set for her.

Playing directly from the designer fastreport is easy, I want to check for example C: \ LOGO \ LOGO.JPG, i will not need to be altering the logo for each company.

Re: FastReport

PostPosted: Sun Nov 29, 2009 6:44 pm
by Otto
Hello Kleyton,

You can insert a page which you use as your title page.
This prints a own page. If you want the title inside your first page change on this page

PrintOnPriviousPage to true.

Best regards,
Otto

Image

Image

Image

Re: FastReport

PostPosted: Sun Nov 29, 2009 7:40 pm
by Kleyton
Tank you, soluction found.

Re: FastReport

PostPosted: Sun Nov 29, 2009 7:45 pm
by Otto
Hello Kleyton,
Best regards,
Otto

Code: Select all  Expand view
oFr:AddVariable( "FIRMA", "Logo", "'C:\xwinhotel\LOGO\Logo.jpg'" )


Image


Image

Re: FastReport

PostPosted: Sun Nov 29, 2009 8:06 pm
by Kleyton
Hello Otto, tanks for help, got what I needed, see below.

Look at the field "filelink", see below.

Image

Tank you !!!

Re: FastReport

PostPosted: Sun Nov 29, 2009 8:11 pm
by Kleyton
Otto, Sorry, I posted my message and had not seen his last.

It will help me a lot, thanks.

Re: FastReport

PostPosted: Sun Nov 29, 2009 8:23 pm
by Otto
Hello Kleyton,

today I was searching some time to find out how to use the “Outline feature”.

Select “Report” then change OutlineVisible to True

Best regards,
Otto

Image

Image

Image

Re: FastReport

PostPosted: Sun Nov 29, 2009 8:43 pm
by Kleyton
My version is different, in Portuguese of Brazil. Version 4.8.33. Not found.
Then I look more calmly.

Thank you.