Hi I have writen code for to print to pdf so i am stuck in printing to printer directly here is the code i have written
private void addToQueue(container _licensePlates)
{
int conLength, cnt;
WHSLicensePlateParent licensePlateID;
WHSWorkMHUSummary_env wHSWorkMHUSummary_buffer;
SrsReportRunController controller;
SRSPrintDestinationSettings settings;
str filePath = @'C:\MHUSummary';
str fileNameWithoutExt;
#File
conLength = conLen(_licensePlates);
for(cnt = 1; cnt <= conLength; cnt++)
{
delete_from wHSWorkMHUSummary_buffer;
controller = new SrsReportRunController();
licensePlateID = conPeek(_licensePlates, cnt);
// call the report for this context license plate
// step 1 - create records in WHSWorkMHUSummary_env table
if(licensePlateID)
{
this.insertReportTable(licensePlateID);
/*
wHSWorkMHUSummary_buffer.LicensePlateId = licensePlateID;
wHSWorkMHUSummary_buffer.Description = "Test" + int2str(cnt);
wHSWorkMHUSummary_buffer.insert();
*/
controller.parmReportName(ssrsReportStr(WHSMHUSummaryReport_env, Report));
controller.parmShowDialog(false);
controller.parmLoadFromSysLastValue(false);
settings = controller.parmReportContract().parmPrintSettings();
settings.printMediumType(SRSPrintMediumType::File);
settings.fileFormat(SRSReportFileFormat::PDF);
//fileNameWithoutExt = int2str(cnt);
fileNameWithoutExt = licensePlateID;
settings.fileName(filePath + #FilePathDelimiter + fileNameWithoutExt + 'pdf');
controller.startOperation();
}
controller = null;
}
}
*This post is locked for comments