Click here to Skip to main content
15,887,822 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello Every One,

Good Afternoon !!

Can someone please Help Me ? I have created a report using Report Viewer, i have 2 tables i am able to get the data from both the tables, problem is something like below.

In one table purchase are saved. & in other all my sales saved.

now what i want to show in the report is something like this.

in a report i want all column from Purchase table & only sum of sales where purchase bill no is xyz. which will give me the over view of balance stock as per my purchase invoice.

say like under invoice no :- PPY001 I have purchased 6 phones & I sold 3 phones from same purchase invoice no in 2 parts(1-2). so the report should show me like.

Purchase :- qty 6 sold 3 balance 3

i will be glade if someone can help me on this.
Posted

1 solution

Hi Vinit,

Why dont you do that by writing a query in your database and returning you table from their. This way you can easily bind your table to report and show the data and manipulation and maintenance will also be easy.
 
Share this answer
 
Comments
Vinit Mumbai 20-Nov-14 7:37am    
Hey Good Evening Praneet,

Let me first thank you for replying my query Thank You !!!

However I am new in Coding I dont know much can you please help me with Query ????
[no name] 20-Nov-14 7:39am    
Yes, but you need to paste the code here first, for both tables which are being used or reeturned.
Vinit Mumbai 20-Nov-14 7:46am    
Hey Dear I have not written any codes yet, what i generally do, from new Items i select data set & USE SQL Statement option there i click on Query Build select both the tables. This auto generates codes for me I am making a windows application in V.S 2013.
member86215483 21-Nov-14 0:09am    
Hi Vinit, as Praneet said, you need to write a stored procedure(SP) in the SQL SERVER . Then call this SP from Visual Studio and fetch the table into your dataset.
Search "How to write SP in SQL" in Google
Vinit Mumbai 21-Nov-14 1:06am    
Hello Good Morning Praneet,

Thank you for your reply let me try, SP if i still have any prob, i will bother you again. :-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900