Avatar billede verakso Nybegynder
09. september 2008 - 11:11 Der er 5 kommentarer og
1 løsning

Samle flere rapporter i en

Jeg bruger Access 2007, og der er godt nok en feature, der lader mig køre flere rapporter i en PDF fil, men.

Rapporterne kræver to parametrere, en start dato og en slut dato, og bruger jeg PDF merge funktionen, så skal jeg taste disse paramerte ind for hver rapport.

Er er ikke en måde man kunne scripte sig ud af dette, således at man kan køre en bacth af rapportere, og så blot ende op med en færdig rapport?
Avatar billede terry Ekspert
09. september 2008 - 12:26 #1
If you have a form where you enter the dates then you can alter the query which is used in the report to take the date values (criteria) from the form.

Th ecriteria will be something like

Forms!YourDateForm!DateFrom
Avatar billede terry Ekspert
09. september 2008 - 12:27 #2
and another for DateTo
Avatar billede verakso Nybegynder
10. september 2008 - 10:15 #3
This is actually what I am doing today.

The question is, how kan I run and assemble multiple reports in a singe click, so to speak.
Avatar billede terry Ekspert
10. september 2008 - 19:08 #4
I'd need a bit more information before I can suggest a solution.

Are the parameters different for each report? If not then you could maybe put the names of the reports in a table and then in code open a recordset on the table and loop through the records printing the report name you find and taking the parameters from the two date fields.
Avatar billede verakso Nybegynder
07. januar 2009 - 10:56 #5
Hi Terry

I'll try again.

I have 4 reports, all which is based on input fromDate and toDate.

Today, I run the report one by one, passing 8 values into the report, and then I assemble them manually into one report. So far I can live with the pages numbers isn't in sequence.

What I am looking for, is how to merge these 4 reports into one, eg. by clicking a button the runs some VB code the runs the 4 reports and merge them into one final.
Avatar billede terry Ekspert
07. januar 2009 - 12:37 #6
Is there any chance at all in seeing the dB? I'm a little confused as to how things are working now and what you finally want.

You say you have 4 reports but you run them one by one. And that you pass 8 values into THE report. THE report??

Do you mean that each of the 4 reports takes two values (fromDate and toDate)?

If so then the answer I gave 09/09-2008 12:26:14 should work.

if you can send the dB then I'll take a look later
ekspertenATsanthell.dk
AT = @
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Dyk ned i databasernes verden på et af vores praksisnære Access-kurser

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester