Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0005593Openbravo ERPB. User interfacepublic2008-10-20 11:502009-07-10 13:49
networkb 
iperdomo 
immediateminoralways
closedfixed 
20
2.40 
2.40MP7 
Core
No
0005593: Direct print option works only in specific configurations
We have been able to use direct print option in some environments, specifically internet explorer + acrobat reader, but not in most of them. By use we mean that the pdf was opened and print dialog of the application appeared.

Using firefox + kpdf | xpdf | acrobat there was no luck. Pdf file gets simply opened, but no print dialog appears.
1. Go to Application Dictionary || Report and Process || Report & Process.
2. Select RptC_Invoice
3. Check Direct Print
4. Go to any Sales Order
5. Click on the print button on the header
6. PDF gets opened.
No tags attached.
related to defect 0007025 closed iperdomo Parameter and "loading" Windows do not close when runing a process 
blocks defect 0005558 closed iperdomo Direct print option works only in specific configurations 
png directprint.png (107,707) 2009-06-17 15:07
https://issues.openbravo.com/file_download.php?file_id=1434&type=bug
png
Issue History
2008-10-20 11:50psarobeNew Issue
2008-10-20 11:50psarobeAssigned To => cromero
2008-10-20 11:50psarobeStatusnew => scheduled
2008-11-10 13:04cromeroAssigned Tocromero => rafaroda
2008-11-13 21:59rafarodaAssigned Torafaroda => pheenan
2009-03-24 10:52AinhoaPagolaAssigned Topheenan => gmauleon
2009-06-09 18:42networkbReporterjacoboGiralt => networkb
2009-06-09 18:42networkbPrioritynormal => immediate
2009-06-09 18:42networkbProposed Solution updated
2009-06-12 12:28gmauleonNote Added: 0017248
2009-06-12 12:40gmauleonAssigned Togmauleon => iciordia
2009-06-15 15:33iciordiaNote Added: 0017311
2009-06-15 15:33iciordiaStatusscheduled => feedback
2009-06-16 11:04iciordiaAssigned Toiciordia => dbaz
2009-06-16 11:05iciordiaStatusfeedback => scheduled
2009-06-16 11:05iciordiaNote Added: 0017339
2009-06-16 11:05iciordiafix_in_branch2.40 => pi
2009-06-16 12:54dbazNote Added: 0017344
2009-06-16 12:55dbazAssigned Todbaz => networkb
2009-06-16 13:13dbazAssigned Tonetworkb => dbaz
2009-06-16 14:08networkbNote Added: 0017350
2009-06-16 19:33dbazNote Added: 0017365
2009-06-16 19:33dbazRelationship addedrelated to 0007025
2009-06-16 20:01dbazNote Added: 0017368
2009-06-17 11:09dbazAssigned Todbaz => iperdomo
2009-06-17 15:07iperdomoNote Added: 0017385
2009-06-17 15:07iperdomoFile Added: directprint.png
2009-06-18 15:58rafarodaNote Added: 0017427
2009-06-18 16:30iperdomoNote Added: 0017429
2009-06-19 09:55hgbotCheckin
2009-06-19 09:55hgbotNote Added: 0017460
2009-06-19 09:55hgbotStatusscheduled => resolved
2009-06-19 09:55hgbotResolutionopen => fixed
2009-06-19 09:55hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.40/rev/ef8ec130023e5fc7ceee77252da21ee1342dcbe8 [^]
2009-07-10 13:49sureshbabuStatusresolved => closed
2009-07-10 13:49sureshbabuNote Added: 0018103
2009-07-10 13:49sureshbabuFixed in Version => 2.40MP7

Notes
(0017248)
gmauleon   
2009-06-12 12:28   
find below the results of the test done using a Openbravo 240 .

- The app. behavior using linux and firefox is incorrect, the direct print does not work

- This direct print tools works using windows and the Internet Explorer Browser.
(0017311)
iciordia   
2009-06-15 15:33   
We have tested direct print in customer environment (IE7) and it works. 2nd level support will get more information from customer side.

