473,395 Members | 1,692 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,395 software developers and data experts.

Printing data with ASP

Hi,

I have an SQL statement which outputs the following data:

A: RS("SelectorName")
B: RS("SelectorQty")
C: RS("ShipQty")

For each record printed, I need to calculate (B * C), this is easy
enough.
I set up a variable as follows: TMW = RS("SelectorQty") * RS("ShipQty")

The page currently prints as follows:-

96 50
96 100
96 100
96 100

(96 = SelectorName, 50 & 100 = TMW)
<I want to print here : 96 = 350

97 12
97 18
97 53
97 67

<I want to print here : 97 = 150

..... and so on.

Can anyone help me do this ? or explain how to do this.

****** >>>>Eventually, I just need a page that prints out:
i.e. running through each Selector and printing the sum.

96 = 350
97 = 150

and so on ....... I just though I ought to explain in stages.

Sep 25 '06 #1
2 1477
David wrote:
Hi,

I have an SQL statement which outputs the following data:

A: RS("SelectorName")
B: RS("SelectorQty")
C: RS("ShipQty")

For each record printed, I need to calculate (B * C), this is easy
enough.
I set up a variable as follows: TMW = RS("SelectorQty") *
RS("ShipQty")

I don't understand why you would not do this in the query?
>
The page currently prints as follows:-

96 50
96 100
96 100
96 100

(96 = SelectorName, 50 & 100 = TMW)
<I want to print here : 96 = 350
Again, this can be done in the query.

SELECT SelectorName, SUM(SelectorQty * ShipQty) AS total
FROM yourtable
GROUP BY SelectorName

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Sep 25 '06 #2
See your other post. Essentially the same question.

Ray at work

"David" <da*********@scene-double.co.ukwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
Hi,

I have an SQL statement which outputs the following data:

A: RS("SelectorName")
B: RS("SelectorQty")
C: RS("ShipQty")

For each record printed, I need to calculate (B * C), this is easy
enough.
I set up a variable as follows: TMW = RS("SelectorQty") * RS("ShipQty")

The page currently prints as follows:-

96 50
96 100
96 100
96 100

(96 = SelectorName, 50 & 100 = TMW)
<I want to print here : 96 = 350

97 12
97 18
97 53
97 67

<I want to print here : 97 = 150

.... and so on.

Can anyone help me do this ? or explain how to do this.

****** >>>>Eventually, I just need a page that prints out:
i.e. running through each Selector and printing the sum.

96 = 350
97 = 150

and so on ....... I just though I ought to explain in stages.

Sep 25 '06 #3

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

Similar topics

0
by: Mary | last post by:
Hello, I have a web application that has a specific page for printing data. Now on this page I fill a datagrid with the appropriate data. When the user goes to print the page (which is done...
0
by: Mary | last post by:
Hello, I have a web application that has a specific page for printing data. Now on this page I fill a datagrid with the appropriate data. When the user goes to print the page (which is done...
1
by: appearinggalaxy | last post by:
Hi, I am trying to churn out some statistical data from database and print it out by using printdocument and printdialog, but I realised that the alignment of the data is gone, for instance, I...
2
by: madval | last post by:
hi, i need your help, i'll receive some ms word documents (paragraphs, bullets, different fonts in a document -family-size-format, images, etc. a "normal" document) and i need to print them on a...
1
by: sutarsanjay | last post by:
How To Print Which Is Written In A Text Box From The Front End To The Crystal Report
1
Ali Rizwan
by: Ali Rizwan | last post by:
Hi all, How can print data report in landscape mode./ Thanx >> ALI <<
4
gsgurdeep
by: gsgurdeep | last post by:
I want to print data of datagrid in vb.net form. I tried "form.print" but its not working. Please tell me the solution.......... thanx in advanced...... gud day to all my friends,,,,,,
8
by: jay123 | last post by:
hello, i really need help from you experts. my problem is i have one page abc.aspx, and then their is other page called def.aspx(which is printable version), which gives some information used...
0
it0ny
by: it0ny | last post by:
Hi guys, thanks I am fairly new to this forum so I hope I chose the right place to post this question. I try to make my program printout a deposit's report. I created a class to store the...
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...
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.