Example Reports?

B

bhammer

ACC2003
Can anyone point me to some examples where the user can pick different
sorting and grouping options from a custom dialog or with parameters before
the report is opened? I'm trying to avoid creating and saving multiple
versions of basically the same report, but with different sorting and/or
grouping. Possible?
 
K

KARL DEWEY

In your query that feeds the report you can create a SortOption field in
several ways.
The easiest is a calculated field like this --
SortOption : IIF([Forms]![YourForm]![CheckBox] = -1, [Field1], [Field1])

You can nest more IIFs or use Option Group instead of check boxes.

You can also change from ascending to descending by having a second field
SortOption_1. A check box to control which field outputs data or null.
Then in the report have both fields in the one Sorting and Grouping but one
ascending and other descending. The one that has an output will result in
the sort as null will not affect sorting.
 
B

bhammer

Karl,
I don't forsee a need in this db to choose Asc/Dsc for any fields, but
more like choosing bewteen fields:

1) Group by Issue; sort by Address, then Date, then PhotoNum
2) Group by Address; sort by Issue, then Date, then PhotoNum
4) Group by Address; sort by Date, then PhotoNum
5) No Grouping; sort by Date, then PhotoNum

I don't suppose it's possible to programatically change the Grouping,
since the related Header/Footer needs to be designed. If I have
Sort_Option in the query, so I then leave the Sorting dialog in the
Report blank?
 
K

KARL DEWEY

If I have Sort_Option in the query, so I then leave the Sorting dialog in the
Report blank?
No. Access reports ignores any query sorts (majority of the time).

As I said you can use IIF statement to create a calculated field to group ot
sort on. This calculated field is in addition to the other fields you want
to have in the output.
 
B

bhammer

I've never seen an report with a popup dialog that does something like
this. I'm sure it's been done, but Northwind doesn't have one. Can you
point me to an example?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top