Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27019

Choosing best report (rdlc) strategy from 3 un-related table into one report

$
0
0
Good afternoon All,

I have a question - I am still in learning curve on VB.Net programming. I am making a windows application (.Net4) for small Sunday school. This is my challenge and I would love to get help with:

I have 3 tables: PaymentTbl, PayrolTbl, and ExpenseTbl. Now I want to make a report using Microsoft reportviewer (.rdlc)for financial statement specially balance sheet (Total payment - (Total Expense+ Total Payroll). Now, All of the tree table above have no relationship or anything in common. Here is what I have tried so far.

I tried to make a dataset for my report, selecting all the fields I need to calculate the above balance sheet with a where clause (@StartDate, @EndDate)parameter for the report so the user can select a date and get the balance sheet between those two dates - I set the parameter on PaymentDate (WHERE PaymentDate Between @StartDate, @EndDate). Now, I am not getting the result I wanted - it works and give me the balance for the first entry but I can refresh to get the next entry and so on.
I am thinking of another way of doing this since the dataset didn't work for me. I am thinking of creating another table lets call it FinTbl which will have 5 fields (FinID, FinDate, TotalPayment, TotalExpense and TotalPayrol) and then make a relationship of this table with all other three tables.
My question is am I in a right track? is there a better way I can accomplish this? any help leading to solving this problem will be greatly appreciated. please give me a start on this and push me to the right directions. I also tried store procedure where I select all these 3 tables (Cartesian joint) and that didn't help either.

Viewing all articles
Browse latest Browse all 27019

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>