hi

I try to export data to excel or pdf format on the server side, but I always get empty files.
code.rar (990 Bytes)

for notice : using client side work good

Hi.
Try to turn on logging:

$grid=new GridConnector($connt);
$grid->enable_log('log.txt');

After that try to export one more time. Log file will apper. Could you attach it here?

====================================
Log started, 23/11/2011 11:11:19

SELECT * FROM desktops LEFT JOIN type_marque ON desktops.marque=type_marque.id_marque LEFT JOIN departements ON desktops.departement=departements.id WHERE ( id_desktops IN(1,2,3)) ORDER BY id_desktops ASC

Done in 2.2582111358643s

Please, open file generate.php in export script and set $debug = true;
After that try to export one more time.
New file with name ‘debug_xx_xx_xx.xml’ will appear in directory with generate.php.
Attach it here, please.

$debug = true; ==> already set.

  1. export from client side work good (see attach file)

  2. the problem when i try to export directly from server side → nothing happend
    no bu gfile
    export empty file (pdf or excel)
    debug_2011_11_23__11_21_40.rar (4.06 KB)

:unamused:
empty file = 0 octets

Please, try to update convert.php. It contains a little of debug-code.
What does script return after updating?
convert.zip (890 Bytes)

sorry no changes

Please, revert convert.php and add into code.php the follow line in the beginning:

error_reporting(E_ALL);

Make sure that cURL extension is turned on in php.ini:

extension=php_curl.dll
  1. extension=php_curl.dll ==> already activate
  2. error_reporting(E_ALL);

==> nothing happen

Try to update convert.php one more time.
After updating it should output debug information.
Do you still have empty page?

Are you using php connector version 1.0?
convert.zip (895 Bytes)

hi

yes i am using php connector v1.0

I edit the file, and I get the following message ==> bool(false)

Please, modify file convert.php like here:

echo curl_error($handle)." errno: ".curl_errno($handle);
$out->add($response);
var_dump($response);
die();
...

What does script output?

Could not resolve host: …; Host not found errno: 6bool(false)

Ohh, yes. You have to specify the whole url here:

$convert = new ConvertService("../../resources/lib/dhtmlxGrid/excel-php/generate.php");	

i.e. somthing like this:

$convert = new ConvertService("http://somedomain/project/resources/lib/dhtmlxGrid/excel-php/generate.php");	

its work thx lot.

but :

$config->setHeader(“C.B,Marque,Projet,Derniere M.a.J,#cspan”);
$config->attachHeader(“#rspan,#rspan,#rspan,Date,Description”);

the header is not properly exported
some(44).rar (5.85 KB)

AND when i try to open the file exported i get this message :

the file format you are trying to open is different from that specified by the file extension. Make sure the file is not damaged and that comes from a reliable source

attech header export not working in server side export


Here is one more convert.php update.
It will process tag into correct format.
Convert script doesn’t support rowspan/colspan in header/footer.
convert.zip (1.09 KB)