Hi.
I have two DB Multi Record loaders linked to retrieve data from two tables using a left join.
I need export data in excel using XLS_export action, but I don't know how to reference fields from the second DB Loader.
First DB Multi record loader have this config:
DB Field: Empty (Retrieve all records)
Table ....acciones_comerciales....
Request Param: cf_id (not needed)
Model ID: acc
Fields: Empy (All fields)
Load Data: Yes, Data Load Type=All, Enable Associations=Yes, Join Type=INNER, Join rule: acc.establecimiento_ac=est.nombre_establecimiento, Associated models: est
, and Group Model Data=Yes.
On second DB Multi Record loader I have a similar config, using a Model ID named "est" , and played with "Group data model" and "Associated models" in order to "merge" data in an accesible data structure.
I need export data from both loaders (tables), using xls_export, but this only accepts one ModelID. I use "acc", and all the records and fields are exported except those contained in "est" array.
Debug shows this: (shortened 馃檮 )
How can I put the field name in xls_export field list for both structures of data? I have tested several ways, without luck.
xls_export config:
Data path: acc
Field list:
establecimiento_ac,maquina_ac,poblacion_establecimiento
establecimiento_ac and maquina_ac (from acc) both works ok.
poblacion_establecimiento are in est, so returns empty.
The query, executed in phpmyadmin for example, works like a charm, with all the info.
驴Can somebody help me?
thanks
I have two DB Multi Record loaders linked to retrieve data from two tables using a left join.
I need export data in excel using XLS_export action, but I don't know how to reference fields from the second DB Loader.
First DB Multi record loader have this config:
DB Field: Empty (Retrieve all records)
Table ....acciones_comerciales....
Request Param: cf_id (not needed)
Model ID: acc
Fields: Empy (All fields)
Load Data: Yes, Data Load Type=All, Enable Associations=Yes, Join Type=INNER, Join rule: acc.establecimiento_ac=est.nombre_establecimiento, Associated models: est
, and Group Model Data=Yes.
On second DB Multi Record loader I have a similar config, using a Model ID named "est" , and played with "Group data model" and "Associated models" in order to "merge" data in an accesible data structure.
I need export data from both loaders (tables), using xls_export, but this only accepts one ModelID. I use "acc", and all the records and fields are exported except those contained in "est" array.
Debug shows this: (shortened 馃檮 )
[event] => submit
[input_submit_1] => Generar archivo Excel (HTML)
[1abc5c4968943952bd9f6e12bb5c9808] => 1
[acc] => Array
(
[0] => Array
(
[cf_id] => 9
[cf_uid] => f7cb467a50dab907814304ce4b68606b
[cf_created] => 2013-06-24 02:01:39
[cf_modified] => 0000-00-00 00:00:00
[cf_created_by] => 659
[cf_modified_by] => 0
[cf_ipaddress] => 62.97.109.226
[cf_user_id] => 659
[establecimiento_ac] => Mes贸n El Castillo Negro
[maquina_ac] => 4356
[diacierre_ac_i] =>
[personasformadas_ac_i] =>
[totalformados_ac_i] =>
[dificultadesinst_ac_i] =>
[nosabecambio_ac_c] =>
[incidenciasnoreportadas_ac_c] =>
[est] => Array
(
[0] => Array
(
[cf_id] => 1
[cf_uid] => e607a4f214c1a7306c18653e861e08db
[cf_created] => 2013-06-16 05:55:39
[cf_modified] => 2013-06-20 05:44:42
[cf_created_by] => 627
[cf_modified_by] => 627
[cf_ipaddress] => 87.216.119.88
[cf_user_id] => 627
[tipo_establecimiento] => Bar
[nombre_establecimiento] => Mes贸n El Castillo Negro
[direccion_establecimiento] => C/ Sep煤lveda, 7
[poblacion_establecimiento] => Madrid
[provincia_establecimiento] => Madrid
[cp_establecimiento] => 28080
[contacto_establecimiento] => Pepe P茅rez
)
)
)
etc...
How can I put the field name in xls_export field list for both structures of data? I have tested several ways, without luck.
xls_export config:
Data path: acc
Field list:
establecimiento_ac,maquina_ac,poblacion_establecimiento
establecimiento_ac and maquina_ac (from acc) both works ok.
poblacion_establecimiento are in est, so returns empty.
The query, executed in phpmyadmin for example, works like a charm, with all the info.
驴Can somebody help me?
thanks
This topic is locked and no more replies can be posted.