Print en CVS output

Archived from the Xataface Users forum.

sym — Fri Jun 30, 2006 8:39 am

I have 2 questions about the screen/file output.

  • Is it possible to make a screen output with only the table, for a hardcopy
    (without the html-header and the left-menu) ?

  • Is it possible to save the table to a csv file (as input for other applications) ?

Greetings,
Nico Sijm


sym — Mon Jul 03, 2006 4:40 am

In the mean time i tried this :

The steps:
1) In the template Dataface_TableView.html i add:

_currentTable}’,’win2’,’status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no, resizable=yes,width=640,height=480, directories=no,location=no’);” title=”Print”>

2) Create the print,php file:

This is the same as the index.php file but add the next lines before the display routine:

$app =& Dataface_Application::getInstance();
$conf = array();
$conf = array_merge(parse_ini_file(‘conf_small.ini’, true), $conf);
$app->_conf = $conf;

3) Define the conf_small.ini file
hide_search=”1”
hide_view_tabs=”1”
hide_table_result_stats=”1”
hide_result_controller=”1”
hide_nav_menu=”1”

Almost everyrhing works.. except:

  • There is no ‘hide_logo’ keyword no ‘hide_ global_footer” keyword.
    so the logo and the footer are displayed.
    I can make a version with a differend template definition.

Is it handy to build this possibility in dataface ?

Greetings,
Nico


zopemgr — Mon Jul 03, 2006 11:52 pm

This looks like a good workaround. The new version 0.6 has this ability built-in, but your solution looks fine. You can add flags to disable the global footer etc.. by wrapping them in {if !$ENV.APPLICATION.hide_global_footer} …{/if} etc.. and setting a hide_global_footer property in the ini file.

Best regards

Steve