This topic is locked
[SOLVED]

 Export Column Order

7/19/2012 8:45:57 PM
PHPRunner General questions
S
Stucco author

Hello,
For some reason when I export to excel using 6.0 it does not pay attention to the export column order I have defined. Instead it exports in the order that the query happens to be written. The order in the csv, word, and xml exports is actually correct. It is only the excel ones that have a problem.
Thanks!!

Sergey Kornilov admin 7/22/2012

I would ask you to post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program. Make sure you supply instructions on reproducing the issue.

S
Stucco author 7/26/2012

This was the solution. Thank you for the excellent support!
Please be aware, I used this for 6.0.

  1. open file C:\Program Files (x86)\PHPRunner6.0\source\include\settings.php in any text editor,

    find the code:

    -------------

    $tdata##@TABLE.strShortTableName##[".inlineEditFields"] = array();

    foreach Fields as @f filter @f.bInlineEdit order @f.nListPageOrder##

    $tdata##@TABLE.strShortTableName##[".inlineEditFields"][] = "##@f.strName s##";

    endfor##

    ------------

    add the code:

    ----------

    $tdata##@TABLE.strShortTableName##[".exportFields"] = array();

    foreach Fields as @f filter @f.bExportPage order @f.nExportPageOrder##

    $tdata##@TABLE.strShortTableName##[".exportFields"][] = "##@f.strName s##";

    endfor##

    -------------

    just after it.


  2. open file C:\Program Files (x86)\PHPRunner6.0\source\include\export_functions.php in any text editor,

    find the code:

    ------------

    $tmpArr = GetFieldsList($strTableName);

    -------------

    replace it with this one:

    -------------

    $tmpArr = GetTableData($strTableName, ".exportFields", array());

    --------------
  3. Run PHPRunner, open your project and make a full build of It (full build checkbox is on the Output tab).