Re: Minor display bug
Bob Doan <[email protected]> Fri, 21 Dec 2007 15:38:38 -0500
| Newsgroups | gmane.text.rlib.user |
|---|---|
| Message-ID | <[email protected]> |
--=-ljPagEaORpFJCse/dBe4 Content-Type: text/plain Content-Transfer-Encoding: 7bit Anthony, Please try the following patch. It should fix your problem. Please let me know if it does and I'll commit. - Bob On Thu, 2007-12-20 at 11:00 -0700, Anthony.Pfaff-4gSe3/[email protected] wrote: > My organization is using RLIB to great effect in generating many of our necessary reports. Unfortunately, there is a very small bug with it which causes one line of information to not be displayed on some report pages. We've been trying to track down this bug in our code for quite some time but have been unable to locate it, so we are left to believe that the bug itself lies in RLIB. Where should I send a copy of a report displaying the bug so that it may be remedied? I can also give the results returned by our database to generate the report if necessary. > > Thanks, > > Anthony Pfaff > Application Developer > College of Arts & Sciences Budget Office > University of Colorado -- Bob Doan Vice President of Information Technology SICOM Systems [email protected] 800-547-4266 x217 --=-ljPagEaORpFJCse/dBe4 Content-Disposition: attachment; filename=rlib.patch Content-Type: text/x-patch; name=rlib.patch; charset=utf-8 Content-Transfer-Encoding: 7bit Index: libsrc/breaks.c =================================================================== RCS file: /cvsroot/rlib/rlib/libsrc/breaks.c,v retrieving revision 1.47 diff -u -r1.47 breaks.c --- libsrc/breaks.c 8 Dec 2006 22:06:45 -0000 1.47 +++ libsrc/breaks.c 21 Dec 2007 20:36:44 -0000 @@ -61,15 +61,16 @@ } } -void rlib_force_break_headers(rlib *r, struct rlib_part *part, struct rlib_report *report, gboolean precalculate) { +gboolean rlib_force_break_headers(rlib *r, struct rlib_part *part, struct rlib_report *report, gboolean precalculate) { struct rlib_element *e; + gboolean did_print = FALSE; if(!OUTPUT(r)->do_breaks) - return; + return TRUE; if(report->breaks == NULL) - return; - + return TRUE; + for(e = report->breaks; e != NULL; e=e->next) { gint dobreak=1; struct rlib_report_break *rb = e->data; @@ -90,9 +91,10 @@ struct rlib_report_break *rb = e->data; if(rb->headernewpage && precalculate == FALSE) { rlib_print_break_header_output(r, part, report, rb, rb->header, FALSE); - } - + did_print = TRUE; + } } + return did_print; } void rlib_handle_break_headers(rlib *r, struct rlib_part *part, struct rlib_report *report, gboolean precalculate) { @@ -142,11 +144,13 @@ } if(!allfit) { rlib_layout_end_page(r, part, report, TRUE); - rlib_force_break_headers(r, part, report, precalculate); + if(rlib_force_break_headers(r, part, report, precalculate) == FALSE) { + for(i=0;i<icache;i++) + rlib_print_break_header_output(r, part, report, cache[i], cache[i]->header, FALSE); + } } else { - for(i=0;i<icache;i++) { + for(i=0;i<icache;i++) rlib_print_break_header_output(r, part, report, cache[i], cache[i]->header, FALSE); - } } } } Index: libsrc/rlib.h =================================================================== RCS file: /cvsroot/rlib/rlib/libsrc/rlib.h,v retrieving revision 1.127 diff -u -r1.127 rlib.h --- libsrc/rlib.h 4 Mar 2007 21:44:52 -0000 1.127 +++ libsrc/rlib.h 21 Dec 2007 20:36:44 -0000 @@ -882,7 +882,7 @@ }; /***** PROTOTYPES: breaks.c ***************************************************/ -void rlib_force_break_headers(rlib *r, struct rlib_part *part, struct rlib_report *report, gboolean precalculate); +gboolean rlib_force_break_headers(rlib *r, struct rlib_part *part, struct rlib_report *report, gboolean precalculate); void rlib_handle_break_headers(rlib *r, struct rlib_part *part, struct rlib_report *report, gboolean precalculate); void rlib_handle_break_footers(rlib *r, struct rlib_part *part, struct rlib_report *report, gboolean precalculate); void rlib_break_evaluate_attributes(rlib *r, struct rlib_report *report); --=-ljPagEaORpFJCse/dBe4 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ --=-ljPagEaORpFJCse/dBe4 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Rlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/rlib-users --=-ljPagEaORpFJCse/dBe4--