Custom Paper size (ex : 15 inch x 12 inch )and printer specific font printing using java-Crystal Report.
Let me put my question simple. I need the following which i am unable to achieve.
"Java code to print high volume report (containing more than 500 pages) to the local Line Matrix Printer or High Speed DoT MATRIX printer with printer specific fonts with custom size of ( 15 inch x 12 inch )".
We have tried a lot but could not achieve setting the custom page site in java. It works fine in VB and ASP.net with the same crystal report design but not in java.
Here are the details,
I am unable to print the report using the custom paper size setting of 15 (width) x
12 (Height) with printer friendly fonts so that we can print on Line or
dot matrix printer.
This problem is not solved from last 3 months and we dont get help anywhere.
We are using Java with Crystal
Report XI R2 design for the same.
ITable table=null;
DatabaseController
dbCtrl=null;
ReportClientDocument
oReportDoc=null;
try {
String
reportName=fileName;
oReportDoc=new
ReportClientDocument();
oReportDoc.open(reportName,0);
dbCtrl =
oReportDoc.getDatabaseController ();
rs=ad.sqlStringBigST(query);
table =
dbCtrl.getDatabase ().getTables ().getTable (0);
dbCtrl.setDataSource
(rs, table.getName(), "Runtimeres");
Object
oreportSource=oReportDoc.getReportSource();
IReportSource
reportSource=(IReportSource)oreportSource;
PrintReportOptions
printOptions = new PrintReportOptions();
printOptions.setPrinterName("EPSON
FX-2175 ESC/P");
printOptions.setPaperSize(PaperSize.useDefault);
options.setPaperSource(PaperSource.manual);
oReportDoc.getPrintOutputController().printReport(printOptions);
} catch
(Exception e) {
System.err.println(e.toString());
}
}
Regards,
Rajshekhar SIpoy
Edited by sipoyraj - 03 Apr 2009 at 12:50am