|
|
Home » Developing U++ » UppHub » Very Simple Report Generator (Use QTF format)
Re: Very Simple Report Generator (Use QTF format) [message #24187 is a reply to message #24140] |
Sun, 03 January 2010 23:09 |
Didier
Messages: 683 Registered: November 2008 Location: France
|
Contributor |
|
|
Sergey,
I finally have a working example that manages the following points:
* Header/body/footer management
* nesting anywhere and with no limitations (you nest/nest/nest ...)
* body looping is managed outside the user code
==> The user code is therefore greatly simplified
* text replacement is managed automatically even when when a part
is separated into several parts due to nesting
==> all you have to do is reference the text replacements you
want to do and they will be done
In order to help the coding of the user code, an annotated template can be generated:
It is annotated with the context information (see example below).
The code isn't finished so there are some restrictions for the moment:
* no table (row adding)management
* bad management of bullets (line adding)
The tags used are the following:
##H : Section start (and HEADER start)
##B : Section part BODY start (and also end of HEADER)
##F : Section part FOOTER start (and also end of HEADER or BODY)
##E : Section END (and also end of previous section part)
##H and ##E MUST BE present, the other two are optional !
Here is a screen-shot of the example application
[Updated on: Mon, 04 January 2010 11:38] Report message to a moderator
|
|
|
|
Re: Very Simple Report Generator (Use QTF format) [message #24196 is a reply to message #24188] |
Mon, 04 January 2010 12:29 |
|
Didier!. I looked at your code. It seemed to me that you're too complicated. Of course there may be problems which need such a decision.
I set the goal for their generators are somewhat different:
- Transparency and simplicity of the client code,
- Transparency and understandability document template,
- NOT a universal code for different types of reports
(the scheme and the availability of data groups and totals should be set in the client code, but not in the template)
It is necessary for very simple printed forms (documents, calculations, etc.)
I think that for a little more complex forms of documents, this scheme is not suitable.
I think that the QTF format is not designed for storing various information such as schema report, and it would be better to make some QTR format in which to store templates of the report, data schemas and calculation schemes.
To implement the format QTR (in contrast to the QTF) need a template editor and editor of data schemas. This is a problem. May need to take a closer look in the direction RichPara.
As for my version, the next step I plan to make a store QTF templates in SQL database, and a set of controls for easy embedding in the application of a simple reports system.
SergeyNikitin<U++>( linux, wine )
{
under( Ubuntu || Debian || Raspbian );
}
|
|
|
Re: Very Simple Report Generator (Use QTF format) [message #24200 is a reply to message #24196] |
Mon, 04 January 2010 14:22 |
Didier
Messages: 683 Registered: November 2008 Location: France
|
Contributor |
|
|
Thank's for looking my version of Report Generator.
sergeynikitin wrote on Mon, 04 January 2010 12:29 | Didier!. I looked at your code. It seemed to me that you're too complicated. Of course there may be problems which need such a decision.
|
My example is more complicated only because I added nested groups with header/body/footer
and because my template document is completely filled with TAGs and replacement vars (not a lot of real text to catch on to)
Quote: |
I set the goal for their generators are somewhat different:
- Transparency and simplicity of the client code,
- Transparency and understandability document template,
- NOT a universal code for different types of reports
(the scheme and the availability of data groups and totals should be set in the client code, but not in the template)
|
If the user code manages all the groups and body repetition, the user code will drag in unnecessary complexity. for ex. managing repetition is always necessary so why not doing it once for all ?
Quote: |
It is necessary for very simple printed forms (documents, calculations, etc.)
|
Nesting comes in handy very quickly, and to be honest I need it for my spearfishing app (to print out competition results).
Quote: |
I think that for a little more complex forms of documents, this scheme is not suitable.
I think that the QTF format is not designed for storing various information such as schema report, and it would be better to make some QTR format in which to store templates of the report, data schemas and calculation schemes.
To implement the format QTR (in contrast to the QTF) need a template editor and editor of data schemas. This is a problem. May need to take a closer look in the direction RichPara.
|
Yes I agree. But this way is the long way and it will take a lot of time to go!
Quote: |
As for my version, the next step I plan to make a store QTF templates in SQL database, and a set of controls for easy embedding in the application of a simple reports system.
|
Great !
On my side I'm gonna push in tables and bullets so that it can be usable for almost anything.
At least it will be available while waiting for a better and more complete solution.
( Until now I was generating reports by using RichText or by assembling QTF strings, so when I wanted to change a color or the global appearance it was not easy. And the user code, in this case was VERY complicated !! )
|
|
|
|
Re: Very Simple Report Generator (Use QTF format) [message #24243 is a reply to message #24233] |
Thu, 07 January 2010 05:49 |
|
No problem! That's all you can do in the Callbacks.
The idea is interesting, I'll try to think how this can be done more beautifully and transparently.
Perhaps the introduction of parameters will be the best.
SergeyNikitin<U++>( linux, wine )
{
under( Ubuntu || Debian || Raspbian );
}
|
|
|
Re: Very Simple Report Generator (Use QTF format) [message #24283 is a reply to message #24243] |
Fri, 08 January 2010 17:53 |
|
Hello Luigi!
And why not make some IMAGEs, for example IMAGE_1, IMAGE_2, IMAGE_3. Or for example IMAGE_TINY, IMAGE_SMALL, IMAGE_MEDIUM, IMAGE_LARGE, IMAGE_XXL and so on. I think this is fundamentally solve the problem. To do this, Callback, we simply declare the different challenges PlaceImage with different sizes.
The only flexible way, which I see is the definition of additional methods
- SubstVar1 (SubstVar with one parameter)
- SubstVar2 (SubstVar with two parameters)
- SubstVar3 (SubstVar with three parameters)
and
- PlaceImage1 (SubstVar with one parameter)
- PlaceImage2 (SubstVar with two parameters)
- PlaceImage3 (SubstVar with three parameters)
But this is still only plans.
SergeyNikitin<U++>( linux, wine )
{
under( Ubuntu || Debian || Raspbian );
}
|
|
|
Re: Very Simple Report Generator (Use QTF format) [message #24288 is a reply to message #24283] |
Fri, 08 January 2010 20:04 |
|
forlano
Messages: 1202 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
sergeynikitin wrote on Fri, 08 January 2010 17:53 | Hello Luigi!
And why not make some IMAGEs, for example IMAGE_1, IMAGE_2, IMAGE_3. Or for example IMAGE_TINY, IMAGE_SMALL, IMAGE_MEDIUM, IMAGE_LARGE, IMAGE_XXL and so on. I think this is fundamentally solve the problem. To do this, Callback, we simply declare the different challenges PlaceImage with different sizes.
The only flexible way, which I see is the definition of additional methods
- SubstVar1 (SubstVar with one parameter)
- SubstVar2 (SubstVar with two parameters)
- SubstVar3 (SubstVar with three parameters)
and
- PlaceImage1 (SubstVar with one parameter)
- PlaceImage2 (SubstVar with two parameters)
- PlaceImage3 (SubstVar with three parameters)
But this is still only plans.
|
Hello Sergey,
I like the idea of IMAGE_TINY, IMAGE_SMALL, ecc... Perhaps these sizes can be hardcoded by #define and the coder can set them according the purpose of his program.
Luigi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Fri Sep 20 03:48:07 CEST 2024
Total time taken to generate the page: 0.05333 seconds
|
|
|