Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Posted, Unposted and Sales Rep Tables

Status
Not open for further replies.

chuito7

Technical User
Jan 5, 2005
26
US
Hi:

I have to make a report that shows posted sales and unposted sales for each salesrep. I link the three tables by the salesrepid. Created two detail sections to put in a. Posted table fields, b. Unposted table fields to summarize by salesrepid. The posted and unposted tables doesn't have the same amount of records, the table that has less records than the other began to duplicate the last one.

How can I suppress those records?

Thanks in advance.

Chuito7
 
Post your software version and the database used.

You might use an Add Command to cearete your own query and use a UNION ALL, as in:

select 'posted' MySource, table.date, table.value from table1
UNION ALL
select 'unposted' MySource, table.date, table.value from table2

Hard to say, rather than chat about your data, post examples of the data coming into the report and the expected output.

I doubt that your 2 details sections will work out so well.

-k
 
You are running into a record inflation situation. A salesrep with 10 posted and 5 unposted would end up with 50 records.

If all you need to do is show summary info and you can create a View in your DBMS, there's a simple solution. Create a view on Posted (Grouped By Salesrep) and a View on Unposted (Grouped By Salesrep). You can now join these views without record inflation because each SalesRep would have a single (summary) record in each View.

- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top