CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Recordset rows???

Print topic Send  topic

Author Message
maggiemel

Posts: 75
Posted: 04/28/2004, 6:47 PM

Hello everybody! I am retrieving records from a db, ordering them by a date field. The users would like to have the records numbered on the fly, so that if a record with an earlier date is entered, the returned data will be renumbered to reflect the change.

I know how to use the FormName.DataSource.Recordset.RecordCount to get the total number of records, but I can't seem to figure out how to use that value in my BeforeShowRow statement to create a label with a value that I can increment for each row. Am I clear? I want to simply number the records once they've been retrieved in date order.

Any help is appreciated, as always...





_________________
Melissa Cahill
http://www.hellcatmaggie.net/
View profile  Send private message
peterr


Posts: 5971
Posted: 04/28/2004, 9:54 PM

I'm not sure how you'd use the FormName.DataSource.Recordset.RecordCount because then you would start the counter with your last record and increase it?
I imagine that you'd rather want to start with #1 (or any other number) instead of the total/count, and then increase it.
Therefore create a global variable that contains "1", like:
MyCount = 1
Then display it in the Label and increase it in the Before Show event.

You can create global variables by placing them outside of functions or events, for example between 2 events, or at the beginning of the _events.asp file, or at the beginning of Page.asp.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
maggiemel

Posts: 75
Posted: 04/29/2004, 6:22 AM

Doink! Of course, that's so simple.

Thank you.
_________________
Melissa Cahill
http://www.hellcatmaggie.net/
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.