I have one report to show information in PDF and Excel format.
In the PDF the PageHeader and PageFooter its ok but in Excel I don´t
want it
I know I could have two versions of the same report, but is it
possible to use the same report for PDF and Excel removing the
PageHeader and PageFooter when I send it to Excel?
Thanks
Williams Pacheco
You do export in code or in the preview?
---
Sergey Spirin.
FastReport for Xbase-family languages,
http://www.spirins.com
I do export from code
> I do export from code
Ok. At this case there is no problem. Fore example:
1. Add variable to report, for example cCurrentExport, give it
initial value, for example 'None'.
2. At your function:
IF (CurExport = "XLSExport") .or. (CurExport = "BIFFExport")
oFr:AddVariable("MyVars", "cCurrentExport", "'" + "XLSExport" +
"'")
oFr:DoExport(....)
ENDIF
3. And at BeforePrint-event of PageHeader:
procedure PageHeader1OnBeforePrint(Sender: TfrxComponent);
begin
PageHeader1.Visible := (<cCurrentExport> <> 'XLSExport') and
(<cCurrentExport> <> 'BIFFExport');
end;
Of course, you can do not add variable but read it from your
application with GetHbVar() etc.
---
Sergey Spirin.
FastReport for Xbase-family languages,
http://www.spirins.com
It´s works!
Now I want to disable the cell filled.
Right now it´s white but I want the default Excel filled (No Fill)
Thanks again
Regards
Williams Pacheco
> Now I want to disable the cell filled.
> Right now it´s white but I want the default Excel filled (No Fill)
What? Sorry I do not understand you, please, a litle bit more in
detail. And I begin suspect that you have something another than I
advised :))
--- Sergey Spirin. FastReport for Xbase-family languages, http://
www.spirins.com
I will explain better in a new post related to MS Excel
Thanks
Williams Pacheco