Changeset 541 for cprs/branches/tmg-cprs/CPRS-Chart/fNotePrt.pas
- Timestamp:
- Aug 12, 2009, 7:14:16 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/branches/tmg-cprs/CPRS-Chart/fNotePrt.pas
r453 r541 1 //kt -- Modified with SourceScanner on 8/25/2007 1 //kt -- Modified with SourceScanner on 8/25/2007, also 8/09 2 2 unit fNotePrt; 3 3 … … 54 54 {$R *.DFM} 55 55 56 uses rCore, rTIU, rReports, uCore, Printers; 56 uses rCore, rTIU, rReports, uCore, Printers, 57 rHTMLTools; //kt 8/09 58 57 59 58 60 const … … 206 208 RemoteSiteID: string; //for Remote site printing 207 209 RemoteQuery: string; //for Remote site printing 210 TempLines: TStringList; //kt added 5-31-05 208 211 begin 209 212 SetupVars; //kt added 8/25/2007 to replace constants with vars. … … 223 226 224 227 225 if Piece(cboDevice.ItemID, ';', 1) = 'WIN' then 226 begin 227 if dlgWinPrinter.Execute then 228 begin 229 FReportText.Lines.Assign(GetFormattedNote(FNote, ChartCopy)); 230 PrintWindowsReport(FReportText, PAGE_BREAK, Self.Caption, ErrMsg); 231 if Length(ErrMsg) > 0 then InfoBox(ErrMsg, TX_ERR_CAP, MB_OK); 232 end 233 end 234 else 235 begin 228 if Piece(cboDevice.ItemID, ';', 1) = 'WIN' then begin 229 if dlgWinPrinter.Execute then begin 230 //kt ----- Begin original code ------------- 8/09 231 //kt FReportText.Lines.Assign(GetFormattedNote(FNote, ChartCopy)); 232 //kt PrintWindowsReport(FReportText, PAGE_BREAK, Self.Caption, ErrMsg); 233 //kt if Length(ErrMsg) > 0 then InfoBox(ErrMsg, TX_ERR_CAP, MB_OK); 234 //kt ----- End original code ------------- 235 TempLines := TStringList.Create; //kt 8/09 236 TempLines.Assign(GetFormattedNote(FNote, ChartCopy)); //kt 8/09 237 if not rHTMLTools.IsHTML(TempLines) then begin //kt 8/09 238 //NOTE: If HTML, then bypass this printer dialog, because it will be //kt 8/09 239 // replaced by a printer dialog that internet explorer uses. //kt 8/09 240 if dlgWinPrinter.Execute then begin //kt 8/09 241 FReportText.Lines.Assign(TempLines); //kt 8/09 242 PrintWindowsReport(FReportText, PAGE_BREAK, Self.Caption, ErrMsg,Application); //kt 8/09 243 end; //kt 8/09 244 end else begin //kt 8/09 245 LoadDocumentText(TempLines, FNote); //Get document without headers/footers //kt 8/09 246 PrintHTMLReport(TempLines, ErrMsg, Patient.Name, //kt 8/09 247 FormatFMDateTime('mm/dd/yyyy', Patient.DOB), //kt 8/09 248 Patient.WardService, Application); //kt 8/09 249 end; //kt 8/09 250 TempLines.Free; //kt 8/09 251 if Length(ErrMsg) > 0 then InfoBox(ErrMsg, TX_ERR_CAP, MB_OK); //kt 8/09 252 end; //kt 8/09 253 end else begin 236 254 ADevice := Piece(cboDevice.ItemID, ';', 2); 237 255 PrintNoteToDevice(FNote, ADevice, ChartCopy, ErrMsg); … … 243 261 if chkDefault.Checked then 244 262 SaveDefaultPrinter(Piece(cboDevice.ItemID, ';', 1)); 245 263 246 264 User.CurrentPrinter := cboDevice.ItemID; 247 265 Close;
Note:
See TracChangeset
for help on using the changeset viewer.