473,407 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

detail section in a report

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

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200512/1
Dec 31 '05 #1
4 1774
"ka******@comcast.net via AccessMonster.com" <u15580@uwe> wrote
in 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.
Dec 31 '05 #2
your info on the union query was spot on. i didn't know you could use a
query this way. it worked perfectly. thank you.

Bob Quintal wrote:
hey all. i have a report for sales commissions that i'm
having a little trouble with. each transaction may have

[quoted text clipped - 19 lines]
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;


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200601/1
Jan 7 '06 #3
"ka******@comcast.net via AccessMonster.com" <u15580@uwe> wrote
in news:59fa7fb23cec9@uwe:
your info on the union query was spot on. i didn't know you
could use a query this way. it worked perfectly. thank you.

Glad to have helped.

I still recommend you move the salespersons info to a child
table, for the reasons mentioned below. Access makes it so easy.

Bob Quintal wrote:
hey all. i have a report for sales commissions that i'm
having a little trouble with. each transaction may have

[quoted text clipped - 19 lines]
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.
Jan 7 '06 #4
to be quite honest, i have no idea what a child's table is. i only touched
access for the first time in sept 05 and before that had done minor work with
excel. (like a 5 step nested if statement in excel - Not VBA - would be my
most complicated formula before about a year ago when i stepped it up). as i
got my learn on with excel, i had a new project that excel just couldn't
handle. that's when i discovered access. i've written a pretty decent db so
far but i have never touched access before 5 months ago and have never, EVER
even heard of vba before then. i get most of my info from sites like these,
then i adapt and add it to my db. once i do that, i can usually morph it on
my own into other areas of the db but not every time for sure.

i guess i'm telling you this because if you'd like to take the time to
further explain your suggestion which completely evaded me the first time,
i'd love to hear it. if you can't dumb-it-down enough or think it'll be too
long to explain here, that's fine too. i just got the hint that you were
genuinely concerned about the results my db will experience in the future so
i felt obligated to find out what you were driving at (especially now that
i've given it to 3 of our other stores to use for tracking their customers).

thanks for your time and help -- it was a huge leap forward for me to get to
know queries a little better. my first report was based on a simple query
based on a simple table, but since then my 8 or so other reports have all
been right off of the tables, a practice i am going to discontinue as of
right now, let me assure you.
Bob Quintal wrote:
your info on the union query was spot on. i didn't know you
could use a query this way. it worked perfectly. thank you.


Glad to have helped.

I still recommend you move the salespersons info to a child
table, for the reasons mentioned below. Access makes it so easy.
hey all. i have a report for sales commissions that i'm
having a little trouble with. each transaction may have[quoted text clipped - 23 lines]salestable
ORDER BY salesperson;


--
Message posted via http://www.accessmonster.com
Jan 10 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: John Baker | last post by:
Hi: Stuck on another thing. On a report I am creating, I want to make the detail section one line vertically. However, in design view, I click on the page Footer Bar ,grab it with the "double...
2
by: Salad | last post by:
Is there a way to determine which section of a form a control is located in code....besides using the tag property?
2
by: dixie | last post by:
I know I've asked this question in the last week, but no matter how hard I look, I can't find it. So I'll type it again. Is it possible to set the height of the detail section of a report using...
3
by: kmacon | last post by:
I have a form that contains a command button. The command button's OnClick event builds a report using the CreateReport and CreateReportControl functions and then opens the main report. I set...
1
by: Tom | last post by:
In the Developers Handbook, Getz provides a way to create a survey report that displays either a line, Yes/No or multiple choice for each question. It's done by placing three controls (one for each...
0
by: Arnold | last post by:
Hi Everyone; In a report, I've essentially recreated a paper sheet by adding various labels--name, date, problem, year, Progress Notes, etc.--and horizontal lines (people have traditionally...
4
by: Mal Reeve | last post by:
Hello, I have a report that has only 2 levels of grouping. The detail section is simply 1 large block for a memo field. I am finding that on some occasions the report errors and generates...
1
by: fixedpower | last post by:
I have an Access 2000 DB for a financial company. I have the table structure completed, but I am having trouble with the report. Basically, I have a Client tbl, a StockShares tbl, and a...
10
by: sara | last post by:
Hi - Is it possible to hide the detail section of a report at run time? I have a report that prints all details, with summary lines. The user would like the report ALSO with just summary lines....
7
by: NJonge01 | last post by:
Hi, I'd like to produce a report that basically looks like an excel printout. Description: Profile Print Report Detail Section with 3 bordered text boxes all text boxes are 'abutted'...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.