It fails on FF but we will fix this bug with standard priority (high for this bug).

Ismael
(0017339)
iciordia   
2009-06-16 11:05   
Tested in the customer environment (2.40) it does not work
(0017344)
dbaz   
2009-06-16 12:54   
Please do the following test in 2.40 (latest version) and check the following:

Edit the file src/org/openbravo/erpCommon/businessUtility/PrinterReports.html

There are two functions

function printReport(pagina) {
  abrirPDF(pagina, 'PDF');
  return true;
}

and

function printReport(pagina) {
  Pdf1.printWithDialog();
}

add the following alerts, so the functions should be as

function printReport(pagina) {
  alert('isPrintPreview');
  abrirPDF(pagina, 'PDF');
  return true;
}

and

function printReport(pagina) {
  alert('isDirectPrint');
  Pdf1.printWithDialog();
}

And then do the steps to reproduce.

Reassign me the bug telling me your results.

Thanks
(0017350)
networkb   
2009-06-16 14:08   
Hi David,

I have tested the code you have provided to me, but the direct printing didn't work in 240mp3. I have received the following message from webpage when printing:
isDirectPrinting.
(0017365)
dbaz   
2009-06-16 19:33   
It seems to be a problem related with the fix of

https://issues.openbravo.com/view.php?id=7025 [^]

Since in revisions before

https://code.openbravo.com/erp/stable/2.40/rev/0f4a07dd8b4d [^]
https://code.openbravo.com/erp/stable/2.40/rev/499880ca72d7 [^]
https://code.openbravo.com/erp/stable/2.40/rev/c7387fabc62f [^]
https://code.openbravo.com/erp/stable/2.40/rev/0b41cc259237 [^]

it works but just after these commits it fails
(0017368)
dbaz   
2009-06-16 20:01   
There are two problems:

1. Despite for networkb works, for me although I do the steps of reproduce, it seems that "direct print" option doesn't run because for me it always enters by the first function printReport(pagina) { of the previous code. To test purposes and avoid this problem, I have changed
var direct = (strDirectPrinting!="")?"Y":"N";
to
var direct = (strDirectPrinting!="")?"Y":"Y";
in function abrirPDFSession(strPagina, strDirectPrinting, strHiddenKey, strHiddenValue, bolComprobarCambios) {

2. Once the first problem is avoided, another problem appears, which is related to the previous comment. The method to invoke pdfs has changed and has to be reviewed in order to change the call
(0017385)
iperdomo   
2009-06-17 15:07   
The Direct Print implementation only works on IE with Adobe Reader ActiveX installed.
Attached you'll find a screenshot of the Direct Print working.

_Important Note_

If you choose a report as direct print, it *MUST* have a a .pdf mapping e.g. /RptC_Order.pdf
(0017427)
rafaroda   
2009-06-18 15:58   
Iván,

Does this also fail in pi? I say it because defect is closed.

Thanks.
(0017429)
iperdomo   
2009-06-18 16:30   
Check the relations added to that issue, and note [1] added. Will be fixed in the refactor of the Print & email component.

[1] https://issues.openbravo.com/view.php?id=5558#c17398 [^]

Cheers,
(0017460)
hgbot   
2009-06-19 09:55   
Repository: erp/stable/2.40
Changeset: ef8ec130023e5fc7ceee77252da21ee1342dcbe8
Author: Iván Perdomo <ivan.perdomo <at> openbravo.com>
Date: Wed Jun 17 15:08:12 2009 +0200
URL: http://code.openbravo.com/erp/stable/2.40/rev/ef8ec130023e5fc7ceee77252da21ee1342dcbe8 [^]

Fixes issue 5593: Using the acrobat reader to print a report directly. Modified renderJR to render to OutputStream when isDirectPrint

---
M src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
M src/org/openbravo/erpCommon/businessUtility/PrinterReports.html
M src/org/openbravo/erpCommon/businessUtility/PrinterReports.java
---
(0018103)
sureshbabu   
2009-07-10 13:49   
Tested in IE 7, its working fine able to print the Sales order