Hi,
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());
}
}
Please let me know what is the solution for the same.
Regards,
Raj