I have tried some code, dut still do not get good results, pls enlight me, on how to limit a report to a data range, allow preview before printing and if it is not too much to ask, how can I sort a report, where I get subtotals per each category sorted Appreciate your help
Madd
Why not have a look at some of the sample databases supplied by Microsoft: Solutions, Orders, rptSmp97, have examples to answer each of your questions. They are available for download from MS
Pat Hartman
11-25-2001, 02:23 PM
Look at the examples that Rich suggested to understand the details, but in general:
1. To limit the data included on a report, base the report on a query that prompts for selection criteria.
2. The OpenReport Method has a parameter that allows you to specify whether to open the report in PrintPreview or output directly to the printer.
3. Open the report in design view, bring up the sorting/grouping dialog box. That will allow you to specify a sort sequence and also to define group footers for category. In the category footer, add a new control and use the following as its controlsource -
=Sum(YourGroupField)
Rick, Pat, appreciate you help, still far from completing this side, Rick if you can pls advice link or address from sample downloads. Pat, I have tried the openreport procedure, it actually works and generates the report, but still do not get any info on the report it self, sorry if these are eveident questions, but in order to limit my report to a range of dates (which so far I know how to indicate them via a non-bounded form) is it necessary to generate the report based on a quary? tks again for dropping some light this side of the border!