Instead of writing the multiple queries.. you can do the required operation in crystal report itself.
- Since you have
Income
andExpences
separately. Take a main report and in that main report place 2 sub reports side by side in detail section. - In sub report1 take the information of
Income
. Take all the required tables while making connection and link those tables inLinks Tab
of Database Expert. - Similarly in second sub report take
Expences
tables and follow the same process to link the tables.
Link1 and Link2 to know how to link the tables.
4.Now in both the sub reports make groups as following:
Group1: Sub report1 `Income`..
Sub Report2 `Expences`
5. Now create 2nd group in both the sub reports as following:
Group 2: Sub Report1: Date
Sub Report2: Date
6.Now create 3rd group in both sub reports as following:
Group 3: Sub Report1: Balance
Sub Report2: Balance
7.In details place the fields Date
, Particulars
and Amount
and take the summary in group footers as required.
8.To get exact output as screenshot draw lines
between the columns
Let me know how it goes.