RE: Using report variables to calculate subtotals in xml side [repost ]

Bob Doan <bdoan-J0aWFLYJOWhWk0Htik3J/[email protected]>
Newsgroups gmane.text.rlib.user
Message-ID <[email protected]>
It belongs outside of the detail section


On Thu, 2005-03-31 at 12:02 -0600, Al Arzaga wrote:
> I've made that change and I still get the same error.  Am I placing the
> <Variable> information in the right place?  Does it belong in the right part
> of the <Details> section or elsewhere?
> 
> -----Original Message-----
> From: Bob Doan [mailto:bdoan-J0aWFLYJOWhWk0Htik3J/[email protected]]
> Sent: Thursday, March 31, 2005 11:24 AM
> To: Al Arzaga
> Cc: RLIB USERS
> Subject: RE: [Rlib-users] Using report variables to calculate subtotals
> in xml side [repost ]
> 
> 
> And your "Variable" is not defined in the "Variables" Section.
> 
> You need to have something like:
> 
> <Variables>
> <Variable name="subtotal" value="field3" type="sum"
> resetonbreak="break0"/>
> </Variables>
> 
> On Thu, 2005-03-31 at 11:23 -0600, Al Arzaga wrote:
> > I made the change, but the "BAD_OPERAND" error is still there.
> >  
> > 
> > -----Original Message-----
> > From: Bob Doan [mailto:bdoan-J0aWFLYJOWhWk0Htik3J/[email protected]]
> > Sent: Thursday, March 31, 2005 7:53 AM
> > To: Al Arzaga
> > Cc: RLIB USERS
> > Subject: Re: [Rlib-users] Using report variables to calculate subtotals
> > in xml side [repost ]
> > 
> > 
> > Hi,
> > 
> > <Variable name="subtotal" value="field3" type="sum" 
> > > resetonbreak="break0"/>
> > 
> > I think you want value="val(field3)" 
> > 
> > 
> > On Thu, 2005-03-31 at 07:32 -0600, Al Arzaga wrote:
> > > Hi, again.  For some reason, I guess I should have consulted the 
> > > example code more thoroughly before posting what I posted yesterday.  
> > > Now that I have a better handle of how the schema works, I'd like to 
> > > know what I'm still doing wrong in the following xml code.
> > > 
> > > I have the following defined as a report break:
> > > 
> > > 	<Breaks>	
> > > 		<Break name="break0" newpage="no" headernewpage="no">
> > > 			<BreakFields>
> > > 				<BreakField value="r.subtotal"/>
> > > 			</BreakFields>
> > > 			<BreakFooter>
> > > 				<Output>
> > > 					<Line>
> > > 						<literal>Subtotal:
> > </literal>
> > > 						<field bold="yes"
> > value="r.subtotal" width="10" align="left" 
> > > col="1"/>
> > > 					</Line>
> > > 				</Output>
> > > 			</BreakFooter>
> > > 		</Break>
> > > 	</Breaks>
> > > 
> > > And then within my <Details> tags:
> > > 
> > > 	<FieldDetails>
> > > 		<Output>
> > > 			<Line
> > bgcolor="iif(r.detailcnt%2,'0xe5e5e5','white')">
> > > 				<field value-"field1" width="10"
> > align="left" col="1"/>
> > > 				<literal width="1"/>
> > > 				<field value-"field2" width="10"
> > align="center" col="2"/>
> > > 				<literal width="1"/>
> > > 				<field value-"val(field3)" format="'$%.2d'"
> > width="35" align="left" 
> > > col="3"/>
> > > 			</Line>
> > > 
> > > 			<HorizontalLine size="4" bgcolor="'white'"/>
> > > 
> > > 			<Variable name="subtotal" value="field3" type="sum" 
> > > resetonbreak="break0"/>
> > > 		</Output>
> > > 	
> > > 	</FieldDetails>
> > > 
> > > 
> > > 
> > > The output produces a "BAD_OPERAND" instead of the intended subtotal 
> > > value.
> > > 
> > > Thanks in advance for your help,
> > > 
> > > 
> > > -Al
> > > 
> > > 
> > > On Mar 30, 2005, at 3:42 PM, Al Arzaga wrote:
> > > 
> > > > Hello,
> > > >
> > > > I'm having trouble grasping how to implement report variables and
> break
> > > > headers in xml.
> > > > Consider the following XML code snippet:
> > > 
> > > [snip]
> > > 
> > > > And I want r.field3 to be summed up and have a subtotal displayed at 
> > > > the end
> > > > of this output.  First, where do I put the following line to calculate
> 
> > > > the
> > > > subtotal?
> > > >
> > > > 	<Variable name="r.subtotal" value="r.total_fees" type="sum" />
> > > >
> > > > Do I place it between the <FieldDetails> tags?
> > > >
> > > > And then, where and how can I display the actual subtotal?  The syntax
> 
> > > > would
> > > > be very much like this, right?  I'd like it to align with the column 3
> > > > referenced between the Detail tags.
> > > > 	<field value="r.subtotal" width="10" align="right" col="3"/>
> > > >
> > > >
> > > > -Al
> > > >
> > > >
> > > >
> > > >
> > > > -------------------------------------------------------
> > > > This SF.net email is sponsored by Demarc:
> > > > A global provider of Threat Management Solutions.
> > > > Download our HomeAdmin security software for free today!
> > > > http://www.demarc.com/info/Sentarus/hamr30
> > > > _______________________________________________
> > > > Rlib-users mailing list
> > > > [email protected]
> > > > https://lists.sourceforge.net/lists/listinfo/rlib-users
> > > 
> > > 
> > > -------------------------------------------------------
> > > This SF.net email is sponsored by Demarc:
> > > A global provider of Threat Management Solutions.
> > > Download our HomeAdmin security software for free today!
> > > http://www.demarc.com/info/Sentarus/hamr30
> > > _______________________________________________
> > > Rlib-users mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/rlib-users
> > 
> > 
> > 
> > -------------------------------------------------------
> > This SF.net email is sponsored by Demarc:
> > A global provider of Threat Management Solutions.
> > Download our HomeAdmin security software for free today!
> > http://www.demarc.com/info/Sentarus/hamr30
> > _______________________________________________
> > Rlib-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/rlib-users
> > 
> > 
> > -------------------------------------------------------
> > This SF.net email is sponsored by Demarc:
> > A global provider of Threat Management Solutions.
> > Download our HomeAdmin security software for free today!
> > http://www.demarc.com/info/Sentarus/hamr30
> > _______________________________________________
> > Rlib-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/rlib-users
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by Demarc:
> A global provider of Threat Management Solutions.
> Download our HomeAdmin security software for free today!
> http://www.demarc.com/info/Sentarus/hamr30
> _______________________________________________
> Rlib-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rlib-users



-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/info/Sentarus/hamr30
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.