Print en CVS output

A place for users and developers of the Xataface to discuss and receive support.

Postby 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
 
Posts: 13
Joined: Wed Dec 31, 1969 5:00 pm

Postby 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"> 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
sym
 
Posts: 13
Joined: Wed Dec 31, 1969 5:00 pm

Postby 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
zopemgr
 
Posts: 66
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 23 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved