473,657 Members | 2,496 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SQL for Report Graphs

114 New Member
I have a report with graphs, and this report retreives data from a table that is specified by a where-string-generating form (Access 2003).

My problem: the graphs are based on the criteria entered into the form including month and year. The graphs currently only represent the month and year of the last record displayed in the report.

For example, if the report includes records that have months of June, July, and August, the graphs only represent the August records.

The Row Source sql for the graph is as follows:
Expand|Select|Wrap|Line Numbers
  1. SELECT [NAC_exp],Count([NAC_exp]) AS [CountOfNAC_exp] FROM [COMPILE_HIST] WHERE NAC LIKE Reports![Quick Report]!NAC AND Month LIKE Reports![Quick Report]!Month AND Year LIKE Reports![Quick Report]!Year AND MarketID LIKE Reports![Quick Report]!MarketID GROUP BY [NAC_exp];
Thank you for any help!
martin
Oct 24 '07 #1
5 2015
nico5038
3,080 Recognized Expert Specialist
When you need the graphs per month, then use a grouping per month and the graph will show the monthly figures.

Another solution when you want "aal-in-one" is to use the report's query for the graph too.

Nic;o)
Oct 25 '07 #2
martin DH
114 New Member
When you need the graphs per month, then use a grouping per month and the graph will show the monthly figures.

Another solution when you want "aal-in-one" is to use the report's query for the graph too.

Nic;o)
I see what you are saying. What I would like however is that if the report contains only August records, the graphs represent the month of August information. If the report contains records for April, August, and December, the graphs represent all three months' information in one graph.

This may be what you are referring to as "all-in-one" but I'm not sure what to do here. The report actually has no query. There is a form that, when supplied with criteria, creates a where string and opens the report with these criteria.

So, do you think there is a way to allow the graphs this flexibility? Thanks.

martin
Oct 25 '07 #3
nico5038
3,080 Recognized Expert Specialist
Open the report in designmode and directly look into the (Report) properties.
Under the Data tab the form's controlsource will be specified. When this is an SQL string, just place the cursor in the field and press the [...] button at the end.
The query editor will open and now you can use the Save option from the menu to name the query e.g. "qryReportX ". Closing the query will trigger Access to ask a confirmation. Accept this and see that the repot's SQL has been changed into the qryReportX you specified. Finally base the graph on the same query.

Clear ?

Nic;o)
Oct 25 '07 #4
martin DH
114 New Member
I think I see what you are saying. You are saying that after the report has been generated, save the Where string used as a new query and set the graphs to go off of that particular query, correct?
If I understand properly, I don't think that will work because there is the possibility for millions of different Where strings (dates are involved). I wouldn't want the user to have to save a new query each time a report is generated with different criteria (always).
Anything else I can let you know to help?
martin
Oct 25 '07 #5
nico5038
3,080 Recognized Expert Specialist
Incorrect, my proposal is to build the report based on a query (can already be the case, but it could also be a table or a SELECT string).
Now use this query also for the graph.

Nic;o)
Oct 25 '07 #6

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

Similar topics

1
1584
by: C. Dexter Southerland | last post by:
Hi, Thanks in advance for your help. We are looking for a Plug in report writer for and application we are developing. It needs to to be distributed with application and look and feel like part of the application. Here are some thoughts on what we need.
3
1825
by: puunda | last post by:
Hi, Hope I've posted to the right groups. I'm trying create a Crystal Report for the first time using C# (novice at that as well). The CR I can handel. What I want to do is to have a whole bunch of fields in my application (winforms) which the user can select to include in the report or not. I believe I can use the CR Engine to change the report at runtime. Here
0
1343
by: David Ingram | last post by:
Greetings! I have created a report which shows, for each vendor, the comparative totals between this year, last year, and the year before, for each month of the year, e.g.: Vendor: Jan Total Feb total etc... Crapco 4925 59283 etc Crapco '02 9925 25235 etc Crapco '01 234 2385 etc
15
13303
by: Mark C | last post by:
All, I have exhaustingly been looking through the newsgroups in search of a way to systemically output an Access 97 report to a pdf file using the full version of Adobe Acrobat. I want the user to be able to click a button and have the Access report saved as a pdf in a directory specified by me the programmer. I have seen a posting by John Baker promoting a web-sight that has an mde that one can reference in any database but after 30...
0
1692
by: Gerry Abbott | last post by:
Hi All, I have a series of parameters for which there is parameter values over several years. I need to graph each parameter on a graph and put them into a report. I also need to allow the user to select or un-select which parameters need to be in the report. All the graphs will have the same format, ie three pieces of data (one for each year), a Title, and X and Y axis scale, and legends. I could hold this information on a separate table,...
0
1103
by: Dave | last post by:
Hello I have set up a database of students in a program, mainly for statistics. The report I'm having trouble with right now is one that graphs admission rates on a per-term basis. Here's what the report looks like without the graphs (obviously it's a lot better than I can post here, but this is the gist of it): Start Date by Month Status Applications
1
1239
by: robyjoseph | last post by:
hi all . i am doing my first project using crystal reports in .net1.1. I want some graphs to be displayed in the browser. But when i run the project the graphs and cyrstal report icons are not displayed in the browser. Instead a 'red x' mark is only there. I am using IE6 sp2. Can u please help!
1
1196
by: robyjoseph | last post by:
hi all . i am doing my first project using crystal reports in .net1.1. I want some graphs to be displayed in the browser. But when i run the project the graphs and cyrstal report icons are not displayed in the browser. Instead a 'red x' mark is only there. I am using IE6 sp1. Can u please help!
5
1339
by: martin DH | last post by:
Hello, I'm trying to figure out how to display the report footer from several different reports in one master report. There is summary information including graphs in each report footer and I want to create a simple "dashboard-esque" report for managers. I'm sure I need to provide more specifics but I'm not sure what you may need (I've never done much in this area). Thanks for any help! martin
0
8425
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8326
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8845
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8743
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6177
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5647
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4333
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2745
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1973
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.