PDA

View Full Version : Extract values from 2 tables and generate reports



sindhuja
08-13-2008, 04:30 PM
Hi All,

Am not sure how to generate reports in access. :dunno
Any help on this will be highly appreciated.

here is my requirement.

I created two tables grp1 and grp2 in a samplereport database with sample entries.

i need to create report based on the date range the user enters.
for ex, if i pull the reports for 8/14/2008 then the report should have the below entries :

should give me the total of s101, s103, s104, s105
provided we have s101a , s101b, s101c in the table grp1, s101e, s101d, s101e in the table grp2.

now the value for s101 in the report should be the sum of (s101a , s101b, s101c , s101e, s101d, s101e).

similarly for s102, s103, s117, s117...

Am not sure whether i made my requirement clear...also attached the samplereport for the reference.

-Sindhuja

CreganTur
08-14-2008, 05:11 AM
One way you can accomplish this is to make a parameter query that pulls the results you want. Then you can use the Report Wizard- just point the report's record source to the parameter query. Once you complete that, whenever you open the report it will prompt you for the parameter (in this case, a date) and it will open a report for the date you enter.

sindhuja
08-15-2008, 01:49 AM
Thanks for the update Randy !

Just a question..
Is is possible to use the like function in parameter query.
In my requirement i have to pull data from different table using like function. for ex, if it starts with s101..

Help me out in this and am not sure to do the parameter query !

-Sindhuja

CreganTur
08-15-2008, 05:11 AM
Is is possible to use the like function in parameter query.

Yes, parameter queries are designed to work with LIKE.

It could be something like:
LIKE [Enter Employee Name] & "*"
And if you put in only 'R' then you'd get every record where an employee's name start with 'R'.

HTH:thumb