hi


#1

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


#2

for notice : using client side work good


#3

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?


#4

====================================
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


#5

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.


#6

$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)


#7

:unamused:
empty file = 0 octets


#8

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


#9

sorry no changes


#10

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

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

==> nothing happen


#12

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)


#13

hi

yes i am using php connector v1.0

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


#14

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?


#15

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


#16

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");	

#17

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)


#18

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


#19

attech header export not working in server side export



#20

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)