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


     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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.