HOME
Specializing in the MEDITECH environment
Tips & Tricks: Setting up your NPR reports for downloading
example report

Let's assume for the moment that you want to download a report which will be 400 characters wide and end up in an Excel spreadsheet...


STEP 1

On page one of Enter/Edit Report, do the following:

Set the CHARS/LINE equal to 200.

Set the LINES/PAGE equal to the PAGE SIZE.  Typically, you will have them both equal to 66.  What this does is to prevent blank lines which would normally appear at the bottom of your page.

Set the PAGE BANNER to NONE.  This will prevent page banners from appearing on your report.

Set the PAGE HEADER equal to N.  This will prevent page headers from appearing on your report.

Set the PAGE TRAILER equal to N.  This will prevent page trailers from appearing on your report.

The net effect of these actions will be to make your report 'stream' without page breaks in the middle.



STEP 2

On page three of Enter/Edit Report, do the following:

Make two detail lines.

On the first (top) detail line, add the following attribute: NL=N

The net effect of this action will be to make your detail line 400 characters long.


Please note: what the report writer actually does is to take the two lines and join them together.  So, if you only have 180 characters worth of information on the first line and 180 characters worth of information on the second line, the data-stream will be 180+180 in a 400 character record.  The report writer will NOT pad the first line with 20 characters in order to make the 180 characters' worth of information into 200 characters' worth of information.  The side benefit to this, however, is that you can line fields up so that they make sense and not have to split fields in the middle just because they cross over the detail lines.  While this will NOT impact what you are doing if you are creating a comma-delimited report, it WILL have an impact on things if you are writing a fixed-length report.



STEP 3

On page three of the Enter/Edit Report, in the Footnote section, add the following:

RL 400

SFF NO

EFF NO

FD 44

RL 400 will set the 'record-length' of the detail line equal to 400 characters.
SFF NO will disable the 'starting form feed' control characters from being embedded in your report.
EFF NO will disable the 'ending form fee' control characters from being embedded in your report.
FD 44 will set the 'field delimiter' to ASCII 44 (the comma).



STEP 4

When it is time to download your report, enter a filename with the following extension: .CSV

When you open the file in Excel, it will be recognized as being 'comma-delimited'.



NOTES

  1. Excel will delete leading and trailing zeroes when you import directly using the 'CSV' extension.  If you need to retain the zeroes (department numbers and/or money) you will need to import the file as a 'TXT' and use the import wizard to maintain the integrity of your fields.
  2. To use <TAB> as your delimiter, use: FD 9
  3. To use <VERTICAL BAR> as your delimiter, use: FD 124



Contact: info@xo-consulting.com   909 624 7646 voice/fax   416 E Arrow Hwy   Claremont CA 91711