Generating a report based on a given condition access 2007

Enchantix

New Member
Joined
Sep 20, 2015
Messages
34
Hi All,

I have a table with the following columns that i wanted to report based on the shift colour the product was manufactured in but im not sure what statements to use for my query.

The shift colur relates to the 3rd character from the left of the Batch number, where B= Blue, K = Black, P = purple, and R = Red.

Date, Product, Product total, Sum of downgrades, Batch #, Downgrade 1, Downgrade2,..50
10/10 15CD 1398 4 PWB100 2 , 2 ,
10/10 15CD 1398 3 PWK107 1 , 2 ,
10/10 15CD 1398 10 PWP205 8 , 2 ,
15/10 17NS 744 8 PWB408 3 , 2 ,
15/10 17NS 744 11 PWR550 6 , 2 ,
15/10 17NS 744 12 PWR551 4 , 2 ,




Ive generated a query ( group by/ sum) to get a single row for each product and shift colour:

-used the MID function to get me the 3rd letter for the shift colour so i can group them.

- Used the total (by Max) for the product total to get it to a singe row for each product.

- summed the downgrades.

- Total falldown % = (sum of downgrades/Product total).



i just need my report to produce the following for each shift colour besides each other under the detail section based on the date inputs:

ie.

from 10/10/2016 to 15/10/2016

Label Header

Product: 15CD

Detail

Blue - B shift: Red-R shift: Black - Shift: Purple - P Shift

Total falldown: 0.3%

Product total: 1398

Top 5 downgrades
based on sum
(Transposed)

Downgrade 1 2

Downgrade 2 2

Downgrade 3 .

Downgrade 4 .

Downgrade 5 .





Product: 17NS

Detail

Blue - B Shift Red - R shift: Black shift , Purple Shift

Total falldown: 1.1% Total falldown: 3.1%

Product total: 744 Product total: 744

Top 5 downgrades Top 5 downgrades
based on sum based on sum
(transposed) (Transposed)

Downgrade 1 3 Downgrade 1 10

Downgrade 2 2 Downgrade 2 4

Downgrade 3 . Downgrade 3 .

Downgrade 4 . Downgrade 4 .

Downgrade 5 . Downgrade 5 .


If anyone has some guidance that will be greatly appreciated.


Kind regards
 
Not sure you caught my meaning since a sub report has it's own query, thus you should have a separate query for each, not combine them into one.

I think you'll have to post a sample of your data, but please don't use your prior method with lots of row spacing in between. Put it in Excel, ensure the columns fit your data, and dump a sample in a post. You'll get a nicely laid out table. The fact that your data is in columns is not conducive to how data is supposed to be stored in a database, so that may be problematic. It should be in rows.


Ive managed to construct the subreports with a top N query and they work well together.

Thank you so much for your help.


I just have one more hurdle. i now need to generate a report chart for my data below taking into account a number of fields "Product","Shift Colour" for the "total falldown" averaged over a given period. This can be in a single chart or multiple charts for the different products.

Ive added an image of a pivot chart below of what id like to do. ive had several attempts in access to try to get it in the access report chart but it doesnt seem to come off the same. is it possible to do this in access report charts?

DateProductFaceShift ColourAvgOfTotalFalldown
7/09/2016Product 11.5mmR4.57%
8/09/2016Product 11.5mmB4.27%
9/09/2016Product 24.0mmR2.04%
12/09/2016Product 23.0mmR4.01%
12/09/2016Product 24.0mmK3.81%
13/09/2016Product 32.4mmK2.13%
13/09/2016Product 32.4mmR4.15%
13/09/2016Product 44.0mmB3.23%
13/09/2016Product 44.0mmK5.21%
14/09/2016Product 52.4mmB7.80%
14/09/2016Product 52.4mmK1.91%
14/09/2016Product 63.0mmK2.71%
14/09/2016Product 63.0mmP2.39%
14/09/2016Product 63.0mmR3.09%
14/09/2016Product 73.0mmB12.22%
14/09/2016Product 73.0mmP7.63%
14/09/2016Product 73.0mmR13.95%
15/09/2016Product 83.0mmB10.73%
15/09/2016Product 83.0mmK3.91%
15/09/2016Product 83.0mmR4.66%
15/09/2016Product 93.0mmB2.17%
15/09/2016Product 93.0mmR2.36%
<colgroup><col width="89" style="width: 67pt; mso-width-source: userset; mso-width-alt: 3157;"> <col width="130" style="width: 98pt; mso-width-source: userset; mso-width-alt: 4636;"> <col width="48" style="width: 36pt; mso-width-source: userset; mso-width-alt: 1706;"> <col width="109" style="width: 82pt; mso-width-source: userset; mso-width-alt: 3868;"> <col width="147" style="width: 110pt; mso-width-source: userset; mso-width-alt: 5233;"> <tbody> </tbody>


 
Upvote 0

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
This is just my opinion, though I know I'm not alone. Access charting stinks. It always will as long as there's Excel for sale. I couldn't be of much help with Access charting. The one and only time I used it was an experience I'm still trying to forget.
 
Upvote 0
This is just my opinion, though I know I'm not alone. Access charting stinks. It always will as long as there's Excel for sale. I couldn't be of much help with Access charting. The one and only time I used it was an experience I'm still trying to forget.


Fair enough. Sorry to bring back those memories :biggrin:

Thank you mate i really appreciate your guidance.
 
Upvote 0

Forum statistics

Threads
1,215,506
Messages
6,125,194
Members
449,214
Latest member
mr_ordinaryboy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top