[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: help?



On Fri, 26 Jul 2002, Ramzi Salameh wrote:

or just use one line to set the quarter and get rid of the if statements
(assuming you want true quarters) like...

   let $quarter = datetostr($doc_date, 'Q')

If you want quarters 1 off , then you can do

 let $quarter = edit(mod((to_number(datetostr($doc_date,'Q')) + 1),4),'9')

I'm not sure how you actually want the quarters, since it looks like
you're "if" structure is trying to set up some quarters as 2 months, some
as 3, some as 4, and with quarter 1 and 4 overlapping.  If your quarters
are breaking at "non-statndard" points, then you will need to fix your if
construction (there is no "else-if" in SQR) as suggested by Rick Creel
and changing the datetostr() back to...

   let $doc_date = datetostr(&doc_date,'MM/YY')

> It looks like you need 1 more End-If at the end to close out the first IF
> statement.  Also, if your comment isn't wrapping and is actually going to
> the second line in the SQR you need to put a ! in front of it.
>
> hth
>
> ------------------------------------------------
> Ramzi Salameh
> PeopleSoft Technical Analyst
> Dave & Busters, Inc.
>
> Voice     (214) 904-2550
> Fax       (214) 350-0941
> ------------------------------------------------
>
>
>
>                       Andalib Yussuf
>                       <andalib.yussuf@A        To:       
>SQR-USERS@list.iex.net
>                       MS.COM>                  cc:
>                       Sent by:                 Subject:  help?
>                       "Discussion of
>                       SQR, Brio
>                       Software's
>                       database
>                       reporting
>                       language"
>                       <SQR-USERS@list.i
>                       ex.net>
>
>
>                       07/26/02 09:24 AM
>                       Please respond to
>                       sqr-users
>
>
>
>
>
>
> Hello,
> I needed some help. I am getting the following errors with this code.
>
> *********unknown comands or extra parameters found
>
>
> h.DOC_DT  &doc_date
>     let $quarter = datetostr($doc_date, 'MM/DD') !need to put edit mask in
> here so that only month and date are compared
>      If $doc_date >= '10/01' and $doc_date <= '12/31'
>            let $quarter = '1'
>         else If $doc_date >= '01/01' and $doc_date <= '04/30'
>            let $quarter = '2'
>         end-if
>         else If $doc_date >= '05/01' and $doc_date <= '06/30'
>            let $quater = '3'
>         end-if
>         else If $doc_date >= '07/01' and $doc_date <= '10/31'
>            let $quater = '4'
>         end-If
>

-----------------------------------------------------------------------
Donald Mellen  | Ray Ontko & Co. - Richmond, IN - http://www.ontko.com/
donm@ontko.com |  "In the beginning, there was nothing, which exploded"