Report Writing

Interoperability and EHR Optimization

Privacy and Security

NPR Tip (MAGIC or Client/Server) – Report to Download with “CSV” Extension Opens Immediately in Excel

Written by Joe Cocuzzo, Senior VP of Report Writing Services - iatricSystems

At MUSE 2014, the most popular "tip" was probably the demonstration of an NPR report that allows the user to send output to "DOWNLOAD" with a CSV extension on the file and two footnotes on the report allow the just created file to open automatically in Excel. No "End of Report" message to close. No need to find the report flat file and open with Excel.

All you need is a START footnote that suppresses the "END OF REPORT" message and a CLOSE.UP macro that closes the download file "early" and then runs Excel for the file just made by the report.




In Client/Server:


If the user runs the report to a download file with the ".CSV" extension, assuming that file type is associated with Excel (almost always true), Excel will run automatically and open the file in a spreadsheet.

Notice that in both sets of footnotes, the name of the file is saved to a variable and then passed to either the program (MAGIC) or @Shell.execute macro (C/S). That is because closes data file and dictionary prefixes and cleans up the temp file and if you don’t save the file name from slash to a variable, it won’t be there to pass to the program or macro after the "close up."

The complete Powerpoint for our Tips and Tricks Session, all report examples (including this one) and some DR documentation of the DR example tip/trick are available here:

Try it. You’ll like it.

Topics: Magic, MUSE 2014, MEDITECH, Client/Server, Excel, NPR Tip (MAGIC or Client/Server) – Report to Downl, Report Writing Tips and Tricks

Subscribe to the Report Writing blog.

Receive the latest articles directly in your inbox.
Enter your email address and click SUBSCRIBE: