Report Template?

mister

Registered User.
Local time
Yesterday, 20:07
Joined
Apr 29, 2008
Messages
13
If I have to create the exact report many times, the only difference being that I use a different query for each one, is it possible, once the first report has been "formatted" how I want it to look, to "save" this format or create a "template" so that each time I create a new report, using a new query, i don't have to go in to Design/Layout View to set it up?
 
You can use the same report - it cuts down on the maintenance if done right.

Change the recordsource of your report in the On Open event.

I run a series of reports, that show different information regarding profit and loss (all the reports have the same fields \ field names), this way. I use an option group, on the form, will the different "reports" required, then use a select case statement in the on open event of the report to change the recordsource, based on the value selected in the optin group.

I would be interested in alternaive suggestions on how to do this.
 
Thank you. I have to confess that I am not entirely sure what you mean (I am quite new to Access 2007). When you say to change the recordsource of your report in the On Open event, do you mean Design View > Property Sheet > Event? I don't see recordsource.....

And for the next part (use an option group, on the form, will the different "reports" required, then use a select case statement in the on open event of the report to change the recordsource, based on the value selected in the optin group) I am sorry to say "you lost me." Would you be willing to "walk thru the steps" a little slower?
Again, I thank you for any help you may provide.
 
Open your report in design view. Show the properties and navigate to the Event Tab. Select "On Open" - and insert your code here.

Regarding the Option Group, Open your form in design view amnd use you wizard to add an option group (this is on your tool box - right next to the tool box)

I am still antequated and using Access 2000 \03

i have something like - see case 4:
Code:
'fraReports is the Option Group on the form, which lists the reports I want to run

intVal = Forms!frmReports.fraReports.Value

Select Case intVal
'Depending on which option I select, it will chnage the report parameters
'labels. hide \show footers \ change recordsource
    Case 1:
        strLabel = "Profit and Loss Report" ' Report Heading
    Case 2:
        strLabel = "Gross Profit" ' Report Heading
        Me.ReportFooter.Visible = False 'Hide footer
    Case 3:
        strLabel = "Revenue Statement" ' Report Heading
        Me.ReportFooter.Visible = False ' Hide Report Footer
        Me.GroupFooter2.Visible = False ' Hide Footer
    Case 4:
        strLabel = "Course Revenue" ' Report Heading
        strDocName = "qryCourseRevenue" ' Assign query that will act as new recordsource
        Me.RecordSource = strDocName ' change recordsource
        Me.ReportFooter.Visible = False ' hide header
        Me.GroupFooter2.Visible = False ' hide footer
  End Select
Me.lblHeading.Caption = strLabel
 
Thank you for your prompt & detailed reply. Sorry to say that I am still "lost.":(
I don't use forms to enter my data. I do it either in the Query or the original table. Would that still work?
I've not used option groups or codes either.
Thanks!
 
Hi

Yes it would work, but you could be asking for trouble long term - regarding data entry etc.

How do you run your reports? do you just navigate to the reports section and then run them from there.

Not all forms are used for data entry - some are unbound (not linked to underlying tables \ queries) but used just to run commands \ open reports etc.

However, for data entry, I strongly recommend using forms!!

Forms do help with the overall usability of a database - I would invest some time looking into this...


Easy to create: On the forms tab create New \ design view, but do not select a table or query, this will create a basic unbound form.

Play around with the tool box on this form to see what it does - it is worth the effort
 
Again: thanks......
A project to play with!
 

Users who are viewing this thread

Back
Top Bottom