[AccessD] custom sorts/groups in a report

Susan Harkins ssharkins at bellsouth.net
Mon Apr 19 08:45:57 CDT 2004


That's what I'd rather do, simply because it leaves fewer holes. 

Susan H. 

Hi Susan

Your method looks longwinded but not weird. If it works fast and well I
would leave it, though I'm sure another method could be found where you
adjust the grouping in the report directly.

/gustav


> Well, it's clunky --

> 1.) User selects the first day of the week from a list of Sunday 
> through Saturday.
> 2.) User clicks a command button that opens the report and sends the 
> above selected value via the OpenArgs argument.
> 3.) The report is based on a query that calls a function that uses the 
> value selected in #1 to return a weekday value for each date.
> 4.) The report's grouping is first set to year. The second level 
> groups on the weekday value returned by #3. And, a third sorting level 
> simply sorts the date values so it all comes out in the wash.
> 5.) The group header contains a value that uses the openargs value in 
> a DatePart expression to return the first day of the week for each group.

> You can use the report without the form and it will default to a 
> firstdayoftheweek value of 1 -- to avoid errors and to make it easier 
> to use the report without going through the form -- that way you could 
> set the default to anything and the user could just open the report.

> Seems like it ought to be easier than that though -- just too much going
on.


> #3's the one I don't really like. Seems like I ought to be able to get 
> that weekday number in the report, and although I can -- I can't sort by
it.
> Someone mentioned yesterday that you could group on a calculation, but 
> I've not figured that one out yet. I tried setting it using the 
> GroupLevel and GroupOn properties, but never got it to work -- not 
> saying it won't, just I wasn't successful. I didn't spend much time on 
> it though. My understanding of the GroupOn property is that it needs 
> to refer to a specific integer value that represents the built-in levels
(Month, Year, Quarter, and so on).
> I never could get it to accept a DatePart expression. 

> Susan H.  

> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav 
> Brock
> Sent: Sunday, April 18, 2004 1:00 PM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] custom sorts/groups in a report

> Hi Susan

>> I'm still not happy with the solution -- there's got to be an easier 
>> way. :)

> Maybe. What solution did you settle on?

> /gustav

--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list