Thanks all for your input.
 
Up and running.
 
Razzak you are fantastic and as always Rbase does Rock
 
 
 
 
Stephen Breen

________________________________

From: [email protected] on behalf of A. Razzak Memon
Sent: Wed 11/17/2010 12:50 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Can not get message display to work anyrecommendations



At 11:38 PM 11/16/2010, Steve Breen wrote:

>Can I get some help here. Trying to get this message to display
>
>CLEAR VAR vcnt
>CLEAR VAR vsum
>CLEAR VAR vtranscnt
>CLEAR VAR vtranssum
>CLEAR VAR vpapercnt
>CLEAR VAR vpapersum
>
>COMPUTE vtranscnt AS COUNT pon FROM attinv_master_cust +
>WHERE (parentcustid = 164 or parentcustid = 110 or parentcustid = 193)
>COMPUTE vtranssum AS SUM camount FROM attinv_charge_desc +
>WHERE (parentcustid = 164 or parentcustid = 110 or parentcustid = 193)
>COMPUTE vpapercnt AS COUNT pon FROM attinv_master_cust +
>WHERE (parentcustid NE 164 AND parentcustid NE 110 AND parentcustid = 193)
>COMPUTE vpapersum AS SUM camount FROM attinv_charge_desc +
>WHERE (parentcustid NE 164 AND parentcustid NE 110 AND parentcustid = 193)
>COMPUTE vcnt AS COUNT pon FROM attinv_master_cust
>COMPUTE vsum AS SUM camount FROM attinv_charge_desc
>
>SET VAR vcrlf = ((CHAR(10)) + (CHAR(13)))
>CLEAR VAR vmsg
>
>SET VAR vmsg = ('Total TransAdvantage Invoices for Billing Date = '
>&(CTXT(.vtranscnt))+.vcrlf)
>SET VAR vmsg = (.vmsg + 'Total Amount Billed to TransAdvantage For
>Billing Date = ' + &(CTXT(.vtranssum))+.vcrlf)
>SET VAR vmsg = ('Total Other Invoices for Billing Date = '
>&(CTXT(.vpapercnt))+ .vcrlf)
>SET VAR vmsg = (.vmsg + 'Total Other Amount Billed For Billing Date
>= ' &(CTXT(.vpapersum))+.vcrlf)
>SET VAR vmsg = ('Total Invoices for Billing Date = ' &(CTXT(.vcnt))+ .vcrlf)
>SET VAR vmsg = (.vmsg + 'Total Amount Billed For Billing Date = '
>&(CTXT(.vsum))+.vcrlf)
>SET VAR vmsg = (''''+.vmsg + 'Date Billed = ' & (CTXT(.vbilldate)) +
>.vcrlf+'''')
>PAUSE 2 USING &vmsg +
>OPTION MESSAGE_FONT_NAME ARIAL FB|MESSAGE_FONT_SIZE 15|MESSAGE_BOLD OFF


Steve,

Here you go ...

Just copy and paste the following code to help you understand the
Multi-Line PAUSE Command.

Before running this file, CONNect the appropriate database, and make
sure that the variable
"vBillDate", used in the PAUSE command, is pre-defined accordingly.

I have re-defined the entire code with CORRECT Syntax. Make sure to
verify each table and
appropriate column names.

Have fun!

Very Best R:egards,

Razzak.

-- Start here ...
-- Multi_Line_PAUSE_Command.RMD
-- A. Razzak Memon
-- November 17, 2010
-- Check for Required vBillDate Variable
IF (CHKVAR('vBillDate')) <> 1 THEN
    PAUSE 2 USING 'Missing Bill Date Variable' +
    CAPTION ' Daily Calculations' ICON STOP +
    OPTION MESSAGE_FONT_NAME Tahoma +
    |MESSAGE_FONT_COLOR RED +
    |MESSAGE_FONT_SIZE 11 +
    |THEMENAME R:BASE Rocks!
    GOTO Done
ENDIF
    CLEAR VARIABLES vTransCnt,vTransSum,vPaperCnt,vPaperSum,vCnt,vSum, +
    vPauseMessage
-- Pre-Define All Global Variables
    SET VAR vTransCnt INTEGER = 0
    SET VAR vTransSum CURRENCY = 0.00
    SET VAR vPaperCnt INTEGER = 0
    SET VAR vPaperSum CURRENCY = 0.00
    SET VAR vCnt INTEGER = 0
    SET VAR vSum CURRENCY = 0.00
    SET VAR vPauseMessage TEXT = NULL
-- Calculate vTransCnt
    SELECT (COUNT(PoN)) INTO vTransCnt INDIC iv1 FROM AttInv_Master_Cust +
    WHERE ParentCustID IN (164,110,193)
-- Calculate vTransCnt
    SELECT (SUM(CAmount)) INTO vTransSum INDIC iv1 FROM AttInv_Master_Cust +
    WHERE ParentCustID IN (164,110,193)
-- Calculate vPaperCnt
    SELECT (COUNT(PoN)) INTO vPaperCnt INDIC iv1 FROM AttInv_Master_Cust +
    WHERE ParentCustID NOT IN (164,110,193)
-- Calculate vPaperSum
    SELECT (SUM(CAmount)) INTO vPaperSum INDIC iv1 FROM AttInv_Charge_Desc +
    WHERE ParentCustID IN (164,110,193)
-- Calculate vCnt
    SELECT (COUNT(PoN)) INTO vCnt INDIC iv1 FROM AttInv_Master_Cust
-- Calculate vSum
    SELECT (SUM(CAmount)) INTO vSum INDIC iv1 FROM AttInv_Charge_Desc
-- Concatenate vPauseMessage
    SET VAR vPauseMessage = +
    ((CHAR(013)) + +
    'Total TransAdvantage Invoices for Billing Date
='&(CTXT(.vTransCnt))+(CHAR(013))+ +
    'Total Amount Billed to TransAdvantage For Billing Date
='&(CTXT(.vTransSum))+(CHAR(013))+ +
    'Total Other Invoices for Billing Date ='&(CTXT(.vPaperCnt))+(CHAR(013))+ +
    'Total Other Amount Billed For Billing Date
='&(CTXT(.vPaperSum))+(CHAR(013))+ +
    'Total Invoices for Billing Date ='&(CTXT(.vCnt))+(CHAR(013))+ +
    'Total Amount Billed For Billing Date ='&(CTXT(.vSum))+(CHAR(013))+ +
    'Date Billed ='&(CTXT(.vBillDate))+(CHAR(009)))
    CLS
    PAUSE 2 USING .vPauseMessage +
    CAPTION ' Daily Calculations' ICON APP +
    BUTTON 'Press any key to continue ...' +
    OPTION MESSAGE_FONT_NAME Tahoma +
    |MESSAGE_FONT_COLOR GREEN +
    |MESSAGE_FONT_SIZE 11 +
    |BUTTON_FONT_COLOR GREEN +
    |THEMENAME R:BASE Rocks!
LABEL Done
CLEAR VARIABLES iv%,vTransCnt,vTransSum,vPaperCnt,vPaperSum,vCnt,vSum, +
vPauseMessage
RETURN
-- End here ...




Reply via email to