From: Werner B. <wer...@zk...> - 2007-06-29 10:35:15
|
I'm new to rlib and don't know how to use a csv file as datasource. What I have done so far using perl: #!/usr/bin/perl use strict; use rlib; my $rlib = rlibc::rlib_init(); rlibc::rlib_add_datasource_csv( $rlib, "data.csv" ); rlibc::rlib_add_report( $rlib, "products.xml" ); rlibc::rlib_set_output_format_from_text( $rlib, "pdf" ); rlibc::rlib_execute( $rlib ); rlibc::rlib_spool( $rlib ); rlibc::rlib_free( $rlib ); exit 0; ------ This results in "No queries added to report". My questions: What is the correct structure of the csv data file? I assume that a header line containing the field names is required. Is this corect? Can you give an example for an XML data file? How can I solve the "No queries to report" problem? I assume that I have to use rlib_add_query_as() but don't know how? Last question: Is there a way to store the generated report in a file? Thanks in advance, Werner |