Home » Developer & Programmer » Reports & Discoverer » dispalying 2 invoice numbers for one customer in report
dispalying 2 invoice numbers for one customer in report [message #358631] Wed, 12 November 2008 00:45 Go to next message
radhavijay
Messages: 29
Registered: July 2008
Junior Member
Hi All,
I had a report which is pre printed form report.
in my database one transaction have 2 customers.
both completed invoice.
when i run the report by giving customer name as parameter still im getting invoice number of other customer in report output.

for example 14601 is transaction number
abc is one customer with invoice no 101522 and
xyz is another customer with invoice no 14294
both are credit memos
when i run the report by giving customer name as parametr im getting 101522 and14294 in report in palce of invoice number.

please tell me how to rectiify this issue.

Thanks in Advance,

Regards,
Radha
Re: dispalying 2 invoice numbers for one customer in report [message #358676 is a reply to message #358631] Wed, 12 November 2008 02:25 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As you didn't provide query (or at least its WHERE clause), my lucky guess would be that you didn't restrict records by customer name, but chose transaction which contains this customer and displayed all records that belong to this transaction.

By the way, why don't you use transaction number as a parameter too? It will happen - sooner or later - that the same customer has two (or more) records. Which one will you select in that case?

So, a correctly written query might look like this:
select invoice_no
from this_table
where transaction = :parameter_transaction
  and customer_name = :parameter_cust_name
Re: dispalying 2 invoice numbers for one customer in report [message #358935 is a reply to message #358676] Thu, 13 November 2008 00:49 Go to previous message
radhavijay
Messages: 29
Registered: July 2008
Junior Member
im giving my doubt in detail
2 customer details are created for one transaction number.
while running the report by giving the customer name it is displaying 2 invoice numbers.
transaction number = 14601
customer names are : HOI HUP REALTY PTE LTD with INVOICE NUMBER 14294
and other customer is SAMBO E&C PTE LTD WITH INVOCIE NUMBER 10522.
both completed the invoice.
i had made the changes in report but still im getting the same out put im sending you the report attached with this mail.
THE BELOW ARE THE CHANGES I DID IN Q_INVOICE1
select b.trx_number invoice_no1,
a.trx_number cr_note_no1
from ra_customer_trx_all a,
ra_cusomer_trx_all b,
--ra_customer_trx b
--ra_customers c
where a.PREVIOUS_CUSTOMER_TRX_ID = b.CUSTOMER_TRX_ID /* COMMENTED ARE CHANGES MADE BY ME*/
--and a.bill_to_customer_id=c.customer_id
****but the customer names have different source names.****

THE BELOW ARE THE CHANGES I MADE IN Q_INVOICE

I HAD ENTERED TABLE NAMES IN P_TABLE1 AND P_TABLE2
RA_CUSTOMERS RACUST,RA_CUSTOMER_TRX_ALL RATRX
I HAD ENTERED CONDITONS IN P_WHERE1 AND P_WHERE2
A.CUSTOMER_TRX_ID != RATRX.CUSTOMER_TRX_ID AND A.BILL_TO_CUSTOMER_ID=RACUST.CUSTOMER_ID
WHERE A IS ALIAS NAME OF RA_CUSTOMER_TRX

but still my report output was not changed
see the attached documents


give me your personal mail id so tht i can send u my rdf file for clear clarification.
im new to this work.plz help me

/forum/fa/5294/0/
  • Attachment: raxcr.JPG
    (Size: 51.77KB, Downloaded 1186 times)
Previous Topic: How to Create a Variance in Discoverer
Next Topic: REP-4004 ERROR OCCURRED WHILE RESTORING OLE OBJECT
Goto Forum:
  


Current Time: Fri May 03 14:29:06 CDT 2024