Re: FW: [PEAR] FormBuilder with SDG export
| From: | Mark Wiesemann | Date: | Tue, 22 Nov 2005 14:20:05 +0000 |
| Subject: | Re: FW: [PEAR] FormBuilder with SDG export | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-22060@lists.php.net to get a copy of this message | ||
(Fullquote because mail was sent only to me; Prue, please use "Reply All" or just send your messages to the list)
Prue wrote:
Sorry if I'm being obtuse. If I have FormBuilder integration set to ON in the DataObjects configuration then when using SDG, any linked fields will automatically display the linked field's data, eg if in DO clubsfin, the field club_id is linked to DO Club and the linkDisplayField is set to 'name', instead of the club_id appearing in the SDG column, the name of the club will appear. Fabulous providing the output is to the standard SDG renderer, HTML. When outputting to an alternative renderer however, the DO Clubsfin club_id field renders the club_id number as it is in the Clubsfin table - not the name of the club from the Club table, ie: rendering to html: The Club_id record in the html table column displays "Some Club" rendering to xls: The Club_id record in the xls column displays "000000012" rendering to array: The Club_id record (in this case, pdf) column displays "000000012" If I use the function as described below rendering to xls or array outputs "Some Club" where "Some Club" is the linked field of the last record in the dataset, for ALL the records in the dataset. What I want to achieve is that regardless of the renderer, the link field from the originating DO outputs the nominated data from the linked DO for each record.If you get different results with different renderers, then there is either a problem in the way you use the renderers (how do you choose which one is used?) or there is really a bug in the renderers. I haven't seen any problems with the renderers in the latest version of SDG. Please try to make a _minimal_ example that shows different results with different renderers, i.e. try it without FormBuilder (do you get the same effect?), remove unnecessary columns, remove all other unnecessary stuff in your code to reproduce it. If you then still get this weird result, please post the code to this list, so others can try it and maybe can say why it does not work as expected. Mark