How to print reports?
I m creating view object in .uix file using EJB-struts platform.How to print the result in view object which is getting after query execution ?
double post
http://forum.java.sun.com/thread.jspa?threadID=718185&tstart=0
Similar Messages
-
Re : how to print report output in DOT MATRIX printer
Hai
how to print report output in DOT MATRIX printer.
Thanks
maniCheck this
[http://help.sap.com/saphelp_nw04/helpdata/en/90/78f078030211d399b90000e83dd9fc/frameset.htm]
also check the SAP Note 129581 -
Hyperion Anaylzer - how to Print report with information in pages?
Hi,<BR><BR>I use Hyperion Analyzer Version: 6.1.1.00206 (from Help | About menu).<BR><BR>I created report with pages (on Navigate button selected the Pages). In pages are months (January, February, March, etc).<BR><BR>Now I would like to print current report. So I did:<BR>1. click on arrow beside Print button<BR>2. Print Current Report windows is displayed. I selected default options and press OK button.<BR><BR>Report is printed, but there is no page information printed out. So on paper there is report without months (January, February, March, etc).<BR><BR>How to print report with information in pages?<BR><BR>Thanks,<BR>Grofaty
Jia Shun,
I had the same issue for printing A/R Invoices - I created a Crystal Report based on a SQL View, works fine with A/R Invoice document, but the Draft Invoice printing has 3 pages: 1st page blank, 2nd page with watermark "DRAFT", 3rd page my Crystal Report layout without any data. When printing normally it is only 1 page.
Here is what I did as a work around:
Create two SQL Views, one select from OINV (joining INV1 and other tables needed), the other select from ODRF (joining DRF1 and other tables needed), for the draft printing.
Create two identicle Crystal Reports, only difference are: datasource location (from different views), the "draft" crystal report has a watermark section.
Go to Administration>System Initialization>Print Preferences and uncheck "Print draft watermark..."
Import both crystal reports. Invoice can be printed normally. But the Draft Invoice has more steps: Open Draft document report, change settings so it shows the DocEntry in the Draft Table. Select and open the desired document, hit Print Preview, and enter the DocEntry, it displays the layout with data and "DRAFT" watermark.
This is a workaround. I don't like it because it is not scalable - too much workload if you want to print 100 invoices.
Hopefully someone will provide a better solution.
regards,
G -
How to print report on client default printer ?
I develop web application. I use jdev 10.1.3.4.0 . I can print report in PDF format.
My Problem
I can't print report on client default printer. when Client run application and print. Report is printed at server default printer
How can I do.
_My source code for print to PDF format._
FacesContext context = FacesContext.getCurrentInstance();
response = (HttpServletResponse)context.getExternalContext().getResponse();
String urlSchema = "jdbc:oracle:thin:@localhost:1521:ORCL";
String schemaName = "hr";
String schemaPass = "hr;
reportPath = "D:\\Project\\Reports";
Class.forName("oracle.jdbc.driver.OracleDriver");
conn = DriverManager.getConnection(urlSchema, schemaName, schemaPass);
reportPath = reportPath.endsWith("\\") ? reportPath : (reportPath + "\\");
input = new File(reportPath + reportName + ".jasper");
reportParameters.put("SUBREPORT_DIR", reportPath);
reportParameters.put("P_IMAGE_PATH", reportPath);
jasperPrint = JasperFillManager.fillReport(input.getPath(), reportParameters, conn);
response.setContentType("application/pdf");
response.addHeader("Content-Disposition", "attachment;filename=" + reportNameOutput + ".pdf");
OutputStream outputStream = response.getOutputStream();
JasperExportManager.exportReportToPdfStream(jasperPrint, outputStream);
outputStream.flush();
outputStream.close();
conn.close();{code}
_My source code for print to *printer*._
{code}FacesContext context = FacesContext.getCurrentInstance();
response = (HttpServletResponse)context.getExternalContext().getResponse();
String urlSchema = "jdbc:oracle:thin:@localhost:1521:ORCL";
String schemaName = "hr";
String schemaPass = "hr;
reportPath = "D:\\Project\\Reports";
Class.forName("oracle.jdbc.driver.OracleDriver");
conn = DriverManager.getConnection(urlSchema, schemaName, schemaPass);
reportPath = reportPath.endsWith("\\") ? reportPath : (reportPath + "\\");
input = new File(reportPath + reportName + ".jasper");
reportParameters.put("SUBREPORT_DIR", reportPath);
reportParameters.put("P_IMAGE_PATH", reportPath);
jasperPrint = JasperFillManager.fillReport(input.getPath(), reportParameters, conn);
JasperPrintManager.printReport(jasperPrint, false);
conn.close();Edited by: jaae251 on Jun 18, 2009 2:29 AMIf you offer a PDF to the end user, they usually know what to do with it. OTOH, if you wish to provide software to facilitate the local printing, you might launch an application on the client side that accesses the JNLP API's PrintService - that can be done in a sandboxed application.
A signed application might access the normal J2SE based print services. Though I heard that Sun had decided to make printing a 'prompt on first attempt' deal - even for sandboxed apps., from 1.5 plus (or was it 1.6 plus?).
It would be a serious security bug if a web site could print on the client printer, without trust or active involvement from the end user. -
How to print report from JSP Page
Hi Everybody,
I am developing a simple project in JSP with MS Access. I hav some tables and reports for them. I hav a JSP page which gets inputs from user and save it in the table. Its working fine. But my problems are,
1) I hav a button called "SAVE & PRINT" in that bottom of the page, if i click that button, the currently entered data has to save in the table and the same data has to print from the MS Access report. I dont know how to print this report from JSP page.
2) Another button called "REPRINT". If i click that button, it has to ask a number to print the report page, that number is nothing but a field in that report.
Could anyone help me to solve this problem.Hi Everybody,
I am developing a simple project in JSP with MS Access. I hav some tables and reports for them. I hav a JSP page which gets inputs from user and save it in the table. Its working fine. But my problems are,
1) I hav a button called "SAVE & PRINT" in that bottom of the page, if i click that button, the currently entered data has to save in the table and the same data has to print from the MS Access report. I dont know how to print this report from JSP page.
2) Another button called "REPRINT". If i click that button, it has to ask a number to print the report page, that number is nothing but a field in that report.
Could anyone help me to solve this problem. -
How to print report in jsp page?
excuse me,i am new to jsp
may i know how to pritn report in jsp page or html?
tqhere is a hacked up example.. i ripped out a lot, so it may not compile, but you get the idea... the full version is really long and not much new info.. just all awt/display stuff...
package rowe;
import javax.swing.*;
import java.util.*;
import java.awt.*;
import java.awt.image.*;
import java.awt.event.*;
import java.sql.*;
import utility.*;
import java.awt.print.*;
public class rowePrint extends JFrame implements ActionListener, Printable{
String printType = "";
static JButton j = new JButton("Print");
FontMetrics fm;
String jID, promotion, product, jComments;
public void getInfo(int jid) {
ResultSet rs;
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection("jdbc:odbc:rowe");
Statement stmt = conn.createStatement();
rs = stmt.executeQuery("select j.id as jID, j.comments, p.title as pTitle, p.product, p.packagingCartonCost, p.foldingQuarterCostPerM, p.foldingQuarterCostPerM, j.customizationOption as setupFee, p.perMcost, p.qtyCarton, d.name as dName, d.contact as dContact, d.email as dEmail, d.address as dAddress, d.city as dCity, d.state as dState, d.zip as dZip, d.phone as dPhone, d.fax as dFax, r.name as rName, j.totalQty, j.orderIn, j.estFreight, j.miscCost, j.coverSelection, j.imprintSelection from jobs j, promotions p, dealers d, reps r where j.promotion = p.id and j.dealer = d.id and j.rep = r.id and j.id = " + jid);
rs.next();
jID = rs.getString("jID");
jComments = rs.getString("comments");
promotion = rs.getString("pTitle");
product = rs.getString("product");
} catch (Exception e) {
System.out.println("getinfo: " + e);
public void actionPerformed(ActionEvent e) {
if (e.getSource() instanceof JButton) {
wookie();
public void wookie() {
PrinterJob printJob = PrinterJob.getPrinterJob();
Paper paper = new Paper();
PageFormat page = new PageFormat();
paper.setImageableArea(0, 0, 600, 780);
page.setPaper(paper);
printJob.setPrintable(this, page);
try{
//printJob.pageDialog(page);
// if (printJob.printDialog()) {
printJob.print();
} catch (Exception e) {
System.out.println("wookie1" + e);
public static void main(String[] args) {
rowePrint at = new rowePrint("Invoice");
at.getInfo((new Integer(args[0])).intValue());
at.drawShapes();
// at.wookie();
public void drawShapes() {
setBounds(0, 0, 670, 550);
addWindowListener(new WindowAdapter() {public void windowClosing(WindowEvent e) {System.exit(0);}});
j.setBounds(10, 10, 10, 10);
j.addActionListener(this);
getContentPane().setLayout(null);
getContentPane().add(l);
getContentPane().add(j);
show();
public rowePrint(String s){
printType = s;
public void paint(Graphics g) {
g.setFont(new Font("Serif", Font.BOLD, 18));
g.drawString(promotion, 20, 30);
g.setFont(new Font("SansSerif", Font.PLAIN, 4));
g.drawString("" + new java.util.Date(), 20, 37);
g.setFont(new Font("Serif", Font.BOLD, 21));
g.drawString("Rowe Furniture", 440, 35);
g.fillRect(440, 40, 145, 25);
g.setColor(Color.white);
fm = g.getFontMetrics(new Font("Serif", Font.BOLD, 21));
g.drawString(printType, 512 - (fm.stringWidth(printType) / 2), 60);
public int print(Graphics g, PageFormat pf, int pi) throws PrinterException {
if (pi >= 1) {
return Printable.NO_SUCH_PAGE;
paint(g);
return Printable.PAGE_EXISTS;
} -
Hi how can print report from form directly
Hi,
I would like to print report from D2k directly....
i.e. suppose we pressed a button report has to be generated and printed automatically.... Generating of report is done by Run_product function, but how to give print directly...
please u send ur valuable suggestions to my mail id also
[email protected]
bye!When calling the report from form, include 2 more parameters in the parameter list:
- PARAMFORM=No
- DESTYPE=Printer
hth -
How to print Report Locale information in siebel BI publisher report
Hi,
i would like to print Report Locale Information selected by user in siebel BI publisher Report? Is it possible, please advise me to handle this?
Regards,
JoeHi,
Thanks for the reply...
Actually i am looking for the following scenarios :
1. i want to Hide/ Don't show last 3-pages Footer information in the report.
2. While i am displaying the Carry forward information in the report
a. if the page/ running total is 0, i don't want to display the footer information.
b. only case if the page/ running total is > 0, i want enable footer information dynamically for each page.
i have done as follows :
in the Template main body :
*<?template:footer?>*
**1000* *1000**
*<?end template?>*
and for behind 1000 currently :
<xdofo:inline-total display-condition="exceptlast" name="RUNAMT"><xdofo:show-carry-forward name="RUNAMT" format="99G999G999D00"/></xdofo:inline-total>
it was printing the " RUNAMT " calculated page total sucessfully. but here if the Total = 0 then i don't want to show the value in FOOTER...
Thanks in Advance.
Please let me know, if more information required to help..
KAP.. -
How to print Report in Landscape mode
Hi,
I set the Header,Body,Footer section to Landscape Orientation. still its printing report in Portrait mode.
Your suggestions are welcome
Vikas
nullThanks, but its not working on web, i tried it on client server it works fine.
anyway Thanks for your time, on your end is it working on WEB,
Thanks
Vikas
null -
How to print report in Character mode using Oracle Developer 10g
Dear,
I migrate my forms and reports from Oracle Developer 6 to Oracle Developer reports 10g,
We are using some character mode report for bill printing. But when i run these report through menu on Web i got error message like
"REP-1920: Character mode runtime incompatible with DESFORMAT of PDF, HTML, HTMLCSS, SPREADSHEET or RTF"
i don't want to change the character mode to any other mode because it effects the printing.
so how can it possible to set the mode to character and view report on Web.
pls. suggest me solution.You have to pass the PRT file name as value for the DESFORMAT and use mode= MODE=CHARACTER.
E.g.
http://<host name>:<port>/reports/rwservlet?desformat=dflt&mode=character&..... -
How to print report in Charactor mode using Oracle Developer 10g
Dear,
I have converted my few reports from Oracle Developer forms 5 to Oracle Developer forms 10g,
i am running these reports on Web, for that i have configour "rwserver" server.
But when i run these report through menu on Web i got error message like
"REP-1920: Character mode runtime incompatible with DESFORMAT of PDF, HTML, HTMLCSS, SPREADSHEET or RTF"
i don't want to change the character mode to any other mode because it effects the printing.
so how can it possible to set the mode to character and view report on Web.
pls. suggest me solution.
ThanksYou have to pass the PRT file name as value for the DESFORMAT and use mode= MODE=CHARACTER.
E.g.
http://<host name>:<port>/reports/rwservlet?desformat=dflt&mode=character&..... -
How to print report in Draft and Document
Dear all,
I have a proplem when preview crystal report in Document .
I make a form using Crystal report for Incoming payment, then i import to it.
For example
When i create a document in Incoming Payment and save it. There is no problem with the crystal report.
But if i save the data as a draft. then i preview it , the report that i make in crystal report become blank.
After i check, the table is different when i save as a draft.
My question is How to make a dynamic crystal report so i can preview the report as a draft and preview it when the data have saved in original table ?
Thanks in advance
regards
Jia Shun
Edited by: Jia Shun on Jan 10, 2011 4:44 AM
Edited by: Jia Shun on Jan 10, 2011 4:46 AMJia Shun,
I had the same issue for printing A/R Invoices - I created a Crystal Report based on a SQL View, works fine with A/R Invoice document, but the Draft Invoice printing has 3 pages: 1st page blank, 2nd page with watermark "DRAFT", 3rd page my Crystal Report layout without any data. When printing normally it is only 1 page.
Here is what I did as a work around:
Create two SQL Views, one select from OINV (joining INV1 and other tables needed), the other select from ODRF (joining DRF1 and other tables needed), for the draft printing.
Create two identicle Crystal Reports, only difference are: datasource location (from different views), the "draft" crystal report has a watermark section.
Go to Administration>System Initialization>Print Preferences and uncheck "Print draft watermark..."
Import both crystal reports. Invoice can be printed normally. But the Draft Invoice has more steps: Open Draft document report, change settings so it shows the DocEntry in the Draft Table. Select and open the desired document, hit Print Preview, and enter the DocEntry, it displays the layout with data and "DRAFT" watermark.
This is a workaround. I don't like it because it is not scalable - too much workload if you want to print 100 invoices.
Hopefully someone will provide a better solution.
regards,
G -
How to Print reports with Java Application
I'm developing a database application in java using rmi and swings. Now I want to take some printout of reports from that application. Is any report designer available for java applications. How can i solve this problem. Please help me.
Hi
I don't know i f exist a tool like you want, but, in Java
the print job is implemented by a class implementing the Printable interface.
A class "Printable" must implement the print method like is defined at scpec. This method, via the params, can do print by "drawing" the page and, finally, return an integer
indicate if the print loop must continue or not.
The drawing op over the printer Graphics context is realized by methos of Graphics object (if you want "print"
some text you can do g.drawString("some text",x,y) and so on).
See the tutorials for more info
Hope this help -
How?print report on A3 paper to epson printer
HI,
Now I am using Report Builder 6.0.5.35.0. to write report to print to printer epson LQ2080 for A3 paper size 16.5 x 8.3 inch with fond size 15. But it keep printing in fond size 10 with maximum 80 character per line. The remaining sentence will come down as 2nd line.
I do the following but it does not work.
1. In Data Model-System Parameter- Mode -Property Pallet-Initial Velue='Character".
2. In Layout Model- Header Section-Property Pallet. Under section head,the Width=16,height=8.Under Character Mode,the report width=210,height=66.
3. In layout Model-Main section % trailer section - the setting is same as No.2
4. In Data Model- system parameter-Desformat.
I put in initial value=wide255. Where this printer control file contains:
printer "wide255"
height 66
width 210
before report esc "g"
after page control(L)
return control(M)
linefeed control(J)
5. esc"g" is epson print control code for fond size 15.
Can someone share with me what goes wrong?
nullA few ideas \ suggestions:
1) Make sure you are using FP 3.3 runtime:
https://smpdl.sap-ag.de/~sapidp/012002523100016807202010E/cr2008fp33_redist.zip
2) Try a simple win app - use saved data report (crystalreportviewer1.reportsource = <path to saved data report>). Does this print correctly?
3) What print mode are you using; PDF or ActiveX?
4) Try export to RPT and PDF from your web app. Does it export correctly?
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports] -
How to print report From Oracle form directly on printer
Hi,
I am running report from form and output should be directly printed on printer.
Database: 11g Release2
Forms version : 11.1.2
Report version : 11.1.2
OS: windows 7 professional 32 Bit
Written following code:
declare
pl_id ParamList;
varno number;
x VARCHAR2(150);
y NUMBER;
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
begin
pl_id := Get_Parameter_List('tmpdata');
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
repid := FIND_REPORT_OBJECT('SALEBILLNEW'); -- report object name
pl_id := Create_Parameter_List('tmpdata');
Add_Parameter(pl_id,'copies',TEXT_PARAMETER,'1');
Add_Parameter(pl_id,'background',TEXT_PARAMETER,'Yes');
Add_Parameter(pl_id,'mode',TEXT_PARAMETER,'Character');
Add_Parameter(pl_id,'printjob',TEXT_PARAMETER,'YES');
Add_Parameter(pl_id,'VCOMPANY',TEXT_PARAMETER,:block50.coname);
Add_Parameter(pl_id,'VCOde',TEXT_PARAMETER,:block50.code);
Add_Parameter(pl_id,'VOURBILLNO',TEXT_PARAMETER,:BLOCK50.FROMBILL);
Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
Add_Parameter(pl_id,'DESTYPE',TEXT_PARAMETER, 'PRINTER') ;
Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER, 'OKI MICROLINE 391 TURBO (COPY1) on NILESH-PC') ; --default printer name
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,RUNTIME);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,PRINTER);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'rep_adminserver_inorasrv-pc_asinst_3');
y := LENGTH ('rep_adminserver_inorasrv-pc_asinst_3') + 2;
x := RUN_REPORT_OBJECT (repid, pl_id);
WEB.SHOW_DOCUMENT('http://inorasrv-pc:7001/reports/rwservlet/getjobid'||SUBSTR(x,y)||'?server=rep_adminserver_inorasrv-pc_asinst_3&userid=scott/tiger@winorasr');
Destroy_parameter_list('tmpdata');
end;
Above code giving following error:
REP-52251: The output of job ID 111 requested on Thu Oct 18 18:37:20 IST 2012 cannot be retrieved.<P>REP-51026: No output is generated for job 111.
Need help..
Thanks in advance.Hi,
I have change the printer name to OKI
Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER, '\\Nilesh-pc\OKI') ;
Add_Parameter(pl_id,'DESFORMAT',TEXT_PARAMETER, 'dflt.prt');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESNAME,'\\Nilesh-pc\OKI');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'dflt.prt');
code which i have posted above unable to reach at default printer and gives following error
The report generated successfully but distribution to destinations failed.
Modified above code to take default printer from registry.
Added below code
rtn_Registry := CLIENT_WIN_API_ENVIRONMENT.Read_Registry('HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows','Device');
rtn_defaultPrinter := substr(rtn_Registry,1,instr(rtn_Registry,',',1)-1);
Add_Parameter(pl_id,'DESNAME',TEXT_PARAMETER, 'rtn_defaultPrinter') ;
It is giving error
CLIENT_WIN_API_ENVIRONMENT.Read_Registry must be declare.
Edited by: parapr on Oct 20, 2012 10:47 PM
Maybe you are looking for
-
on newform.aspx just above the top of cancel button I want to put 1 hyperlink "Help" but I want to do this by script/jquery by reading my configuration list where 1 column is TITLE and other is- URL Configuration List has 2 columns Title and URLValue
-
Using windows 8.1 and outlook 2013 with iCloud Outlook Add-in so that my iPhone 5 will sync with outlook. Now reminders work on iPhone 5, but don't work in outlook 2013. Help, I've tried everything I can think of or found on the internet.
-
Install oracle9i(9.2.0.4) on Fedora Core3
Install Oracle9i(9.2.0.4) on Fedora Core 3 I. Prepare the files 1. Download ship_9204_linux_disk1.cpio.gz, ship_9204_linux_disk2.cpio.gz ship_9204_linux_disk3.cpio.gz from www.oracle.com to your local disks.Unzip them all. gunzip ship_9204_linux_disk
-
Error code when signing in to use face time; 3121-2138-7457 any ideas to the problem?
I recieve and error code when signing in to use facetime (3121-2138-7457) any information regarding how to correct this error code would be appreciated?
-
ORA-00064 after changes processes, open_cursors in Oracle 10g Express
Hi, I just run the following sql statements: alter system set processes=400 scope=spfile; alter system set open_cursors=5000 scope=spfile; After restart my computer, I can't connect to the oracle and in oradim.log i see the following error: ORA-00064