Dynamic heading(column names) and content in report

Asked by jai_python on 2010-10-30

Hi friends,
    I need to generate dynamic heading(column names) and content. Here the number of columns is not static, since end user will select the required column before taking the report.

Say for example:
 -----------------
We have some data in html page with following fields.
    ID | Name | Age| DOB| Class | Mark
For general report we can show the entire column in report. If end user need only ID,Name & Age,(which is selectable) then report should contain only the selected fields. So here we have to gerate dynamic reports based on selected field name. How can we do it? Normally we use ``do row`` syntax to print all the entry. How can we do in dynamic table heading and its value?

Thanks for your time take to read my thread.

Jayapal

Question information

Language:
English Edit question
Status:
Answered
For:
Appy Edit question
Assignee:
No assignee Edit question
Last query:
2010-10-30
Last reply:
2010-11-15

Hi!
Did you try the "do cell" statement, that allows to repeat cells instead of entire rows? This is the first option you should consider.
If it does not fit your need, you will reach the limit of what appy.pod can do for you... BUT!

Pod has still a surprise for you. With a statement like "do <somePart> from odtCode()" you can insert any "raw" ODT code into your document (as a string returned by function "odtCode" in this case). You will tell me: it seems to be hard to generate raw ODT code. It is a little more complex than generating an HTML table, but not so much. Check classes "QualitiesTable" or "AnalysisTable" at this URL: http://bazaar.launchpad.net/~pure-dev/pure/trunk/annotate/head%3A/PuRe/Procurement.py .

Maybe one day I will provide such classes (Table, Row, Cell,Paragraph...) directly into POD, or integrate with libraries that already provide such elements allowing to programmatically include ODT chunks, like ODFPY (http://opendocumentfellowship.com/projects/odfpy).

Hope this helps,
Gaetan

Can you help with this problem?

Provide an answer of your own, or ask jai_python for more information if necessary.

To post a message you must log in.