How can i print a report without open it

I have a button to display a report. But i want to send the report to the printer without displaying it on the screen.

Is there a way ?

Hi ,

Yes you can print report without open it just select option "PRINTER " in to the print dialoge . and when u want see just selct SCREEN option into print dialog

Yes but that’s not what i meant. Interactive option is No. I don’t want the user to see anything. Just click the button and it prints the report automaticly.

Hi ,

yes you can set it on printer option for every time it will take printer to print the report. try this it will work .

Thank you very much.

hi…

try this…

public void run()
{
Args args;
ReportRun report;
str printer;
PrintJobSettings pjs;
;
args = new Args(reportstr(“report name”));
counter = 1;
pjs = new printJobSettings();

while(counter <= maxReports)
{
args.parm(int2str(counter));
args.record(custInvoiceJour);
report = new ReportRun(args);
pjs.setTarget(PrintMedium::Printer);
report.setTarget(PrintMedium::Printer);
report.init();
report.run();

counter++;
}

}

Regards,

Hi,

You can add an init() method to your report:

public void init()
{
str printer;
showdialog = false;

printer = ‘\\path_to_your_printer’;
this.DeviceName(printer);
this.setTarget(printmedium::Printer);

super();
}

regards,

Thomas