Radicore Forum - RDF feed
https://forum.radicore.org/index.php
Display combined fields on Output3 report
https://forum.radicore.org/index.phpindex.php?t=rview&goto=2702&th=610#msg_2702
I would like to be able to show the fields as a single concatenated name in the report but can't find a way to create the new field.
I have tried using cm_changeConfig - but probably I need the field to exist in field array first? and also tried to use cm_getExtraData to create a new entry in $fieldarray which I could then display but to no avail.
I know I could create another field in the table but that goes against good practice. I wold likje to be able to do this - and other similar operations - on the fly.
Any help much appreciated.]]>VitalSpark2011-04-20T16:01:19-00:00Re: Display combined fields on Output3 report
https://forum.radicore.org/index.phpindex.php?t=rview&goto=2703&th=610#msg_2703
Modifying cm_changeConfig does not sound right to me. If you want to create a new field which concatenates the contents of two or more other fields, or make any other modifications to a field before it is displayed, then the best place for this is would be the _cm_post_getData method. This will allow you to change the contents of $fieldarray just after each record has been read.
Another way wold be to perform the concatenation within the sql SELECT statement.]]>AJM2011-04-21T05:28:31-00:00Re: Display combined fields on Output3 report
https://forum.radicore.org/index.phpindex.php?t=rview&goto=2704&th=610#msg_2704
I ended up editing $sql_select.
I had tried modifying the _cm_post_getData method but this apparently isn't being called for/by the new class (person_report) that I have defined for my report, despite having this in the class.inc file. Also, std.output3.inc seems to use the base table (person) for its data.
Anyway, it's working now.]]>VitalSpark2011-04-21T13:24:43-00:00Re: Display combined fields on Output3 report
https://forum.radicore.org/index.phpindex.php?t=rview&goto=2705&th=610#msg_2705
In order for the _cm_post_getData method in the person_report class to be called the transaction must reference person_report.class.inc and not person.class.inc. If you stepped through with your debugger you would see exactly why the expected class was not being loaded and the expected method was not being called.]]>AJM2011-04-21T17:57:16-00:00