By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,140 Members | 1,301 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,140 IT Pros & Developers. It's quick & easy.

Conditional data on report

tuxalot
100+
P: 200
I have an illustration of a human figure that will form the basis of a report showing injury information occurring in a work-force over time. I wish to pull injury date, body part injured and department into the report and place these text boxes at the appropriate locations on the figure. These data are in TblEmployeeInjury, and I know how to present these in a report however in this scenario some of the body part fields on the report will be blank if there has been no injury affecting that part of the body.

How would I go about creating such a report?

Thanks for the look!
Mar 2 '09 #1
Share this Question
Share on Google+
2 Replies


Expert Mod 2.5K+
P: 2,545
Hi Tuxalot. You do not tell us how many textboxes are involved, and whether or not the number of locations is static or dynamic.

If your report is dynamic - meaning that the overlay of textboxes takes place at run-time because you cannot tell in advance where textboxes are to be placed, or how many of them there are - what you are asking lies well outside of the range of things that Access is normally designed to do and is more like what GIS packages and similar applications like GoogleMaps do when interpreting mapping data. You would need to have x-y co-ordinates attached to your injury data so that you could locate the location at which you want to display the textboxes, and you would need to set the textbox top and left co-ordinates up using VB code at runtime - by no means straightforward. In some ways it would be a lot easier to do an XY plot in Excel onto a custom graphic, using the data label to show the number of injuries, but again you would need a co-ordinate system set upi for this purpose for each type of injury,

If your data is more static - meaning that you know the limits you need to set to the number of locations on your image that you will use - you could set up an image on the detail section of a report, overlay textboxes at particular locations, and feed the values of those textboxes from your data using a suitable query. Null values simply will not display in any event.

This static approach will only work reasonably well if there are relatively few locations involved, otherwise the textboxes will simply overlay one another and be difficult or impossible to read.

Anyhow, perhaps others will have better suggestions but I am bound to say that working with graphical elements is not what Access is best at doing at all.

-Stewart
Mar 2 '09 #2

tuxalot
100+
P: 200
Good stuff Stewart. I appreciate your thorough approach. Let me try to explain further:

I was thinking a static approach. TblBodyParts has 52 entries. I need to somehow GROUP DateOfInjury, WITH Department WITH BodyPart. Only if all conditions exist, for the time frame selected by the user would I want the textboxes visible at a specific location on the graphic. Maybe an example would help. Picture an illustration of a human body. If there is a wrist injury in the Laundry Department and another in the Kitchen within the dates selected during a query, then the illustration on the report would show near the wrist:

BodyPart (txtbox only visible if not null)
DateOfInjury1 - Laundry (could these be a subform or listbox, again only visible if not null?)
DateOfInjury2 - Kitchen

Perhaps an IIF statement in a query then call the resultant fields in the report?

Just thinking out loud...I've no idea what is possible.
Mar 2 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.