Prev: VO2Oracle - storing and retrieving images in the database
Next: AdsMgGetLocks is not returning the correct number of locked records
From: WHIZZWILLY on 27 Jun 2007 15:43 Hi I have just started using Reportpro 2.14d and require a special report writing that isn't really feasible from the Designer. I have heard that hard coding reports is possible prior to version 3 but I haven't a clue how i would achieve this. Could any member please post a sample code example or even better send me an example of how to hard code a report. send to whizzwilly(a)yahoo.co.uk please Regards Paul
From: Chris Pyrgas on 27 Jun 2007 16:17
Hi Paul, > I have just started using Reportpro 2.14d and require a special report > writing that isn't really feasible from the Designer. I have heard > that hard coding reports is possible prior to version 3 but I haven't > a clue how i would achieve this. > > Could any member please post a sample code example or even better send > me an example of how to hard code a report. This is a very very simple sample to get you started: CLASS SimpleReport PROTECT oRpPrinter AS RpPrinter METHOD Init(oShell) CLASS SimpleReport SELF:oRpPrinter := RpPrinter{oShell,SELF} // callback method, here's where all drawing takes place METHOD PrintPageBody(oPr) CLASS SimpleReport oPr:DrawText(1 , 1, "My first hand coded report") RETURN PRINT_NOMORE and in order to print (or preview) the report : METHOD PrintButton( ) CLASS SomeWin LOCAL oSimpleReport AS SimpleReport oSimpleReport := SimpleReport{SELF} oSimpleReport:oRpPrinter:PrintPreview() Have a look at the help file on RpPrinter and PtrDevice classes, it will then be very easy to make the report a bit more complex ;) hth, Chris |