Graphics in a report

  • Thread starter Thread starter Brian
  • Start date Start date
B

Brian

I am attempting to create a report that will have data
pertaining to an item. I would like to represent one of
those pieces of data with a "bar" at/near the bottom of the
report.(Each item's report will be 1 page). I would like
the bar length to be the same for each item's report, but
to have it divided into an equal number of increments that
will be different from item to item, based upon the data.
Example data: Item A, 100 hours, thus 100 increments.
Item B, 24.5 hours thus 24.5 increments.
It sounds possible to me but I have no idea how and
thought I would let somebody have a crack at a solution.
Any help would be apreciated
 
I am attempting to create a report that will have data
pertaining to an item. I would like to represent one of
those pieces of data with a "bar" at/near the bottom of the
report.(Each item's report will be 1 page). I would like
the bar length to be the same for each item's report, but
to have it divided into an equal number of increments that
will be different from item to item, based upon the data.
Example data: Item A, 100 hours, thus 100 increments.
Item B, 24.5 hours thus 24.5 increments.
It sounds possible to me but I have no idea how and
thought I would let somebody have a crack at a solution.
Any help would be apreciated
Brian,
Not sure of the result that you are looking for.
The below will get you a range of squares (similar to a bar graph).
The length of the bars will vary.

I don't know what the range of the data will be but perhaps this will
get you started.
Add an unbound text control to the report section that [ItemA] is in.
Set it's control source to:
=IIf([ItemA]>0,String([ItemA],"n"),"")
Set it's Font to "Wingdings"
Set it's fontsize to whatever works.
You will get a square for each value.
If the scale is too big, use:
=String(Int([ItemA]/3),"n")
to make each square 1/3 of the actual value.

Alternatively, try using the Monotype Sorts font,
and setting the control source to:
=IIf([ItemA]>0,String([ItemA],"y"),"")
You'll get a vertical bar.
Or =IIf([ItemA]>0,String([ItemA],"z"),"")
See which ones you like better.
You will not get decimal values whichever method you use.
 
There are several examples of drawing rectangles based on table/record data
in downloads from http://www.invisibleinc.com/divFiles.cfm?divDivID=4. Check
the calendar report as well as the Corp Tech Demos.

--
Duane Hookom
MS Access MVP


I am attempting to create a report that will have data
pertaining to an item. I would like to represent one of
those pieces of data with a "bar" at/near the bottom of the
report.(Each item's report will be 1 page). I would like
the bar length to be the same for each item's report, but
to have it divided into an equal number of increments that
will be different from item to item, based upon the data.
Example data: Item A, 100 hours, thus 100 increments.
Item B, 24.5 hours thus 24.5 increments.
It sounds possible to me but I have no idea how and
thought I would let somebody have a crack at a solution.
Any help would be apreciated
Brian,
Not sure of the result that you are looking for.
The below will get you a range of squares (similar to a bar graph).
The length of the bars will vary.

I don't know what the range of the data will be but perhaps this will
get you started.
Add an unbound text control to the report section that [ItemA] is in.
Set it's control source to:
=IIf([ItemA]>0,String([ItemA],"n"),"")
Set it's Font to "Wingdings"
Set it's fontsize to whatever works.
You will get a square for each value.
If the scale is too big, use:
=String(Int([ItemA]/3),"n")
to make each square 1/3 of the actual value.

Alternatively, try using the Monotype Sorts font,
and setting the control source to:
=IIf([ItemA]>0,String([ItemA],"y"),"")
You'll get a vertical bar.
Or =IIf([ItemA]>0,String([ItemA],"z"),"")
See which ones you like better.
You will not get decimal values whichever method you use.
--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.
 
Fred;
Thanks. I had done that before on some things, and could
not remember how.

The difference this time is that I want the overall size
of the control be the width of the report and the number
of boxes equally divided amongst that area change with the
value of [ITEMA]. If Not, is there a way to close the
spacing between characters to 0 so that it looks like a
continuous line of boxes.

The grand scheme of this report is to allow somebody to
shade or color in the boxes for an items' build time much
like you see a contribution "thermometer" for fund raising
activities.

Thanks again for your information.
-----Original Message-----
I am attempting to create a report that will have data
pertaining to an item. I would like to represent one of
those pieces of data with a "bar" at/near the bottom of the
report.(Each item's report will be 1 page). I would like
the bar length to be the same for each item's report, but
to have it divided into an equal number of increments that
will be different from item to item, based upon the data.
Example data: Item A, 100 hours, thus 100 increments.
Item B, 24.5 hours thus 24.5 increments.
It sounds possible to me but I have no idea how and
thought I would let somebody have a crack at a solution.
Any help would be apreciated
Brian,
Not sure of the result that you are looking for.
The below will get you a range of squares (similar to a bar graph).
The length of the bars will vary.

I don't know what the range of the data will be but perhaps this will
get you started.
Add an unbound text control to the report section that [ItemA] is in.
Set it's control source to:
=IIf([ItemA]>0,String([ItemA],"n"),"")
Set it's Font to "Wingdings"
Set it's fontsize to whatever works.
You will get a square for each value.
If the scale is too big, use:
=String(Int([ItemA]/3),"n")
to make each square 1/3 of the actual value.

Alternatively, try using the Monotype Sorts font,
and setting the control source to:
=IIf([ItemA]>0,String([ItemA],"y"),"")
You'll get a vertical bar.
Or =IIf([ItemA]>0,String([ItemA],"z"),"")
See which ones you like better.
You will not get decimal values whichever method you use.
--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.
.
 
Fred;
Thanks. I had done that before on some things, and could
not remember how.

The difference this time is that I want the overall size
of the control be the width of the report and the number
of boxes equally divided amongst that area change with the
value of [ITEMA]. If Not, is there a way to close the
spacing between characters to 0 so that it looks like a
continuous line of boxes.

The grand scheme of this report is to allow somebody to
shade or color in the boxes for an items' build time much
like you see a contribution "thermometer" for fund raising
activities.

Thanks again for your information.
You can probably get a bar with spaces and a solid bar by
concatenating two strings.
Set the control to the Monotype Sorts font.
=IIf([ItemA]>0,string([ItemA],"y") & string(100-[ItemA],"n")

Try both the "y" and the "z" in the first string.
the "n" will give the appearance of a solid bar.

You'll need to experiment with the 100 figure to arrive at a working
value.
 
Back
Top