Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 CONSOLIDATING MULTIPLE FIELD TOTALS INTO A NEW TABLE BEFORE PRINTING

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-01-01 : 23:11:42
ASHOK writes "I have a database that has 3 tables. The tables have details
of persons under various classifications, like for eg:

nationality ( 10 types )
age < 50
race ( 10 types )
sex M/F
Degree holder Y/N
an so on

I need to produce a report which prints
a consolidation statement nationality wise age race sex degreewise totals on a tabular form constructed as per requirement.
for this i need to consolidate all the details into a new table
so that i get and print directly into the form

I need to do this via VB and the next stage via web using ASP
with SQL 2000.

Please let me know how i should handle this and if possible please give me the code.

I also want to know if it is possible to print directly
to the printer as we do in not GUI softwares.
if it can be done , what is the format of code to use
to print line by line with formating as we do in cobol or foxbase etc.

regards
jv"

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2002-01-03 : 16:19:38
quote:
Please let me know how i should handle this and if possible please give me the code.



SURELY you're not asking us to do all your work for you...

At first glance it sounds like you might be in need of a Pivot Table. Do a search on articles here at SQLTeam for pivot tables and you'll find some good info. I don't understand the mix of VB and ASP you are asking for, but in VB you can print straight to the printer by using the Printer object. In ASP, you want the printout to appear on the client's printer, so you can use something like a javascript document.print command, but that will print the entire page, so make sure it's formatted properly first.

--------------------------------------------------------------
1000 Posts, Here I come! I wonder what my new title will be...
Go to Top of Page
   

- Advertisement -