1 Replies - 599 Views - Last Post: 01 September 2013 - 04:54 PM Rate Topic: -----

#1 ridhwanr  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 26-August 13

Choosing best report (rdlc) strategy for 3 un-related table

Posted 01 September 2013 - 01:15 PM

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.

Is This A Good Question/Topic? 0
  • +

Replies To: Choosing best report (rdlc) strategy for 3 un-related table

#2 torind_2000  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 55
  • View blog
  • Posts: 284
  • Joined: 22-August 11

Re: Choosing best report (rdlc) strategy for 3 un-related table

Posted 01 September 2013 - 04:54 PM

I'm not sure you have a complete grasp of relational databases.
Those tables could all be related somehow with some minor changes.

Here's a video that explains them fairly well, hopefully you will be able to incorporate some of these concepts into your program.

PS, the video is about databases with PHP but you should be able to google some other examples.

This post has been edited by torind_2000: 01 September 2013 - 04:56 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1