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 ...
--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]
(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body,
place any
text to search for.
================================================