Report_CustomFields.mdb |
Post Reply |
Author | |
A.D. Tejpal
Microsoft MVP Joined: 30 Jun 2008 Status: Offline Points: 192 |
Post Options
Thanks(0)
Posted: 07 Jul 2008 at 11:05pm |
This sample db demonstrates report generation as per user selection of fields (including the order in which the same are to be displayed). Such a feature can be useful for printing labels. CanGrow property of text boxes in such cases is set to No. User can identify fields for inclusion in (or exclusion from) the report by selecting / de-selecting the check box against each field name displayed in a subform. The order in which the selected fields will get finally displayed can also be manipulated by clicking the Up / Dn command buttons adjacent to the subform so as to re- position the selected row as desired. In the subform, field names where the check boxes are in de-selected state are highlighted in a different back color and get positioned at bottom. In report module, any of the two alternative methods mentioned below could be adopted: (a) Provide necessary number of unbound text boxes in the detail section and assign the control source selectively in report's open event. Hide and re- position the redundant controls suitably. (b) Place all potential fields as bound controls and manipulate their visibility and position as required. Since manipulation of visibility & position of controls is involved in both cases, the sample is based upon alternative (b) above, eliminating the extra step involving assignment of control source. For better speed, manipulation of controls (visibility and position) is carried out in report header's format event, instead of using similar event pertaining to the detail section. More-over, it is ensured that the process is confined only to the first pass of formatting. Version: Access 2K/XP/2K3/2K7 (Access 2000 File Format)
|
|
Sponsored Links | Want a good read? Try The Summer of His Life (available on Amazon!) |
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |