Print Page as PDF
Classic FileMan API: Print Data ICR (10010)

Classic FileMan API: Print Data    ICR (10010)

Name Value
NUMBER 10010
IA # 10010
DATE CREATED 1995/01/12
CUSTODIAL PACKAGE VA FILEMAN
CUSTODIAL ISC San Francisco
USAGE Supported
TYPE Routine
DBIC APPROVAL STATUS APPROVED
ROUTINE DIP
NAME Classic FileMan API: Print Data
ORIGINAL NUMBER 10010
GENERAL DESCRIPTION
Use EN1^DIP to print a range of entries, in columnar
format.
STATUS Active
ID DIP
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
EN1
Fileman 21 provides a new feature.  If a print is
done and there were no records found to print, it will print the header and a
message notifying the user that no records were found to print.

Occasionally, however, this can cause a problem, if the header is a print
template.  In this case, at the time the header logic is executed, D0=-1 It
appears that the logic generated by FileMan for printing regular fields is
robust enough to handle this situation.  When the print template contained
code entered by the developer, it has been seen not to work when D0=-1.

There are two ways to fix this either of which could be done at anytime prior
to the release of FileMan 21:
a) change the logic to use $G so that it will still work with D0=-1
b) There is a new input variable that can be set to suppress this feature.
When you are setting ithe other input variables to EN1^DIP, if you could S
DISUPNO=1, the feature would be suppressed and no error would occur.  DISUPNO
is killed at the end of the print in FileMan 21, but since FM20 doesn't know
about it, it should probably be NEWed by your code.

If you use the FLDS input variable to EN1^DIP or a print template to call an
'M' routine to evaluate and print a value, you must WRITE the value you want
printed. Examples 1 and 2 below illustrate how this is done.

Example #1: The routine is called from a Print Template
=======================================================

Print Template: NAME: ZZ640A                            DATE CREATED: AUG 13,
1998@10:21
READ ACCESS: @                        FILE: MY PATIENT
USER #: 133                           WRITE ACCESS: @
DATE LAST USED: AUG 14, 1998 HEADER (c): MY PATIENT LIST FIRST PRINT FIELD:
NAME;C1;L22;"PATIENT"// THEN PRINT FIELD: D SSN^MYPROG;X THEN PRINT FIELD: W
X;C24;R4;"SSN"// COMPILED (c): NO

Routine Called: MYPROG   ;SFCIOFO/S0 TEST ROUTINE ; 21 Aug 98  2:06 PM SSN
;
K VA,VADM S DFN=D0 D ^VADPT
S X=$P(VA("PID"),"-",3)
Q

Example of Usage: ZZ640A   ;SFCIOFO/S0 TEST FILEMAN PRINT ; 19 Aug 98  4:03 PM
S DIC="^DIZ(640001,",BY=".01",L=0,FR=""
S FLDS="[ZZ640A]"
D EN1^DIP
Q

Example #2: The routine is called from the FLDS input variable
==============================================================

Routine Called: MYPROG   ;SFCIOFO/S0 TEST ROUTINE ; 21 Aug 98  2:06 PM SSN
;
K VA,VADM S DFN=D0 D ^VADPT
S X=$P(VA("PID"),"-",3)
Q

Example of Usage: ZZ640A   ;SFCIOFO/S0 TEST FILEMAN PRINT ; 19 Aug 98  4:03 PM
S DIC="^DIZ(640001,",BY=".01",L=0,FR=""
S FLDS=".01;C1;L22;""PATIENT"",D SSN^MYPROG;X,W X;C24;""SSN"""
D EN1^DIP
Q
VARIABLES TYPE VARIABLES DESCRIPTION
L Input
(Required) String that evaluates to zero.
DIC Input
(Required) Global root or file number, in the usual
format.
FLDS Input
(Optional) The various fields to be printed.
BY Input
(Optional) The fields by which the data is to be
sorted.
FR Input
(Optional) The START WITH: values of the SORT BY
fields.
FR(n) Input
TO Input
(Optional) The GO TO: values of the SORT BY fields.
TO(n) Input
(Optional) An alternate way to provide the GO TO:
values of the SORT BY fields.
DHD Input
(Optional) The header desired for the output.
DIASKHD Input
(Optional) Set to null to prompt user for a header.
DIPCRIT Input
(Optional)Set to 1 to print SORT criteria on the
first page of the report.
PG Input
(Optional) Starting page number.
DHIT Input
(Optional) M code to execute after each entry is
printed.
DIOEND Input
(Optional) M code to execute after the printout has
finished.
DIOBEG Input
(Optional) M code to execute before the printout
starts.
DCOPIES Input
(Optional) Number of copies to print (for SDP-type
devices).
IOP Input
(Optional) Name of device to send output to.
DQTIME Input
(Optional) Time to print, for queued printing.
DIS(0) Input
(Optional) M code to screen out entries.
DIS(n) Input
(Optional) Additional screens, "OR"-ed with each
other, "AND"-ed with the DIS(0) screen.
DISUPNO Input
(Optional) Set to 1 to suppress output when no
records are found.
DISTOP Input
(Optional) Set to 0 to prevent users from stopping
prints.
DISTOP("C") Input
(Optional) M code to execute if a user stops the
print.
BY(0) Input
(Optional; Required for BY(0) sorts) Set this
variable to an open global root. The open global root should be the static
part of a global; a list of record numbers must be stored at a descendant
subscript level.
L(0) Input
(Optional; Required if BY(0) is set to an open global
root.)

Use L(0) to specify the number of dynamic subscript levels that exist beyond
the static global root, including the subscript level containing the list of
record numbers. The minimum value of L(0) is 1.
FR(0,n) Input
(Optional) To select only a subset of records at a
given subscript level n, you can use FR(0,n) and/or TO(0,n). For n equal to
any of the 'n' dynamic sorting subscript levels in the global specified by
BY(0), you can set FR(0,n) to the sort-from value for that subscript level.
TO(0,n) Input
(Optional) This variable contains the ending value
(the sort-to value) for any of the 'n' dynamic sorting subscripts in the
global specified by BY(0).
DISPAR(0,n) Input
(Optional) Like the FR(0,n) and TO(0,n) variables,
this variable array can be set for any of the 'n' dynamic sorting subscripts
in the global specified by BY(0). This array allows you to create subheaders
for the sorting subscripts in the global.
DISPAR(0,n,'OUT') Input
Note: 'OUT' should be "OUT".

(Optional) If a literal title is input to DISPAR(0,n) above, then you can also
enter MUMPS code to transform the value of the subscript from the global
before it is printed as a subheader. It acts like an output transform.