[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: [sqr-users] Re: Reg: Rounding off problem - Rajesh
- Subject: Re: [sqr-users] Re: Reg: Rounding off problem - Rajesh
- From: Rajesh Subramaniam <epsilon11@gmail.com>
- Date: Fri, 13 Nov 2009 09:26:08 -0500
- Delivery-date: Fri, 13 Nov 2009 09:29:15 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;h=domainkey-signature:mime-version:received:in-reply-to:references:date:message-id:subject:from:to:content-type;bh=CkwEhx0zxAYs4g1oc/8BHkmQE5SzaEbkA7wlmiEyjqE=;b=wHhUfeyFjTOlkSjkCV8vBO+iFpGk2IlWETCV1GIM+7t60c7BP0GYYymRG6MEcvLlzZgFjuBiwdXJ3HDtjlL/c954qzdZ6rlAu1xPTq61NBFfKGhoRLKMc6/oOVnwmYaRAO5Bv1RQ7U9Zk1+rFImFLCY1EdFf77YllOEPzN2mm3M=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;h=mime-version:in-reply-to:references:date:message-id:subject:from:to:content-type;b=cduQIuCSN/0/ng/uZiJj0wK/eC0Ojcp1pFOeg2QnTAxZWmlW7EhVV6LD7SQgSdGQyN5ngdhA7Qs20EUJWE5N7S2bg7vPBWQUM0x+MUNS8uT0WaIdOwUSgnSylT1Gihg/STmLI5udUaReryMOtkHjo5QgZ3HP7xtNTY5/jxT9IoI=
- In-reply-to: <E8D45F4C13B22B4882D801A9020C49831BFED4@MAILVS01.mtg.home.ads>
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
- References: <eb33d07b0911130557j3a9989c8s1826a8aa875169d4@mail.gmail.com><eb33d07b0911130604p141eaeeeve761de400021b449@mail.gmail.com><E8D45F4C13B22B4882D801A9020C49831BFED4@MAILVS01.mtg.home.ads>
Hi Jason,
Thanks for the reply. From the syntax you gave and another persons post I
figured out the solution to the problem.
Thanks a lot.
-Rajesh
On Fri, Nov 13, 2009 at 9:08 AM, Simon, Jason (MBS) <
Jason.Simon@mortgagefamily.com> wrote:
> Here is the code from the SQR help files.
>
> Returns a value that is num_value rounded to place_value digits after
> the decimal separator.
>
> Value type: Same as num_value
>
> Syntax: dst_var = round(num_value, place_value)
>
> num_value = decimal, float, or integer literal, column, variable, or
> expression.
>
> place_value = decimal, float, or integer literal, column, variable, or
> expression. The value is always converted to float.
>
> dst_var = decimal, float, or integer variable.
>
> Example: let #frndvar = round(#fvar, #fplace)
>
>
>
>
>
>
> -----Original Message-----
> From: sqr-users-bounces+jason.simon=mortgagefamily.com@sqrug.org
> [mailto:sqr-users-bounces+jason.simon <sqr-users-bounces%2Bjason.simon>=
> mortgagefamily.com@sqrug.org] On
> Behalf Of Rajesh Subramaniam
> Sent: Friday, November 13, 2009 9:04 AM
> To: This list is for discussion about the SQR database reporting
> languagefrom Hyperion Solutions.
> Subject: [sqr-users] Re: Reg: Rounding off problem - Rajesh
>
> Hi,
>
> Actually I was thinking of rounding off each individual department's
> revenue using the round function. But, can someone tell me the syntax
> for
> it-
>
> I read somwhere it is,
>
> round(numeric value, place value).
>
> What is place value? can someone give me an example for this or suggest
> some
> other idea.
>
> Thanks,
> Rajesh.
>
> On Fri, Nov 13, 2009 at 8:57 AM, Rajesh Subramaniam
> <epsilon11@gmail.com>wrote:
>
> > Hi,
> >
> > I am doing changes to a payroll related SQR program, where the total
> > revenue of each client is calculated and a report is generated.
> >
> > each clients revenue in different departments is like this-
> >
> > Client 1: Department A -34.36
> > Department B -45.48
> > --------------
> > Total Revenue - 80.84
> >
> >
> > And a report will be generated after rounding each value-
> >
> > Client 1: Department A -34
> > Department B -45
> > --------------
> > Total Revenue - 79
> >
> >
> > The problem I am facing is that when the rounding of total revenue
> there is
> > an obvious mistake i.e 80.84 is rounded to 80 and total is displayed.
> But,
> > when you view it in the report it looks like there is a problem in
> addition
> > i.e the total of 34 and 45 is displayed as 80 instead of 79 (since
> each item
> > is rounded off individually for report purposes).
> >
> > This is what I need in the report-
> >
> > Client 1: Department A -34
> > Department B -45
> > --------------
> > Total Revenue - 79
> >
> > But this is what I get in the report
> >
> > Client 1: Department A -34
> > Department B -45
> > --------------
> > Total Revenue - 80
> >
> > How can we solve this issue? I was thinking of truncating the final
> totoal
> > value but still I will be facing the same problem.
> >
> > Can anyone help me out?
> >
> > Thanks,
> > Rajesh.
> >
>
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
>
>
>
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
>
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users