473,387 Members | 1,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

A formula field for datalists? Bad Idea?

Roy
Ok, here's my problem and I'm a first year webbie, so you'll have to
bear with me. I'm converting some Access reports over to a .NET
website. It's your typical Access cluster$#@$ (pardon my French). The
report is essentially a single row with 10 columns. Each column holds
data mostly independent of the other columns as shown here:

col1 --data is pulled from table "x"
col2 --data is pulled from table "y"
col3 --data is pulled from table "epsilon"

So when I was assigned this, I immediately thought of having a datalist
for each "column" and arranging them to look like a row. No problem.
However, a couple of the columns are formula fields that calculate the
difference between certain columns.

What's the best way to go about creating these "formula fields?" Use a
datalist and populate it in the code-behind? Use a label? Or is there
some other method I'm not considering?

Thanks!

Nov 19 '05 #1
1 1218
If my answer is totally off track - which it could be - then please clarify
what you need help with. What do you mean by [creating these formula
fields]. Are you wondering how to render the results of the calculation on
the page? or how/where to actually perform the calculations?

If it's regarding the specific control in which to display the value - then
sure a Label would work, or a Literal or whatever.

Any calculations should typically be done somewhere prior to the data
getting loaded into your DataList (or whatever meany you plan to display the
data on the rendered page). At some point you have to pull the data out of
the database (or whatever data source you are using). That would be your
first opportunity to do the calculations (e.g., right in the SQL or stored
procedure). Your next opportunity would be in some middle layer class - if
you have one. The last place to do this sort of thing would be in your UI
layer (i.e., your aspx code-behind logic).
-HTH
"Roy" <ro**********@gmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
Ok, here's my problem and I'm a first year webbie, so you'll have to
bear with me. I'm converting some Access reports over to a .NET
website. It's your typical Access cluster$#@$ (pardon my French). The
report is essentially a single row with 10 columns. Each column holds
data mostly independent of the other columns as shown here:

col1 --data is pulled from table "x"
col2 --data is pulled from table "y"
col3 --data is pulled from table "epsilon"

So when I was assigned this, I immediately thought of having a datalist
for each "column" and arranging them to look like a row. No problem.
However, a couple of the columns are formula fields that calculate the
difference between certain columns.

What's the best way to go about creating these "formula fields?" Use a
datalist and populate it in the code-behind? Use a label? Or is there
some other method I'm not considering?

Thanks!

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: James M via SQLMonster.com | last post by:
Hi, I'm trying to count field login totals for users which updates another field in another table. Which is the most efficient method? I don't want to use a standard query as it will take too...
6
by: Jonathan Hollinger | last post by:
Very, very strange problem. In developing a C# ASP.NET application, every so often, DataLists disappear from the build. They remain visible and rendered (though sometimes dropping properties and...
0
by: Roy | last post by:
Ok, here's my problem and I'm a first year webbie, so you'll have to bear with me. I'm converting some Access reports over to a .NET website. It's your typical Access cluster$#@$ (pardon my...
2
by: Nathan Sokalski | last post by:
I have a page on which I want to display several sections each of which contain a list of names. I have two database tables, one of which contains the section headings, and the other contains the...
0
by: RJN | last post by:
Hi I have a main report and a sub report. I have a formula field on the main report and one on the sub report. I want the formula in the subreport to be evaluated after the formula in the main...
0
by: RJN | last post by:
Hi Sorry for posting this message again. I have a main report and a sub report. I have a formula field on the main report and one on the sub report. I want the formula in the subreport to be...
0
by: rjn | last post by:
Hi I have a main report in which I have inserted a sub report. I have a formula field on the main report and one on the sub report. I want the formula in the subreport to be evaluated after the...
3
by: Mike | last post by:
Hi, I have three tables in the following structure (simplified): Table 1: Containing the customers ------------------------------------------------- create table Customers ( int...
2
by: Ole V.-M. | last post by:
Greetings, i have a UserControl, that contains a DataList. That DataList contains as items other DataLists. example: DataList A Row 1 Nested DataList 1 Row 1
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.