hello,
I'm just starting out with FlexCell so please excuse me if these are very basic questions.
First, I would like to know where I can find some sample for the "reporting" system that I read about. Right now, I'm merging several excel spreadsheets, doing text replacement on each one.
That (kind of) works but it seems clunky and delicate for the end user to manage: the detection for where to stop copying cells from one document to another is very brittle and the user have to manage a LOT of template files (my data structure is tree with 4 level of depth: each element except the leaves have a header and trailer template Excel, plus one general template for the "base" document, plus one for the actual leaves items). The data is loaded from am XML document.
I was hoping that the reporting system would help me clarify and simplify this whole mess but I cannot find any samples for this or reference in the documentation (I'm using the latest version, freshly downloaded and installed).
The second question I have is about using the library inside a Dll. The documentation requests that the initialization and finalization functions (FlexCelDllInit and FlexCelDllShutdown) be called from the calling process. How does that work when the calling process is outside my control ?
Specifically, I'm thinking of using and ISAPI dll inside the IIS web server and I typically have limited control over how the ISAPI dll is loaded have to leave the dll initialization code to the framework.
Thanks
Hi,
Sadly the reporting engine isn't available in FlexCel 6 yet. I hoped it would be available by the 6.0 release, but it wasn't possible so it got pushed for later. Now the docs (and the report converter from FlexCel 3 to 6) do make mention of the reporting engine, because we decided that going through all the effort to remove all mentions to it only to readd everything again once it is finally released wasn't worth it.
FlexCel 3 (which is available in the registered users page, below FlexCel 6) does have a reporting engine, but it is much more limited than the v6 engine. Even so, it is usable, and you can use it with the FlexCel 6 xls/x engine (by using TXlsxAdapter in v3)
I am also not 100% sure if the reporting engine is what you are looking for, but if you want to get an idea on how it works, you can read the FlexCel.NET docs:
And you can also get an idea of the feature from the FlexCel.NET features:
Of course not everything will be available in Delphi (not LINQ support for example, but we might support TMS Aurelius instead). But more or less and despite the little different, the new reporting engine coming will be almost identical to the one in FlexCel.NET.
We are trying to have the v6 reporting engine ready as soon as we possible can, but there is some work to do still, and lots of testing.
About FlexCelDllInit and FlexCelDllShutdown, those basically call GdiplusInit / Shutdown in Windows, and do nothing elsewhere (ios, android, osx, etc). In the future they might do more stuff than calling GdiPlusStartup in windows, but that's all they do today.
And the reason we need to include those methods is, form this page:
So, the real issue is that we can't do:
initialization
GdiPlusStartup;
finalization
GdiplusShutdown;
end.
in any of our units, and neither can you if your final product is a dll. (as in the case of an ISAPI). This code can't be inside DllMain, and initialization/finalization sections in Delphi go inside DllMain.
But you can do:
procedure CreateReport;
begin
FlexCelDllInit;
try
AllTheCodeThatUsesFlexCel;
finally
FlexCelDllShutdown;
end;
end;
You might call it many times also, that is have a CreateReport2 that does the same. The only important thing is that you call shutdown for every init, and that you don't put those calls in DllMain (initialization/finalization). So the right place to put them is before and after calling the FlexCel code.
Thank you for your detailed explanation.
Honestly, the system I've implemented works so, as far as I'm concerned, I can live with it until the reporting engine is released without problems. I was just wondering what I missed.
As for the use of FlexCell inside a dll, thank you also for the detailed explanation: it's not very clear what I can and need to do.