IWPReport Interface

[Top]  [Chapter]  [Previous]  [Next]


This interface can be accessed through the property Report. It allows the preparation of a reporting template definition with obligatory and optional groups, bands and fields.


Please don't forget to activate the double editor and the reporting support:




The second editor can be hidden using: wpdllInt1.Memo2.Hidden = true;


Manage report template and reporting.


Please note the new token to template conversion. It allows it to convert simple text into a reporting template and is suitable to solve most of the reporting problems. Here we discuss the more advanced techniques. Please first read the chapter "Reporting".


In this case you will only need this methods:





Please also see the description of this events:




a)This interface has basic functions to initialize the template editor and start reporting.
b)The property RecordSet makes it easy to create a list in MS Access by using a DAO RecordSet interface.
c)This interface manages an internal XML DB-Description. This DB-Description is used to create a reporting template from all groups, bands and fields which are marked to be obligatory. Optional groups and bands can be selected by the user. A dialog box will show the available elements in this DB-Description as drag&drop repository. Internally the template is managed as XML file - it can also be saved and loaded in this format.

Please see the introduction "Reporting".


The DB-Description is internally managed as a XML structure, it can be loaded from XML and saved to XML. When the XML structure is used to create a reporting template, a copy of the XML data is attached to the template.




By simply calling the method InitTemplate the template is prepared in the upper editor. The user can then add optional fields, adjust text attributes or type in some text.


InitTemplate function parameters:

 Filename:This is an optional filename. If specified the template (NOT the xml data!) will be loaded from this file. This can be usefull to load the initial paragraph style list. If starting with "@", this parameter is used to set the caption for the DB-Description form.
 Mode:If bit 1 is set, the template in the editor #1 will be initialized using the XML data (which was loaded or created). Otherwise, in case a file name was specified, only the report template will be loaded. In this case it is recommended to also set bit 2 to avoid out of sync XML data.

 If bit 2 is set, the engine will load the XML from the report template and overwrite the information stored in the report object.

 If bit 3 is set, the DB-Description form (also called repository) will be displayed. Once this form was displayed the methods ShowTemplate and ShowResult will automatically show and hide this form.



  Load a DB-Description and create a raw report template


  Report.InitTemplate("@A new report",1+4);


  Load a previously created template (RTF or WPT format) & show the repository form



  Only set caption for DB-Description form (must be already displayed)

  Report.InitTemplate("@a new caption",0);


"Repository Form":


This special dialog can be displayed in stay-on-top-mode to insert fields and to update the template using a changed selection of the optional bands. This dialog internally updates the XML structure, so the selection of bands and fields can also be saved back to XML.









[idh_interface_iwpreport.htm]    Copyright © 2007 by WPCubed GmbH