commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnue/reports samples/foobulations/monthly.grd s...


From: Jason Cater
Subject: gnue/reports samples/foobulations/monthly.grd s...
Date: Sat, 06 Apr 2002 02:27:27 -0500

CVSROOT:        /home/cvs
Module name:    gnue
Changes by:     Jason Cater <address@hidden>    02/04/06 02:27:27

Modified files:
        reports/samples/foobulations: monthly.grd 
        reports/src    : GRLayout.py 

Log message:
        finished adding 'section=' support to <fields> so they can claim 
another section as their parent [for grouping purposes]

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/reports/samples/foobulations/monthly.grd.diff?cvsroot=OldCVS&tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/reports/src/GRLayout.py.diff?cvsroot=OldCVS&tr1=1.16&tr2=1.17&r1=text&r2=text

Patches:
Index: gnue/reports/samples/foobulations/monthly.grd
diff -c gnue/reports/samples/foobulations/monthly.grd:1.3 
gnue/reports/samples/foobulations/monthly.grd:1.4
*** gnue/reports/samples/foobulations/monthly.grd:1.3   Fri Apr  5 00:36:10 2002
--- gnue/reports/samples/foobulations/monthly.grd       Sat Apr  6 02:27:26 2002
***************
*** 28,41 ****
          </out:tablehead>
  
          <section source="dtsFoo" name="nameBreak">
!           <out:row>
!               <out:col><field name="name"/></out:col>
!             <section>
!               <notFirstRow><out:col/></notFirstRow>
!               <out:col><field name="foodate"/></out:col>
!               <out:col><field name="foobs"/></out:col>
              </section>
-           </out:row>
            <default>
              <out:row>
                <out:col>(No results to display)</out:col>
--- 28,41 ----
          </out:tablehead>
  
          <section source="dtsFoo" name="nameBreak">
!            <section>
!              <out:row>
!                 <firstRow><out:col><field name="name" 
section="nameBreak"/></out:col></firstRow>
!                 <notFirstRow><out:col/></notFirstRow>
!                 <out:col><field name="foodate"/></out:col>
!                 <out:col><field name="foobs"/></out:col>
!             </out:row>
              </section>
            <default>
              <out:row>
                <out:col>(No results to display)</out:col>
Index: gnue/reports/src/GRLayout.py
diff -c gnue/reports/src/GRLayout.py:1.16 gnue/reports/src/GRLayout.py:1.17
*** gnue/reports/src/GRLayout.py:1.16   Fri Apr  5 00:36:10 2002
--- gnue/reports/src/GRLayout.py        Sat Apr  6 02:27:27 2002
***************
*** 120,125 ****
--- 120,142 ----
                       % (object.name, parentSection.name, object._source)
  
          object._section = s.name
+ 
+         if hasattr(object,'section') and object.section:
+           curr = s
+           section = None
+           while curr:
+             if curr.name == object.section:
+               section = curr
+               break
+             curr = s._parent.findParentOfType('GRSection')
+ 
+           if section == None:
+             raise SourceOutOfScope, \
+                 'Field "%s" in section "%s" uses out-of-scope section "%s"' \
+                      % (object.name, parentSection.name, object.section)
+ 
+           object._section = section.name
+ 
          object._mymapper = self._mapper.sectionMap[object._section]
  
          GDebug.printMesg(6,'Mapping field "%s" to section "%s"' \
***************
*** 245,250 ****
--- 262,270 ----
    def _buildObject(self):
      if not hasattr(self,'name') or self.name == None:
        self.name = id(self)
+     else:
+       self._name = string.lower(self.name)
+ 
      return ContainerElement._buildObject(self)
  
    # Retrieve the first row of data, if available.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]