|
G'day Jim,
The info you have given is a little sketchy but this might
help you - if you give us details of table and column names/data types then
more exact assistance can be given, however, instead of
FILLIN try DIALOG (I have used " instead of ' for QUOTES as that is what you
have used in your posting):-
--Establish variables
SET VAR vFileNo TEXT
SET VAR vEndKey TEXT
SET VAR County TEXT = NULL
SET VAR vCount INT
SET VAR vInd INT
--Get the file number and store in vFileNo
CLS
DIALOG "Enter the file number" vFileNo vEndKey 1
--Check that a file number has been entered
IF vFileNo IS NULL OR vEndKey = "[Esc]" OR vEndKey = "HELP"
THEN
PAUSE 1 USING "Invalid file number - operation aborted"
AT CENTER CENTER
GOTO LEnd
ENDIF
--See if file number exists
SELECT COUNT(*) INTO vCount INDICATOR vInd FROM TableName
+
WHERE FileNo = .vFileNo AND LIMIT = 2
IF vCount = 0 THEN
PAUSE 1 USING "File number does not exist - operation
aborted" AT CENTER CENTER
GOTO LEnd
ENDIF
--Get the value for variable County
IF vCount = 1 THEN
SELECT CtCnty INTO County INDICATOR vInd FROM TableName
+
WHERE FileNo = .vFileNo
ELSE
CHOOSE County FROM #VALUES FOR (FileNo & CtCnty),
CtCnty FROM TableName +
WHERE FileNo = .vFileNo TITLE "Select the
location"
IF County IS NULL OR County = "[Esc]" OR County =
"HELP" THEN
PAUSE 1 USING "Invalid value - operation
aborted" AT CENTER CENTER
GOTO LEnd
ENDIF
ENDIF
--Print the file
OUTPUT PRINTER
PRINT Docket_Memo WHERE FileNo = .vFileNo and LIMIT =
1
OUTPUT SCREEN
PAUSE 1 USING "Report sent to printer" AT CENTER
CENTER
--Label for end of operation if invalid FileNo
entered
LABEL LEnd
--Clear variables and return to calling routine
CLEAR VAR v%, County
RETURN
Another way to get the file number would be through a CHOOSE
command.
Razzak has some excellent "From the Edge" articles available
from his website which will help you with programming but it might be worth your
while doing a course with David Blocker which will teach you how to use much
more of the power of RBase as well as database design tips. I would also
suggest that you attend one of Razzaks RBase 7.0 courses which will help you to
become familiar with all the goodies in the next version of RBase - it will blow
your socks off!
Regards
Clive Williams
CRW Services
Silverdale NSW 2752
Australia
|
- [RBASE-L] - Extracting values for a report Jim Van Dillen
- [RBASE-L] - Re: Extracting values for a report Alastair Burr
- [RBASE-L] - Re: Extracting values for a report Jim Van Dillen
- [RBASE-L] - Rounding with Currency Clive Williams
- [RBASE-L] - Rounding with Currency mjs
- [RBASE-L] - RE: Rounding with Currency Javier Valencia

