Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Display first and last record of the recordset in a Header

New Here ,
Sep 23, 2011 Sep 23, 2011

Hello,

I'm using ASP and have a simple form where users can select an employee and then enter a date range to view hours that employee worked with more information from our database.

I want display the first date range and ending date range they entered on the search form in a header row that appears right before the repeating recordset.  I either need to display

the parameters that are URL parameters or the first and last record field item for the date.  I'm not sure how to go about this. Any help would be wonderful! 

Crystal

TOPICS
Server side applications
854
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 23, 2011 Sep 23, 2011

select max(mydate), min(mydate) from mytable where.....

Hard to give better advice without more details...table structures, etc.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 23, 2011 Sep 23, 2011

Thanks. This would work in the query but I need to know how to write this to show the MAX Date and MIN Date using ASP from the recordset.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 23, 2011 Sep 23, 2011

You mean you just want to use a single recordset to display the min/max, and also display all of the records in a repeating region? You could produce the recordset sorted by date, navigate to the first record and store in a variable, then navigate to the last record and store in another variable.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 26, 2011 Sep 26, 2011

Thanks for your reply. I want to display the repeating recordset and have the first and last record show in a title at the top of the repeating recordset. Do you have an example of how to store the first and last record in a variable?

Thanks so much for your help!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 26, 2011 Sep 26, 2011
LATEST

Thanks for this suggestion. I figured it out. I was making it harder than it really was.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines