Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone.
I have the following macro which loops through a region field and prints the dashboard sheet for each region.
SUB PrintDashboardByRegion
SET val=ActiveDocument.Fields("Region.Region").GETPOSSIBLEVALUES(100)
FOR i = 0 to val.count-1
ActiveDocument.Fields("Region.Region").SELECT val.item(i).Text
' ActiveDocument.ActiveSheet.print
ActiveDocument.ActiveSheet.Dialogprint
NEXT
END SUB
I want to change it to instead of printing the dashboard sheet i want it to print a report but i still want it to loop through the same field.
Can anyone help please?
The report name is
Weekly Sales Report.
We have publisher, but i want any user to be able to do this from the access point.
Is this possible?
Thanks
You don't need a macro for this (and you are better off without it). The capability to loop over a field is included in the Report feature.
In Report Settings, Selections tab, Banding section -- you can select a field to loop over when printing.
-Rob
You don't need a macro for this (and you are better off without it). The capability to loop over a field is included in the Report feature.
In Report Settings, Selections tab, Banding section -- you can select a field to loop over when printing.
-Rob
Thanks for that, i didn't realise that could be done.