holgerflick/flixaccounting

Add dynamic loading for reports

Closed this issue · 3 comments

Right now, all reports are hard-coded into the source code. If we use RTTI, reports can be looked up dynamically. Based on this, the user interface needs to be loaded as well.

The reason it is not part of the book release is that generating the user interface is a lot of boilerplate code that is off-topic. Also, providing nice button icons would also require some work for the icons to be encoded in base64 or similar in source code.

Might be a good example for Delphi 12 multi-line strings.

I am not sure I undestand what you are talking about, but anyway I will give my opinion. As it should be 😜
So, still know knowing exactly wha this is, I wonder if you can use the existing "MainDemo" in FlexCel for this... at least as a starting point. It just runs (and compiles on the fly) all the demos that are below it. It is all done dinamically so if you add a new folder with a new demo, it will show in the treeview at the left, and you will be able to run it. You can also search for words and find the correct demo.

You can just wipe all FlexCel demos from below it, and put your own on there. Probably not to print on the book, but you can give a URL where they can download this "demo runner" MainDemo is a little old (like 20 years old...) so it could probably use some modernization, specially for the icons, but it works. Maybe you can adapt it to something you can use. We are discussing adopting something like this for all tms demos (see https://github.com/tmssoftware/tms-smartsetup/discussions/121 )

This has nothing to do with FlexCel.

yep, I imagined so :) Still I mentioned it because you might be able to adapt the MainDemo from FlexCel to your demos, or get ideas from it. It does exactly that, but lists the demos in a treeview instead of adding buttons.