captain27
10-22-2004, 04:40 PM
Under the misc. items on this report I am trying to get all the records for account decription and amount to show per spaceno but only one shows per spaceno. Their should be 3 misc. items for spaceno# 0. what is does instead is make three pages of space no: 0 per each item. I had to put this bill statement on the details section of datareport. what can I do. here is the link to the report sample.
http://www.expodays.net/billstatement.htm
here is my code in sql.
SELECT distinct accountlist.accountdescription, accountlist.amount, accountlist.accountno, info.spaceno, info.name, gas_bill.beg_meter_reading, gas_bill.end_meter_reading, gas_bill.days, gas_bill.cu_ft_used, gas_bill.therms_used, gas_bill.baseline_amt, gas_bill.baseline_therms, gas_bill.over_baseline_therms, gas_bill.tierIII_amt, gas_bill.total_due, info.rent, info.rvcharge, gas_bill.CGCbox, gas_bill.late_charge, gas_bill.misc_charge, gas_bill.billing_adjustment, gas_bill.convfactor, gas_bill.ccharge, gas_bill.tierII_amt, (info.rent + info.rvcharge + gas_bill.baseline_amt + gas_bill.late_charge + gas_bill.misc_charge + gas_bill.billing_adjustment + gas_bill.total_due + gas_bill.ccharge + gas_bill.tierIII_amt + gas_bill.tierII_amt) as grandtotaldue
FROM info INNER JOIN (gas_bill INNER JOIN (cash_receipts INNER JOIN accountlist ON cash_receipts.spaceno = accountlist.spaceno) ON (accountlist.spaceno = gas_bill.spaceno) AND (gas_bill.spaceno = cash_receipts.spaceno)) ON (accountlist.spaceno = info.spaceno) AND (info.spaceno = gas_bill.spaceno) order by info.spaceno
http://www.expodays.net/billstatement.htm
here is my code in sql.
SELECT distinct accountlist.accountdescription, accountlist.amount, accountlist.accountno, info.spaceno, info.name, gas_bill.beg_meter_reading, gas_bill.end_meter_reading, gas_bill.days, gas_bill.cu_ft_used, gas_bill.therms_used, gas_bill.baseline_amt, gas_bill.baseline_therms, gas_bill.over_baseline_therms, gas_bill.tierIII_amt, gas_bill.total_due, info.rent, info.rvcharge, gas_bill.CGCbox, gas_bill.late_charge, gas_bill.misc_charge, gas_bill.billing_adjustment, gas_bill.convfactor, gas_bill.ccharge, gas_bill.tierII_amt, (info.rent + info.rvcharge + gas_bill.baseline_amt + gas_bill.late_charge + gas_bill.misc_charge + gas_bill.billing_adjustment + gas_bill.total_due + gas_bill.ccharge + gas_bill.tierIII_amt + gas_bill.tierII_amt) as grandtotaldue
FROM info INNER JOIN (gas_bill INNER JOIN (cash_receipts INNER JOIN accountlist ON cash_receipts.spaceno = accountlist.spaceno) ON (accountlist.spaceno = gas_bill.spaceno) AND (gas_bill.spaceno = cash_receipts.spaceno)) ON (accountlist.spaceno = info.spaceno) AND (info.spaceno = gas_bill.spaceno) order by info.spaceno