Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 3rd, 2004, 08:56 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default Getting Access to the Group Header

Hi there,

I am creating a CR report that displays order info broken down by the week.

All works nice, and I get info like this:

10/03/2004
====================================
04/10/2004 19.40
03/10/2004 27.00

In this case, the group displays records between 10/03/2004 and 10/09/2004

However, my groupheader needs to display the last day of the group as well, e.g.:

10/03/2004 - 10/09/2004

How can I get access to the last date in the group? Or how can I calculate the last date based on the first date?

Thanks in advance for any help.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Say What You Say by Eminem (Track 17 from the album: The Eminem Show) What's This?
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old November 5th, 2004, 06:44 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

Can you try this.

SELECT MAX(trnDate) 'Max Date',
       MIN(trnDate) 'Min Date',
  FROM summaries

As a query to your resultant query.

Gokulan Ethiraj
 
Old November 6th, 2004, 05:37 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Gokulan,

Thanks for this. However, I am afraid this won't work. I am reporting over, say, a period of a year, grouped by week. However, it's not guaranteed that for each week, all days have associated records.

This, for example, is what I need:

Week 10/10/2004 - 10/16/2004
10/10 200
10/11 300
10/15 400

Week 10/17/2004 - 10/23/2004
10/18 200
10/18 300
10/22 400


As you can see, the lower and upper bound of the reporting period may not always be present. This means I cannot select those dates in a query.

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't Access objects in .net outside of header dehrmantraut Visual C++ 0 January 24th, 2005 03:00 PM
Running Total on group header scamp Crystal Reports 0 May 3rd, 2004 06:18 PM
Group by in Access Report mateenmohd Access 0 February 9th, 2004 02:17 AM
group header in data report nebujacob2000 VB How-To 1 January 12th, 2004 04:41 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.