From: Bob D. <bd...@si...> - 2005-03-23 17:19:18
|
Derek > I have one more query. PHP in 1.3.1 has access to rlib_add_datasource_array, > which allows locally stored data to be used in a report, but C in the same > version does not. Is this function available in 1.3.2 API? 1st No one has wanted it yet 2nd It's a little trickier to implement in a generic way because in c you don't know the bounds of the array. 3rd It's easy to implement a input custom provider. You need to implement these methods: (rlib_input.h) typedef struct input_filter input_filter; struct input_filter { gpointer private; struct input_info info; gint (*input_close)(gpointer); gpointer (*new_result_from_query)(gpointer, gchar *); gint (*free)(gpointer); gint (*first)(gpointer, gpointer); gint (*next)(gpointer, gpointer); gint (*previous)(gpointer, gpointer); gint (*last)(gpointer, gpointer); gint (*isdone)(gpointer, gpointer); const gchar * (*get_error)(gpointer); gchar * (*get_field_value_as_string)(gpointer, gpointer, gpointer); gpointer (*resolve_field_pointer)(gpointer, gpointer, gchar *); void (*free_result)(gpointer, gpointer); gint (*set_encoding)(gpointer); }; See MySQL, ODBC, PostgreeSQL as example. Other people have posted to the list input providers (someone did a XML but didn't sign the copyright :( ) Then you call rlib_add_datasource(r, "SOME_NAME", input); And away you go. - bob > > Cheers, > --Derek > > > ------------------------------------------------------- > This SF.net email is sponsored by Microsoft Mobile & Embedded DevCon 2005 > Attend MEDC 2005 May 9-12 in Vegas. Learn more about the latest Windows > Embedded(r) & Windows Mobile(tm) platforms, applications & content. Register > by 3/29 & save $300 http://ads.osdn.com/?ad_id=6883&alloc_id=15149&op=click > _______________________________________________ > Rlib-users mailing list > Rli...@li... > https://lists.sourceforge.net/lists/listinfo/rlib-users -- Bob Doan <bd...@si...> |