Report_SendPartsByGrpLevel.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 10:41pm |
This sample db demonstrates outputting of selected access report group-wise in HTML format. For each different value of the group header, portion of report pertaining to that group value gets saved as a separate html file, in folder named ReportParts, located in the parent folder housing the sample db. If no such folder exists, it gets created programmatically. User selection of report is carried out via list box at left. If desired, copies of report parts group-wise can also be sent as attachments to eMail. User can select destination eMail addresses in subform at right, by selecting the check box named SendMark. If more than one address is selected, eMails with attachments get sent to all the selected addresses. Three different reports are included, grouping books in following alternative styles: (a) Grouped by author (b) Grouped by publisher (c) Grouped by topic Code in report's open event as well as group header's format event is of generic nature. It uses the preliminary formatting cycle to build an array of group values, which are later used to filter the report whole sending / saving the group-wise parts, via subroutine named SendReportPartsByGrpLevel() in general module. This subroutine takes two arguments (report name and eMail address (optional)). If second argument is not supplied, no eMail gets sent (though report parts group- wise are still saved in ReportParts folder, in HTML format). Name of each saved file as well as report part caption reflect the group value as per which the report has been filtered. Spaces in group value, if any, are replaced by underscores, before being concatenated into file name. Important: (a) Make sure that a control bound to the grouping field and bearing the same name is present in the group header section. (b) A calculated control having [Pages] as part of its expression must be present in the report. This is required for ensuring complete preliminary round of formatting, which is used to build up an array of group values. Version: Access 2K/XP/2K3/2K7 (Access 2000 File Format) References: DAO 3.6, Microsoft Scripting Runtime
|
|
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 |