From: Andrew C. <And...@So...> - 2003-10-28 15:15:01
|
Thanks for the ldconfig pointer... that did it! Now, I can get reports to be sent to the browser, but not have it launch a program to read the output (acrobat, ms excel). TXT, HTML, CSV, and PDF all display their data to the browser. The first three are all readable in the browser but that defeats the purpose of the various types. How do I get the example to output to a file so acrobat will pick it up and read it? Same with ms excel for the csv? Thanks again! I cheared when I say the first HTML report display. Andrew |
From: Bob D. <bd...@si...> - 2003-10-31 16:54:34
|
Andrew, Cool... What browser are you using.. RLIB sends out a content-type automatically... if you are using PHP make sure you have the header(rlib_get_content_type( thing in there before the spool - Bob On Tue, 2003-10-28 at 10:10, Andrew Cotter wrote: > Thanks for the ldconfig pointer... that did it! > > Now, I can get reports to be sent to the browser, but not have it launch a > program to read the output (acrobat, ms excel). TXT, HTML, CSV, and PDF all > display their data to the browser. The first three are all readable in the > browser but that defeats the purpose of the various types. How do I get the > example to output to a file so acrobat will pick it up and read it? Same > with ms excel for the csv? > > Thanks again! I cheared when I say the first HTML report display. > > Andrew > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Rlib-users mailing list > Rli...@li... > https://lists.sourceforge.net/lists/listinfo/rlib-users > |
From: Andrew C. <And...@So...> - 2003-10-31 17:06:02
|
Using IE6, Mozilla (firebird 0.7 and 1.4b), Netscape 7.1 Works on all browsers Thanks Andrew -----Original Message----- From: rli...@li... [mailto:rli...@li...]On Behalf Of Bob Doan Sent: Friday, October 31, 2003 11:55 AM To: Andrew Cotter Cc: RLIB USERS Subject: Re: [Rlib-users] rlib example - output help Andrew, Cool... What browser are you using.. RLIB sends out a content-type automatically... if you are using PHP make sure you have the header(rlib_get_content_type( thing in there before the spool - Bob On Tue, 2003-10-28 at 10:10, Andrew Cotter wrote: > Thanks for the ldconfig pointer... that did it! > > Now, I can get reports to be sent to the browser, but not have it launch a > program to read the output (acrobat, ms excel). TXT, HTML, CSV, and PDF all > display their data to the browser. The first three are all readable in the > browser but that defeats the purpose of the various types. How do I get the > example to output to a file so acrobat will pick it up and read it? Same > with ms excel for the csv? > > Thanks again! I cheared when I say the first HTML report display. > > Andrew > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Rlib-users mailing list > Rli...@li... > https://lists.sourceforge.net/lists/listinfo/rlib-users > ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Rlib-users mailing list Rli...@li... https://lists.sourceforge.net/lists/listinfo/rlib-users |
From: Bob D. <bd...@si...> - 2003-10-31 17:11:56
|
Wait.. does it launch the plugin or not.. I'm confused and tired ;) - bob On Fri, 2003-10-31 at 12:05, Andrew Cotter wrote: > Using IE6, Mozilla (firebird 0.7 and 1.4b), Netscape 7.1 > > Works on all browsers > > Thanks > > Andrew > > > -----Original Message----- > From: rli...@li... > [mailto:rli...@li...]On Behalf Of Bob Doan > Sent: Friday, October 31, 2003 11:55 AM > To: Andrew Cotter > Cc: RLIB USERS > Subject: Re: [Rlib-users] rlib example - output help > > > Andrew, > > Cool... What browser are you using.. RLIB sends out a content-type > automatically... > > if you are using PHP > > make sure you have the header(rlib_get_content_type( > thing in there before the spool > > - Bob > > On Tue, 2003-10-28 at 10:10, Andrew Cotter wrote: > > Thanks for the ldconfig pointer... that did it! > > > > Now, I can get reports to be sent to the browser, but not have it launch a > > program to read the output (acrobat, ms excel). TXT, HTML, CSV, and PDF > all > > display their data to the browser. The first three are all readable in > the > > browser but that defeats the purpose of the various types. How do I get > the > > example to output to a file so acrobat will pick it up and read it? Same > > with ms excel for the csv? > > > > Thanks again! I cheared when I say the first HTML report display. > > > > Andrew > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: SF.net Giveback Program. > > Does SourceForge.net help you be more productive? Does it > > help you create better code? SHARE THE LOVE, and help us help > > YOU! Click Here: http://sourceforge.net/donate/ > > _______________________________________________ > > Rlib-users mailing list > > Rli...@li... > > https://lists.sourceforge.net/lists/listinfo/rlib-users > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Rlib-users mailing list > Rli...@li... > https://lists.sourceforge.net/lists/listinfo/rlib-users > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Rlib-users mailing list > Rli...@li... > https://lists.sourceforge.net/lists/listinfo/rlib-users > |
From: Andrew C. <And...@So...> - 2003-10-31 17:31:25
Attachments:
report.pdf
|
>Wait.. does it launch the plugin or not.. I'm confused and tired ;) >- bob Plugin does launch in all browsers (PDF and CSV format). My problem now is the formatting / output of a different tables data. tblkey_country +-----------+-------------------+---------------+ | countryID | country_txt | country_short | +-----------+-------------------+---------------+ | 1 | Australia | AU | | 2 | Canada | CA | | 3 | France | FR | | 4 | Germany | DE | | 5 | Portugal | PT | | 6 | Mexico | MX | | 7 | Puerto Rico | PR | | 8 | United Kingdom | GB | | 9 | United States | US | | 10 | US Virgin Islands | VI | | 11 | Ireland | IR | +-----------+-------------------+---------------+ report1.php ***************** BEGIN PHP SNIPPET ******************* <? dl("libr-php.so"); // $format = "html"; // see following line $format = $_GET['type']; // I feed the format in the URL - no problem here. $sql_host = "localhost"; $sql_users = "reports"; $sql_password = ""; $sql_database = "test"; $rlib = rlib_init(); rlib_add_datasource_mysql($rlib, "mysql", $sql_host, $sql_users, $sql_password, $sql_database); rlib_add_query_as($rlib, "mysql", "select tblkey_country.* from tblkey_country", "country"); rlib_add_report($rlib, "report1.xml","country"); // Tried 3rd value - nothing different. rlib_set_output_format($rlib, $format); rlib_execute($rlib); header( rlib_get_content_type($rlib)); rlib_spool($rlib); rlib_free($rlib); ?> ***************** END PHP SNIPPET ********************* report1.xml - rest of the file is the same as the example ***************** BEGIN XML SNIPPET ******************* <Detail> <FieldHeaders> <Output> <HorizontalLine size="1" bgcolor="'black'"/> <Line bgcolor="'0xe5e5e5'"> <text width="15" col="1">countryID</text> <text width="1"/>r <text width="20" col="2">Country</text> <text width="1"/> <text width="15" col="3" align="right">Country Code</text> </Line> <HorizontalLine size="1" bgcolor="'black'"/> <HorizontalLine size="4" bgcolor="'white'"/> </Output> </FieldHeaders> <FieldDetails> <Output> <Line bgcolor="iif(r.detailcnt%2,'0xe5e5e5','white')"> <field value="country_ID" width="15" align="left" col="1"/> <text width="1"/> <field value="country_txt" width="20" align="left" col="2"/> <text width="1"/> <field value="country_short" width="15" format="'%s'" align="right" col="3"/> </Line> </Output> </FieldDetails> </Detail> ***************** END XML SNIPPET ********************* Attached is the PDF output. Any help would be wonderful! Andrew |
From: Bob D. <bd...@si...> - 2003-10-31 18:29:26
|
Problem looks like it is you ;) In your table you define the field as "countryID" but in the xml you reference it as "country_ID" Thats why it is 0... and now you might ask why it is 0 Well... RLIB goes through a progression on how to resolve fields... first it trys the main loop.. then it tryes other datasources... like datasource.field .. then it tries variables (v.something) .. and environment memory variables (m.something).. then if it can't find a match it thinks that it is a number... and good old atoi will turn a string into 0 - Bob On Fri, 2003-10-31 at 12:31, Andrew Cotter wrote: > >Wait.. does it launch the plugin or not.. I'm confused and tired ;) > > >- bob > > Plugin does launch in all browsers (PDF and CSV format). > > My problem now is the formatting / output of a different tables data. > > > tblkey_country > +-----------+-------------------+---------------+ > | countryID | country_txt | country_short | > +-----------+-------------------+---------------+ > | 1 | Australia | AU | > | 2 | Canada | CA | > | 3 | France | FR | > | 4 | Germany | DE | > | 5 | Portugal | PT | > | 6 | Mexico | MX | > | 7 | Puerto Rico | PR | > | 8 | United Kingdom | GB | > | 9 | United States | US | > | 10 | US Virgin Islands | VI | > | 11 | Ireland | IR | > +-----------+-------------------+---------------+ > > report1.php > ***************** BEGIN PHP SNIPPET ******************* > <? dl("libr-php.so"); > > // $format = "html"; // see following line > $format = $_GET['type']; // I feed the format in the URL - no > problem here. > > $sql_host = "localhost"; > $sql_users = "reports"; > $sql_password = ""; > $sql_database = "test"; > $rlib = rlib_init(); > > rlib_add_datasource_mysql($rlib, "mysql", $sql_host, > $sql_users, $sql_password, $sql_database); > rlib_add_query_as($rlib, "mysql", "select tblkey_country.* > from tblkey_country", "country"); > rlib_add_report($rlib, "report1.xml","country"); // Tried > 3rd value - nothing different. > rlib_set_output_format($rlib, $format); > rlib_execute($rlib); > > header( rlib_get_content_type($rlib)); > > rlib_spool($rlib); > rlib_free($rlib); > ?> > ***************** END PHP SNIPPET ********************* > > > report1.xml - rest of the file is the same as the example > ***************** BEGIN XML SNIPPET ******************* > <Detail> > <FieldHeaders> > <Output> > <HorizontalLine size="1" bgcolor="'black'"/> > <Line bgcolor="'0xe5e5e5'"> > <text width="15" col="1">countryID</text> > <text width="1"/>r > <text width="20" col="2">Country</text> > <text width="1"/> > <text width="15" col="3" align="right">Country > Code</text> > </Line> > <HorizontalLine size="1" bgcolor="'black'"/> > <HorizontalLine size="4" bgcolor="'white'"/> > </Output> > </FieldHeaders> > <FieldDetails> > <Output> > <Line bgcolor="iif(r.detailcnt%2,'0xe5e5e5','white')"> > <field value="country_ID" width="15" align="left" > col="1"/> > <text width="1"/> > <field value="country_txt" width="20" align="left" col="2"/> > <text width="1"/> > <field value="country_short" width="15" > format="'%s'" align="right" col="3"/> > </Line> > </Output> > </FieldDetails> > </Detail> > ***************** END XML SNIPPET ********************* > > Attached is the PDF output. > > > Any help would be wonderful! > > Andrew |