Okay. So for my A2 ICT Coursework I have to create a database and I've ran into some trouble with my final report close to the deadline. Below is the report itself and I need to fill in the blanks output boxes using the query and the two tables.
On the report there are 5 sections: 1 for total and 4 for each of the 4 products. Each product has 3 subproducts - A, B and C. And I have a field with either S, L, I or P so they can be grouped.
I need a calculation of some kind to add up all the points for all 4 products that have been sold and I then need to be able to do this for each individual product.
Report - http://www.dbforums.com/attachments/...-progress1.png
Query - http://www.dbforums.com/attachments/...rogressqry.png
Table - http://www.dbforums.com/attachments/...ields-prod.png
Table - http://www.dbforums.com/attachments/...dcatalogue.png
A person on another site said I should do one of these but I don't know what any of it means or how to do it. If somebody could clarify or say which is the best option for me (an in-experienced database user and maker) or explain it then that would be very helpful.
Thanks.what you could do is use a dsum for each of the categrories, and assign the value of that to a control, it could even be the source for that control
limit the rows processed to whatever the group is
failinmg that I'd resoprt to some VBA behind the relevant events
declare 4 variables at the top of the report
zero those variables in each group header (if you have more than one header/footer pairing then you'd need another set of 4 variables per header footer pairing
add the points value in the reports format event
in the footer fromat event assign the value of the variabels to the relavnt controls
or
I'd drop 4 hidden control onto the reports detail section, one for each type of point
assign a value to each of those controls
eg
=iif(<whateverinidicatesthisissavings>,15,0)
so say you had a column called RowType and it could be one of "I"nvestment,"S"avings and so om
=iif(RowType="S",15,0)
you could use the expression builder to set the control source if you wished
then in the footer add four controls one for each category and set the source for those controls to be the sum of the detail controls defined above
add another control to add those 4 values to give a total points score for this group
you can then repeat the sum bit in other footers
or you coudl use the IIF in the underlying query so thart uyou have the points tally in the query and use as normal on a report