[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



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