SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 sql query
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

afreen
Starting Member

3 Posts

Posted - 02/16/2013 :  00:32:31  Show Profile  Reply with Quote
Hi,
I have a table invoice whose fields are customer_name, invoice_id,total,balance .
invoiceid is the primary key whereas custoemer_name is the foreign key..

Now I want to group the invoice for each custoemr ...i want result something as

Shahrukh
Inv1 2000 1500
Inv2 3000 3000

Salman
Inv3 1000 0
Inv6 500 500

where
custoemrnames =sharukh,salman
invoice id=inv1,inv2,inv3,inv4
total= 2000 ,3000,1000,500
balance-1500,3000,0,500

The basic structure should be
customer_name
invoiceid total balance

I need this in a vb.net windows application..after getting this result how can I display it ..in a grdivew ? or how

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 02/16/2013 :  02:26:54  Show Profile  Reply with Quote
one way is to use a reporting tool like SSRS where you can add a grouping based on customername and then show the other details within it

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

afreen
Starting Member

3 Posts

Posted - 02/16/2013 :  02:36:19  Show Profile  Reply with Quote
Im using crystal reports but the problem is if user clicks on invoice id then the invoice form with all its details will open where he can edit invoice details
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 02/16/2013 :  02:49:13  Show Profile  Reply with Quote
you cant have write back on reporting tools atleast in ssrs. for that best thing would be to design a webpage which gives you an edit option

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

afreen
Starting Member

3 Posts

Posted - 02/16/2013 :  02:55:53  Show Profile  Reply with Quote
Im using windows applicaiton...how can i show the above details in a form...?and what is ssrs?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52325 Posts

Posted - 02/16/2013 :  03:06:19  Show Profile  Reply with Quote
ssrs is sql server reporting services

I dont have any app development experience so cant suggest on that. May be some others will be able to help you out.
Please try posting in some ASP.NET forums too

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000