Report Out With One Click - How To Get Filtered Data In Graph Form
Sep 29, 2014
My company wants me to run a high level report which ask for three filters. However as its high level they want it should run with a click instead of choosing filters from three drop down ...
As this report comes out as a graph I can't use report wizard to run tabular report. Any smart way that they click a button and get filtered data in graph form.
I have a split form with graphs in the upper design section and the table of the data that the graphs represent in the data view underneath. I would like to make the graphs dynamic with the data from the forms if the data is filtered in design view.
I know how to get the filter from the data view by using the .filter and I would like to use that as part of an SQL statement in my Rowsource for the graphs to dynamically change the graphs when a filter is used. My problem is the data is returned with .filter function returns with quotation marks (example below), and because I'm wanting to use that data in a string to change my rowsource the quotes need to be replaced with an apostrophe. How can I change the quotes to an apostrophe, or is there a better way to "filter" a graph?
Example: Returned from .filter ([FrmTable].[CurrentABCS]="A")
Whenever I double-click a graph in a form that is being viewed it opens up MS Graph in edit form. This is confusing/ugly/etc and I don't want it to do that.
I tried adding some code to the double click event to make it do some other action (bringing up some graph modification tools I created), but as soon as those are closed MS Graph will then open up in edit form.
How to turn this off? It's incredibly unprofessional.
I am trying to generate a report that is based off of a query. The query has a form filter that it needs to filter the data. I keep getting a jet engine error and couple others.
The form has year, start week, and end week on it. I can get the query to work fine. When I try to open the report, Access says it doesn't recognize the " [Forms]![frmUptimeFilter]![StartWeek] " as a valid field name or expression.
I want to open a report with the results from a filtered form.
I want to use a similar format to the attached Allene Browne search2000 as the base to filter the records initially, but not sure how to get the filtered results into a report and the most efficient way.
I am trying to print a report based on the filtered results of a form where the data record source is generated from a query. What I have is five unbound comboboxes on a form that filter the results of the query on a subform which works fine in whichever combination I set, I then want the report to print out the results of the filter and the filter combination that I used - basically exactly as it appears on the form (I have used the same query / subform in the report with text boxes to show the filters used on the form). My VBA skills are quite limited (but improving!) and I have trawled the web trying different code examples but can't seem to get it nailed. Current filter code follows;
Code: Option Compare Database Option Explicit Private Sub PrntConfigReport_Click()
I have a button that opens a second form and shows filtered data based on the selection of a ComboBox from the initial form. That all works nicely, I now wish to sort the Data in the new form by [POID].
The code I'm using looks like this;
Private Sub Command5_Click() On Error GoTo Err_Command5_Click
Dim stDocName As String Dim stLinkCriteria As String
I've done this once entirely by accident and can't seem to duplicate it...
I have a report. It has the following:
Report Header: Logo and title Department Header Supervisor Header Group Header Detail Department Footer: Totals Report Footer: Overall Totals for all departments
Here's my question. I have combo boxes on my main form that filter this report. The combo boxes are referred to by the query that runs the report. How do I get proper unfiltered overall totals in my report footer?
I have a suppliers table and a products table. Two forms, Stock form with combobox to list Suppliers and a sub form with combobox that lists Products.I want to select a supplier from the Stock form and then the combobox in the subform to only list products directly sold by the Supplier.Have dabbled in SQL as follows:
SELECT Products.ProductID, Products.ProductName FROM Suppliers INNER JOIN Products ON Suppliers.SupplierID = Products.SupplierID WHERE ((Stocksubform.SupplierID=Stock.SupplierID)) ORDER BY Products.ProductName;
productId ( which is filtered from combo boxes on main form) . productId contains two columns 1 bound column(id) ( hidden with width 0 ) 2 column (desription) ( shown with width 2 )
Now after entering the data when i come back to the form again . It hides the data from the productId field on subform , because data in combo box (on main form) doesn't match. Although the row is showing up , only the text in field (productId) is hidden.
Now when i change data in combo box on main form to match the ProductId , then the productId field text shows again. after changing combo box it hides . What i need is the existing data should not hide when i change the combo box selection.
see pic 1 where product matches and pic 2 where not. please note i am using master child relationship on the form/subform.
I am trying to change the fill colors on a bar graph based on the value the bar graph has.
the bar graph gives the percentages of tasks and I would like to have it so that the fill color of a bar is based on the a set of values for the percentage... so if the percentage of task A is between 0 and 25% it should be red, if percentage of task A is between 25% and 50% it should be yellow, and if the percentage of task A is between 50% and 100% it should be green.
this is the query that the graph is based off of Code:SELECT TEST_RawData.DeliverableDesc, FormatPercent(Avg(PercentComplete)) AS CurrentProgressFROM TEST_RawDataGROUP BY TEST_RawData.DeliverableDesc;
This is the data table of the graph DeliverableDesc | CurrentProgress test 1 | 82.64% test 2 | 55.75% test 3 | 30.09% test 4 | 13.00%
now I have looked at this http://support.microsoft.com/?kbid=200527 and tried to remodel it to my situation but have some concerns. This is what I have so far vba Code: Original - vba Code Private Sub Report_Open(Cancel As Integer) Dim chtObj As Object, strRowSource As String Dim rsRowSourceFiltered As Recordset Dim i As Integer, j As Integer Dim strArrTaskPercents() As String Dim intArrTaskColors() As Integer ' The color integers are those that are used by the QBColor function to assign point colors. Const cBadProgress_Red = 4 Const cOkayProgress_Yellow = 6 Const cGoodProgress_Green = 2 ' Place all the task percents values into an array. ReDim strArrTaskPercents(3) strArrTaskPercents(1) = "10.00%" strArrTaskPercents(2) = "25.00%" strArrTaskPercents(3) = "50.00%" ' Place the task color values into an array. ReDim intArrShipperColors(3) intArrTaskColors(1) = cBadProgress_Red intArrTaskColors(2) = cOkayProgress_Yellow intArrTaskColors(3) = cGoodProgress_Green Set chtObj = Me!Graph10.Object strRowSource = "SELECT TEST_RawData.DeliverableDesc, FormatPercent(Avg(PercentComplete)) AS CurrentProgress FROM TEST_RawData GROUP BY TEST_RawData.DeliverableDesc;" Set rsRowSourceFiltered = CurrentDb.OpenRecordset(strRowSource, dbOpenSnapshot) ' Check to see if the filtered recordset has any records. If rsRowSourceFiltered.BOF And _ rsRowSourceFiltered.EOF Then MsgBox "There are no records to chart." Exit Sub End If ' Loop through the recordset containing the chart's filtered RowSource. rsRowSourceFiltered.MoveFirst i = 0 While Not rsRowSourceFiltered.EOF ' Index i synchronizes the Points collection index with the current recordset row. i = i + 1 ' Loop through the task percents array and look for a match with the field names of the chart's filtered RowSource. For j = 1 To UBound(strArrTaskPercents) ' 1-based ' The first field in the recordset contains the task percent. Some tasks may not be in the filtered recordset. If rsRowSourceFiltered.Fields(0).Value = strArrTaskPercents(j) Then ' Because every task has a corresponding color, the arrays strArrTaskPercents and intArrTaskColors always contain the same number of elements. Assign the color of the chart column, bar, slice etc. Graph10.SeriesCollection(1).Points(i). _ Interior.Color = QBColor(intArrTaskColors(j)) End If Next rsRowSourceFiltered.MoveNext WendEnd Sub Private Sub Report_Open(Cancel As Integer) Dim chtObj As Object, strRowSource As String Dim rsRowSourceFiltered As Recordset Dim i As Integer, j As Integer Dim strArrTaskPercents() As String Dim intArrTaskColors() As Integer ' The color integers are those that are used by the QBColor function to assign point colors. Const cBadProgress_Red = 4 Const cOkayProgress_Yellow = 6 Const cGoodProgress_Green = 2 ' Place all the task percents values into an array. ReDim strArrTaskPercents(3) strArrTaskPercents(1) = "10.00%" strArrTaskPercents(2) = "25.00%" strArrTaskPercents(3) = "50.00%" ' Place the task color values into an array. ReDim intArrShipperColors(3) intArrTaskColors(1) = cBadProgress_Red intArrTaskColors(2) = cOkayProgress_Yellow intArrTaskColors(3) = cGoodProgress_Green Set chtObj = Me!Graph10.Object strRowSource = "SELECT TEST_RawData.DeliverableDesc, FormatPercent(Avg(PercentComplete)) AS CurrentProgress FROM TEST_RawData GROUP BY TEST_RawData.DeliverableDesc;" Set rsRowSourceFiltered = CurrentDb.OpenRecordset(strRowSource, dbOpenSnapshot) ' Check to see if the filtered recordset has any records. If rsRowSourceFiltered.BOF And _ rsRowSourceFiltered.EOF Then MsgBox "There are no records to chart." Exit Sub End If ' Loop through the recordset containing the chart's filtered RowSource. rsRowSourceFiltered.MoveFirst i = 0 While Not rsRowSourceFiltered.EOF ' Index i synchronizes the Points collection index with the current recordset row. i = i + 1 ' Loop through the task percents array and look for a match with the field names of the chart's filtered RowSource. For j = 1 To UBound(strArrTaskPercents) ' 1-based ' The first field in the recordset contains the task percent. Some tasks may not be in the filtered recordset. If rsRowSourceFiltered.Fields(0).Value = strArrTaskPercents(j) Then ' Because every task has a corresponding color, the arrays strArrTaskPercents and intArrTaskColors always contain the same number of elements. Assign the color of the chart column, bar, slice etc. Graph10.SeriesCollection(1).Points(i). _ Interior.Color = QBColor(intArrTaskColors(j)) End If Next rsRowSourceFiltered.MoveNext WendEnd Sub
these are my concerns - first is the strucutre and syntax for the above Sub Report_Open good? -second how do I match percents the query is outputting to the table to the percents I write in the strArrTaskPercents array -third how would I change how it matches percents so that it matches a range of percentages, like the first example if something is between 50% and 100% it should be green.
if anyone can directly help with the code, or indirectly point me to some examples, articles, etc. that might help me it would be greatly appreciated.
I have a main Form "Client" that shows details such as Representatives, phone numbers, status, etc. I also have a main report "CRM" that is a nicer summarized table version of all of my Client form entries.
The "CRM" form will be used by others in my office to see what clients we are contacting, etc. What I want to be able to do is have someone open the CRM form first. If they want to see even more specific info (not everything is included in the report, as that would be too messy), I want them to be able to double click the Client's name on the report and be taking to the corresponding entry on the Client form that shows more details.
Right now my code for the Report which is not working is the following:
Private Sub Client_Name_DblClick()'double click on a client name in the reportDoCmd.OpenForm "Client", acNormal, , "[Client_Name]='" & [Client_Name]'this should open the Client Form to the record of the same client that was double clicked on the reportEnd Sub
I currently have a form from which users can select their name and it will open a report listing events they have attended. It does this through a macro running a filter. What I would like to happen is the same criteria that is being used to filter the report be used as criteria for a different (unfortunately) query that can then generate a graph in the report as well.how to get the criteria into the second query for the graph.
Hey all, I have been trying to filter my report However It doesnt seem to be working the way I would like it to. I have the ability to filter on my form, so I can search Wood* and then there will be 27 records displayed so I can view each one speratly. however now I would like to have it on a report. I would like to then click the report button, and view those 27 records on my report as the layout that I have provied I can see multiple on a sheet. Any ideas?
i've created a form base on a query, and other users will work on it (mainly filter). then i created a report base on the same query... what i want is a "print" button on the form which will print the report, not all records, but only the filtered records after user applied their filters... since users will apply different filters each time, it's quite impossible to make all different filters as query... any idea?
Form 1 - Data entry for a new project Form 2 - Data entry for a task associated with the project in the Form 1
Button on form 1 that opens Form 2.
What I am trying to do:
Use a combobox on Form Two to choose the Project entered into Form 1, so I can capture the Form1 PK as a FK on Form 2.
Here is the problem:
Refreshing the record on the button click so that the new option entered into Form 1 shows up in the combo box on Form 2.
Full disclosure: I'm not much good at VBA so I have been trying to do this by customizing the button macro. I have tried Refresh, and Requery, but I can't seem to get it to update the list in the combo box.
2 questions:
1. How can I get this accomplished? 2. Is there a better way to get this data into the table than what I am trying to do?
I have set up a form on which there is a graph which draws data from a query. I have set up a text boxes to take in the Y axis min, max and interval values so the user can customize the graph according tot he range coming out of the query. This all works fine and is perfect, however, i also need a report and set up a report with the same graph which can be printed to pdf, however, i cant get the y-axis to adjust like i do with the one on the form,
I have a form build up with a subform in access 2003. Then I have an Insert button on this form which when clicked opens another form which is build up with a combo box. Now, when I select a field for example (Student_ID) from the combo box I would like to be in a position to click it once (the respective student_ID) so that the student_ID in that field is transferred to the subform of the initial form, which has a Student_ID field to store the respective student_ID in the table with the Subform.
i have some combobox which shows the column shown into the subform. i can filter the subform using the comboxes. now i need to build an instant report based on the current filtering. i can filter more or less. but i need the current position of the subform into a report.
I have a database with some reports that show all records in a table. Some users want to only see certain rows, so they use filter option (clicking in the field, and using the funnel symbol feature at the top.
I have a print button, but I had only set it to print the report name. So when a user filters a report and clicks print, it still prints every record, instead of the filtered results that they have set.
How can I alter my VBA code for printing so that the button prints whatever results are shown? I don't quite understand how Me.Filter works, so every change I try still prints everything.
Right now its just back to
Private Sub btnPrint_Click() DoCmd.OpenReport "ALL REQUESTS", acNormal End Sub
I have a list of incidents in my Incidents Management Database. It comes up as a grid view when users open the database.
This is what it looks loke (paste the following into address bar of your browser. lh5.google.com.au/snehal.dabhi/R8oc22J_RfI/AAAAAAAABz0/bbIkCzg5whk/image001.png
I want particular incident to open in a form when users double click on any particular incident from the list above. For example double clicking on the first incident (dated 1/03/2008 in the list above) should open the form below with THAT PERTICULAR incident. And double clicking on 22nd incident should open the following form with 22nd incident loaded, so users can edit that incident
please Paste the following into your browser to see the image. lh6.google.com.au/snehal.dabhi/R8oc3GJ_RgI/AAAAAAAABz8/vGSjfr5rZ10/image003.png?imgmax=640
Any detailed help is much appreciated. – I am too new to understand macros and vba. Thanks!
I have a navigation form with a combo box. The combo box has a running list of manifest numbers. I select a manifest number, then click a button that brings up a new form with data related to the selected manifest.
However, I have to click and unclick the 'Toggle Filter' button on the new form to show the correct data each time I open the form.
I have created a database that tracks production by individuals. I have also created a report which includes a pivot chart to give the user a chart view of production.
In the pivot filter of the chart I have associate names, where the user can click all, or individual associates, to see individual production.
The trouble I am having is when the user goes to print the chart, it will only print the chart with the "All" filter view. Even if the pivot chart is filtered to one associate, it will print like "All" was checked.
Is there a way to allow the report/pivot chart to only print the production for the individual who is checked within the pivot filter?