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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't make a Bar Graph

Status
Not open for further replies.

OldSlowDog

Programmer
Mar 11, 2002
36
US
I am having problems in using Access 2000 ADP to show a graph on a form. I tried to show a bar graph of daily sales for two stores for a selected month.

The Sales2StoreGraph_sp query that I am using is:
SELECT
CONVERT(char(10), BusinessDate, 101) as BDate,
ROUND StoreASales as A,
ROUND StoreBSales as B
FROM DailySales_tbl
WHERE (StoreID = 5 or StoreID = 11)
AND (Month(BusinessDate) = 4)
AND (Year(BusinessDate) = 2009)
ORDER BY BDate

This is what I did:
1.Insert an Microsoft Graph Chart Object in the form
2.Change the Chart Type to Cluster column.
3.Open up the Properties and change “Row Source Type” to Table/view/StoredProc and “Row Source” to Sales2StoreGraph_sp

The result is not what I expected. I expect to see 31 days on the X-axis and 2 bar graphs for each day for Store A and Store B.

Did I miss anything? Please help.
 
I don't think you arte using ROUND correctly.
ROUND(number, digits)

number
Indicates the number to be rounded.

digits
Specifies the number of digits from the decimal point to which the number is rounded.

Remarks
If the number of digits is greater than 0 (zero), then the number is rounded to the specified number of decimal places.

If the number of digits is 0, then the number is rounded to the nearest integer.

If the number is less than 0, then the number is rounded to the left of the decimal point.

Report Builder rounds down if the number to the right is between 0 and 4 and rounds up if the number is between 5 and 9.

"The result is not what I expected."

How is your result different that what you expected?


All I ask is a chance to prove that money can’t make me happy.
 
Also, I doubt you would see "31 days on the X-axis" if you are querying April.

You also stated "The result is not what I expected." without telling us the result. We can't see your screen.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top