Roger's Access Library Homepage
Forum Home Forum Home > Other Download Libraries > MS Access MVP Libraries > Tejpal, A.D.
  New Posts New Posts RSS Feed - Report_CustomFields.mdb
  FAQ FAQ  Forum Search   Events   Register Register  Login Login


Please consider donating $1 per sample downloaded, (find out why here)

Report_CustomFields.mdb

 Post Reply Post Reply
Author
Message
A.D. Tejpal View Drop Down
Microsoft MVP
Microsoft MVP


Joined: 30 Jun 2008
Status: Offline
Points: 192
Post Options Post Options   Thanks (0) Thanks(0)   Quote A.D. Tejpal Quote  Post ReplyReply Direct Link To This Post Topic: Report_CustomFields.mdb
    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)

Download Access 2K/XP/2K3/2K7: uploads/37/Report_CustomFields.zip

--

Email: adtejpal@gmail.com
Back to Top
Sponsored Links


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down