473,385 Members | 1,901 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,385 software developers and data experts.

MS ACCESS Graph with fixed X values

66 64KB
Hi Team,

I would like to show the productivity in a bar graph in a form, I created pivot chart and inserted but data labels are fails to show and major disadvantage is it is not working in 2013 as the pivot chart was removed. Then I created a cross tab and added a Graph in form but that has a problem in showing the X axis values as the cross tab query will show the data in column order.

Now I tried with select query in row order and tried to run the graph but it is not showing me all working hours.

For eg. if we create query to show data column wise we can add IN statement and run the query but I would like to show column wise here is there any possiblity to show 9 hours mandatoryly and show the relevant count if exists

eg:-

Hours | Count
------------------
18 3
19 5
20 0
21 2
22 2
23 1
24 0
01 6
02 7
03 8


Expand|Select|Wrap|Line Numbers
  1. PARAMETERS [Forms]![frmDBC]![txtProdDt] DateTime;
  2. SELECT Format([PrcsEnTime],"hh") In (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24) AS Hours, Count(tblProdctnDtl.ProcessorID) AS [Count]
  3. FROM tblProdctnDtl
  4. WHERE (((tblProdctnDtl.ProductionDt)=DateAdd("d",-1,Date())) AND ((tblProdctnDtl.ProcessorID) Like "JDAS"))
  5. GROUP BY Format([PrcsEnTime],"hh") In (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24)
  6. HAVING (((Format([PrcsEnTime],"hh") In (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24))>18));
  7.  
I tried the above in select query but 0 results, but When I dont add
Expand|Select|Wrap|Line Numbers
  1. IN  (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24))>18));
the query gives output but only the worked hours.

I want to display all hours and the values for worked hours.

Please help me whether I can plot the graph in any other ways.
Feb 6 '15 #1
4 1410
johny6685
66 64KB
OMG!!!! :-O I just fixed it just by clicking on BY ROW in the Graph edit window by double clicking it..

Now I have a challenge to restrict the 24 hours to 9 hours from the login time...

But I am not sure how to make changes in "IN (1,2,3,4...,24)" statement ....

will it accept formulas?
Feb 6 '15 #2
johny6685
66 64KB
BTW it is not accepting the code within the IN statement, any one please help me out on how to make the hours restricted for each processor login time.

Expand|Select|Wrap|Line Numbers
  1. In ( (Format(([Forms].[frmDBC].[lblogtim]),'hh'))+1,(Format(([Forms].[frmDBC].[lblogtim]),'hh'))+2,(Format(([Forms].[frmDBC].[lblogtim]),'hh'))+3,(Format(([Forms].[frmDBC].[lblogtim]),'hh'))+4,(Format(([Forms].[frmDBC].[lblogtim]),'hh'))+5,(Format(([Forms].[frmDBC].[lblogtim]),'hh'))+6,(Format(([Forms].[frmDBC].[lblogtim]),'hh'))+7,(Format(([Forms].[frmDBC].[lblogtim]),'hh'))+8)
Feb 6 '15 #3
johny6685
66 64KB
I have even tried this, but I am still unlucky

Expand|Select|Wrap|Line Numbers
  1. In ( (DateAdd("h",1,([Forms]![frmDBC]![lblogtim])))
Feb 6 '15 #4
Rabbit
12,516 Expert Mod 8TB
You will need to outer join the results to a table that contains a record for each hour so that you can insert blank rows for those hours that have no data.
Feb 6 '15 #5

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

Similar topics

13
by: Dark Rayden | last post by:
Hi! I recently got a strange problem and I have no idea on the solution. I try to do a ORDER BY statement with a fixed order of values, because my client want's it this way. My approach is...
3
by: Bari Allen via AccessMonster.com | last post by:
I have a database in a Front-End/Back-End User Environment, which has been running fine, for 4 years. Lately, when the users try to enter data (from a form into a single table) they've been...
1
by: Gary Frank | last post by:
I added a couple of labels and a button to a Datalist control called "dlSignIn" by adding them to the Item template. The labels are bound to a dataset column. Program code gets executed in the...
4
by: Bob Rock | last post by:
Hello, I'd like to programmatically access keys and values of on .resources file embedded in my assembly. I've seen that the assembly class provides the GetManifestResourceStream method .......
0
by: nbelani | last post by:
Hi, I am trying to plot a log scale on the x-axis and I am using scatter plot. is it possible to plot a secondary Y-axis at the 0 point on x-axis to separate out the negetive and positive values?...
5
by: sklett | last post by:
I'm not real experienced with asp.net so this may be obvious. I've got a situation where some of my client side javascript is causing my posted form's controls to lose their values. In other...
0
by: savas_karaduman | last post by:
Access graph only response for values , it is not responding for text which refers to value... Is it a common rule for Access ?
1
by: Audrey Abbey | last post by:
I have a graph that is giving me fits. It is based on a query. The query returns the expected results if it is run by itself, so the query is fine. The graph, however, displays exactly one...
2
by: vk2012 | last post by:
I am trying to plot a graph that takes a range of xvalues stored in a list and a function 'y' that takes those values as one of its operand . 'y' values are also stored in another array for each of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.