Finally I found some time to migrate FlexCel 3 to 6.
I installed the new FlexCel but now I see that my Reports continue to run using the old template format and keywords (like, for instance ##qry##field)
Here what I have done to install
1) uninstalled flexcel3
2) installed flexcel6 (the compilation took some time! :) )
3) opened RAD Studio XE4, and then one of my projects: FlexCelReport components not found.
4) close RAD Studio
4) installed flexcel3
5) project clean, build and run.
If I use a Template converted using the utility provided with FlexCel none of the new tags are replaced
What am I doing wrong?
Hi,
I did read the doc about migrating FlexCel3 to 6, evidently I wasn't paying enough attention!
The class (v6) and the component (from v3) have the same name, so it will be a bit tricky to use both of them inside the same form, right?
Are the v3 reports compatible with the pdf export class?
Is v6 fully independent from v3 now?
Hi,
var
Report: FlexCel.Report.TFlexCelReport;
begin
if not SaveDialog.Execute then exit;
Report := FlexCel.Report.TFlexCelReport.Create(true);
try
Report.AddTable(DemoTables);
Report.SetValue('Date', Now);
Report.Run(
TPath.Combine(GetDataPath, 'Range Reports.template.xls'),
SaveDialog.FileName);
finally
Report.Free;
end;
var
Report: TFlexCelReport;
Xls: TXlsFile;
begin
Xls := TXlsFile.Create('template.xlsx', true);
try
Report := TFlexCelReport.Create(true);
try
Report.AddTable(DemoTables);
Report.SetValue('Date', Now);
Report.Run(Xls),
ExportToPdf(Xls);
finally
Report.Free;
end;
finally
Xls.Free;
end;
Thanks Adrian (as always) for the prompt reply.
I started experimenting with v6 reports, just to see if I can convert all my templates to the new technology. I don't like to keep both flexcel 3 and 6, because it would mean to have two different syntax in my xls.
How do you call external functions? In v3 if you have a published Variant function in the form you can call it from the report Run.
Do I have to convert all my functions to TFlexCelUserFunction classes?
Ok thank you very much. I think the migration process won't be so traumatic, after all.
As a side note: the installation process took a couple of hours, is it normal? v3 installs in a blink of an eye...
Normal it isn't: The installation procedure should take a couple of minutes, not a couple of hours. But I've seen reports from other people who had the same situation (I think you can see in this same newsgroup a complain that it took 8 hours) and I really wonder what can make such a big difference.
It doesn't seem to affect the performance of the compiler in my project, so is not a big deal. I don't plan to reinstall FlexCel 6 very often :)
I use RAD Studio inside a VM (VirtualBox). For some reason it slows the compilation time and the auto-completion (especially C++ Builder) but not so much. I have never found why.
If I have any more clues about this I will let you know.