1
Reply

Issue insaving a PDF from a report documemt

prathaban durai

prathaban durai

Oct 20 2014 3:58 PM
798
Hi all,
         i work in windows form reporting part.. here we bind all the data in crystal report..and based on condition we print to data from crytal report to pdf..
here is the code

 

foreach (string strseq in brokerSeq1)

 

 

var dtble = dataview.ToTable().AsEnumerable().Where(y => y.Field<decimal>("BROKER_SEQ") == Convert.ToDecimal(strseq));

System.Data.

 

DataTable dtcoll = dtble.CopyToDataTable<DataRow>();

objBrokerService.SetDataForBrokerCommissionReport(dtcoll);

 

ReportDocument rd = objBrokerService._BrokerCommissionsSelectBroker;

 

// rd.DataDefinition.FormulaFields["ForGoldmanSachs"].Text = "'" + Program.frmSelectBrokerRep.ForDummyReport + "'";

crystalReportBrokerCommissionsSelect.ReportSource = rd;

crystalReportBrokerCommissionsSelect.Refresh();

 

//for printing report for each broker

 

ReportDocument rptdoc1 = (ReportDocument)crystalReportBrokerCommissionsSelect.ReportSource;

rptdoc1.PrintToPrinter(

 

Program._PrinterSettings, new PageSettings(), false);
 
}
 
according to the code..suppose if their are 5 broker seq... 5 pdf is sent to printer...but my requirement   is after  saving the first pdf  it should go the second pdf for printing....is their any way to do it...can anyone please help!

Answers (1)