Re: patch, problems, question
Bob Doan <bdoan-J0aWFLYJOWhWk0Htik3J/[email protected]> Fri, 13 May 2005 15:59:52 -0400
| Newsgroups | gmane.text.rlib.user |
|---|---|
| Message-ID | <1116014393.17688.27.camel@term001> |
Hey dude,
> That would be fantastic.
>
> I'm no authority on the Zend PHP API - luckily calling user functions
> appears to be documented here:
>
> http://www.php.net/manual/en/zend.calling-user-functions.php
I got a present for ya
You can now do something like this:
$rlib = rlib_init();
rlib_version();
rlib_add_datasource_array($rlib, "local_array");
rlib_add_query_as($rlib, "local_array", "data", "data");
rlib_add_report($rlib, "array.xml");
rlib_add_function($rlib, "bobdoan", "bobdoan", 1);
rlib_add_function($rlib, "mikeroth", "mike_roth", 2);
rlib_set_output_format_from_text($rlib, "pdf");
rlib_execute($rlib);
header(rlib_get_content_type($rlib));
rlib_spool($rlib);
rlib_free($rlib);
function mike_roth($a, $b) {
return "pancakes are yummier then $a and $b";
}
function bobdoan($a) {
return strtoupper($a);
}
And then in the XML do:
<field value="bobdoan(mikeroth('bacon', 'eggs'))" width="50"/>
http://www.sicom.com/~bdoan/rlib-1.3.4.tar.gz
see src/examples/php/array[xml|php] as an example
You owe me a crash fix now ;)
- Bob
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click