notes on the ClassicReport Control

the next update of the ClassicReports for .NET  will include a new databound ClassicReport control so you wont have to write those event handlers unless really necessary.   you will be able to edit the report at design time by clicking the small button that appears when the Template property has focus on the PropertyGrid.  implementing the UITypeEditor was as simple as dropping the ReportDesigner in a form. 

i was flipflopping on whether to use BindingSource or object as the type for the DataSource property.  i finally chose the latter which seems to be the norm.  the UITypeEditor for the DataSource property will have to wait a little longer, maybe a week or so depending on my free time ofcourse. 

i also decided to make public the Document property which you will now use to pass to the Preview control or  PrinterService.  (i will also be making available a PDFService and XPSService soon)  the Document object contains the collection of Pages which the ReportComposer populates. 

Here's how to use the new control programmatically.

ClassicReport report = new ClassicReport();
report.Template = GetTemplate();  
report.DataSource = GetData();
report.Execute();
PrinterService printer = new PrinterService(report.Document);
printer.PrintAll(); 
Published 04-07-2007 3:36 PM by smash
Filed under: ,