Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formview Calculations

Status
Not open for further replies.

tkikkert

IS-IT--Management
Jan 6, 2004
9
US
I'm a beginner with asp.net (vb) as you will be able to tell from this question. I have created an asp.net page which is basically a report showing data pulled from a database using #eval's. The data is basically amounts for each day of the week and I want a total for the week as well as a total of the totals which is not in the database.

How do you go about doing calculations on database fields and put them into a formview? If you could provide an example or point me in the proper direction, it would be greatly appreciated. I've spent the last hour browsing trying to find the answer with no luck. This is the only part of the report that I have left to do. - Thanks
 
Either do the calculations in the sql statement so that you can just write out the total, or get a reference to every object that contains one of the value and sum them up.

Mark,

[URL unfurl="true"]http://lessthandot.com[/url] - Experts, Information, Ideas & Knowledge
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Website Design
[URL unfurl="true"]http://aspnetlibrary.com[/url] - An online resource for professional ASP.NET developers
 
Mark:

Thanks for the quick response. I thought about doing it in the SQL, but it is a lot of fields. There are about 30 entries for each week, so I have to total them for the week and then take the those totals and total them.

Where and how do I reference the data - I am assuming it is in the code behind for the aspx page.

Thanks, Terry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top