0

I hav two tables
sales (sa_no,sa_date,cu_id,total)

     ladger(ledger_id,cu_id,payment,payment_date)

     I want to display the transactions of a customer (cu_id) in one crystal report in the order of dates ,such as

         sa_no    sa_date   total

             ledger_id   payment  payment_date


     ie one row from sales then one row from ledger for the customer cu_id

     Please help me , I hav been trying for a week to solve this.

Edited by bijoy.balakrishnan.3

2
Contributors
1
Reply
16
Views
3 Years
Discussion Span
Last Post by jared.geli
0

First do a SQL statement with Join. I'm going to use Left Join but feel free to try other Joins you see fit in your project

 Select sales.cu_id as [cu_id], sa_no, sa_date, ledger_id, payment, payment_date, total from sales Left Join ladger on sales.cu_id = ladger.cu_id

Drag all the columns you want from their repsective table to the report and you're done.

Notice that I use an alias on sales.cu_id because Crystal report is sensitive to column names or else the cu_id will not show up on the report

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.