Re: detail section in a report



"kaosyeti@xxxxxxxxxxx via AccessMonster.com" <u15580@uwe> wrote
in 59abd121a26e4@uwe:">news:59abd121a26e4@uwe:

> hey all. i have a report for sales commissions that i'm
> having a little trouble with. each transaction may have
> either 1 salesperson (90% of the time) or 2 salespeople. in
> the event that there's 2, each of them get half credit for the
> sale and half of the commissions earned. my problem is that
> my report (rptcommissions) doesn't show the detail of each
> record if the named salesperson is 'second' in this particular
> transaction.
>
> to clarify, if john smith has a sale split with jane doe, each
> is considered to be half a sale but john is the primary
> salesperson (field salesperson1). in my report, it will list
> all of the records for john on page 1, including this split
> sale. the problem is that for jane, it will list all of the
> records where she was salesperson1 on her page, but i need it
> to also list (seemlessly, if possible) the records where she
> is salesperson 2 and it doesn't do that.
>
> i understand that it's because my report is grouped by the
> salesperson1 field, but i don't know how i can show the detail
> for any back-half split sales. i'm still green when it comes
> to access so let me know if i left out any needed info to
> figure this out. thanks
>
To do this right, you are going to redesign the structure so
that you move the salespersons in a child table, with the fields
for the transaction ID, (as the foreign key back to the
transactions table), and the split fraction (0.5) if split
equally between 2 people, 1 if alone, It will also allow you to
split up a sale 3 or more ways, when that situation will
eventually come up.

You then base your report on a query that joins the salespersons
to the sales.

If you want to keep your existing single table structure, you
could try writing the SQL for a union query to bring in the
salesperson2 field to the salesperson1 position

e.g.
SELECT saleID, saledate, saleperson1 as saleperson from
salestable
UNION SELECT saleID, saledate, saleperson2 as saleperson from
salestable
ORDER BY salesperson;

--
Bob Quintal

PA is y I've altered my email address.
.



Relevant Pages

  • Re: what constitutes the open and close date when we purchase an option, excercise it, then buy/sell
    ... when we purchase an option, excercise it, then buy/sell shares to close ... So how to report this on ... I question the wisdom of entering into a short sale just to ... the sale price would be the amount of the transaction on date D2 ...
    (misc.taxes)
  • Re: formula help, sorting information
    ... Make the Salesperson a Page Field, then you can get a report for each ... Saleperson on a separate sheet. ... > each sale to a salespersons sheet and the new or used tally sheet ...
    (microsoft.public.excel.worksheet.functions)
  • detail section in a report
    ... credit for the sale and half of the commissions earned. ... my report doesn't show the detail of each record if the ... named salesperson is 'second' in this particular transaction. ...
    (comp.databases.ms-access)
  • ESPP taxes
    ... As part of the sale, Company A shares in her ESPP ... The 1099-B reports the transaction in item 1 above as income (which ... How do I report this? ...
    (misc.taxes)
  • Re: Report Sorting
    ... You might find the [Sale Data] so you can add it to the ... didn't design the original report or database, so I've been poking around on ... This particular report doesn't ... Sort by "Collection Date". ...
    (microsoft.public.access.reports)