Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Data Connectivity
Message Icon Topic: Custom Paper size printing Post Reply Post New Topic
Author Message
sipoyraj
Newbie
Newbie


Joined: 02 Apr 2009
Location: India
Online Status: Offline
Posts: 1
Quote sipoyraj Replybullet Topic: Custom Paper size printing
    Posted: 03 Apr 2009 at 12:13am

 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
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.