tag:blogger.com,1999:blog-4721830145069718578.post2841701569305600177..comments2023-04-25T15:15:17.530+10:00Comments on SharePoint Development & Administration + InfoPath: SharePoint Designer (2007) - Run reports for all sites programmaticallyDanielShttp://www.blogger.com/profile/07274977002584498975noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-4721830145069718578.post-62419236749702866112011-08-21T10:27:36.574+10:002011-08-21T10:27:36.574+10:00Steps to create a macro in SharePoint Designer:
Y...Steps to create a macro in SharePoint Designer:<br /><br />You should test the report you wish to automate manually first by running on one or more sites ("Site" menu -> Reports).<br /><br />1. Open SharePoint Designer 2007 and a SharePoint site (eg. the top level site).<br /><br />2. From the "Tools" menu, select "Macros", then "Visual Basic Editor"<br /><br />3. Paste the code from above into the Module that loads when the Visual Basic Editor opens.<br /><br />4. Complete Step 2 from this post to configure the macro.<br /><br />5. Run the macro. You can do this from the Tools -> Macros dialog, or directly from the Visual Basic Editor under the "Run" menu, which I would recommend. Using the Debug -> "Step Into" / (F8) option will allow you to step through the code line by line which may also help.<br /><br />ThanksDanielShttps://www.blogger.com/profile/07274977002584498975noreply@blogger.comtag:blogger.com,1999:blog-4721830145069718578.post-43903859058259006842011-08-21T10:10:52.808+10:002011-08-21T10:10:52.808+10:00@Julie, This is done using a Macro running from S...@Julie, This is done using a Macro running from SharePoint Designer, so you would need to create a new macro and past the code from the example above into the macro. <br /><br />It is essential automating the process of running a separate instance of a report available from SharePoint Designer on various sites.<br /><br />Please also check that you are able to successfully run the reports manually before executing from a macro to help prevent errors. <br /><br />This article was originally written for SharePoint Designer 2007 and MOSS, which I haven't tried using SPD 2010.<br /><br />Has anyone got this working in 2010?DanielShttps://www.blogger.com/profile/07274977002584498975noreply@blogger.comtag:blogger.com,1999:blog-4721830145069718578.post-85154778956179873462011-08-12T18:26:47.820+10:002011-08-12T18:26:47.820+10:00Hi All, I am newbie to Sharepoint designer coding,...Hi All, I am newbie to Sharepoint designer coding, can anyone suggest where to write this code in sharepoint designer? what are the exact steps?<br /><br />thanks<br />JulieJuliehttps://www.blogger.com/profile/16555161300912905027noreply@blogger.comtag:blogger.com,1999:blog-4721830145069718578.post-3245944929041137862010-06-30T02:06:44.457+10:002010-06-30T02:06:44.457+10:00Daniel, this report would save me a ton of time b...Daniel, this report would save me a ton of time but I am receiving the following error message:<br /><br />Run-time error '429':<br />ActiveX component can't create object<br /><br />on this line:<br /><br />Set filesys = CreateObject("Scripting.FileSystemObject")<br /><br />Any ideas why I am receiving this error message?Anonymoushttps://www.blogger.com/profile/08386740432921606092noreply@blogger.comtag:blogger.com,1999:blog-4721830145069718578.post-11450600244973275552010-06-24T02:48:06.091+10:002010-06-24T02:48:06.091+10:00New to all of this, but I received the following p...New to all of this, but I received the following pop-up: "Compile Error: Argument not optional"<br /><br />Not sure what I did wrong. :(Adamhttps://www.blogger.com/profile/18336361651276571097noreply@blogger.comtag:blogger.com,1999:blog-4721830145069718578.post-53995792195197607462010-06-05T05:11:42.965+10:002010-06-05T05:11:42.965+10:00This only works for me when I choose WebViewAllFil...This only works for me when I choose WebViewAllFiles but I get an error on Ln43 whenever I substitute WebViewUsageSummary or WebViewMonthlyPageHits. Do you have any idea what's causing this?Unknownhttps://www.blogger.com/profile/07093494430850927372noreply@blogger.comtag:blogger.com,1999:blog-4721830145069718578.post-91399610282584515312010-05-21T18:38:27.044+10:002010-05-21T18:38:27.044+10:00Hi Manjeet,
Running any report using SPD, or any ...Hi Manjeet,<br /><br />Running any report using SPD, or any browser request for a page on a SharePoint site for that matter will have an impact on the server.<br /><br />In general, using SharePoint Designer to make changes to pages on a site or running reports has minimal impact on the server. If SharePoint Designer wan't so slow when processing requests, this may be a different story.<br /><br />Running the reports on all sites won't affect site performance directly, but will use overall server resources, which in turn may slow load times for any sites/pages hosted by the server.<br /><br />Performing actions such as this should always be first tested in a development or test environment prior to running in a production environment, especially if you are concerned about performance impacts or a more serious error occurring.<br /><br />If in a production environment, process the reports at a time when the server is under no pressure. You can monitor the server's performance while running the reports regardless. Always ensure that the entire environment is backed up before executing any major operation, although running reports using SharePoint Designer is relatively harmless.<br /><br />DanielDanielShttps://www.blogger.com/profile/07274977002584498975noreply@blogger.comtag:blogger.com,1999:blog-4721830145069718578.post-29556641247970617842010-05-19T01:48:24.436+10:002010-05-19T01:48:24.436+10:00Does running these customized reports have a perfo...Does running these customized reports have a performance impact on the sites.Manjeet Singhhttps://www.blogger.com/profile/07146514959748397997noreply@blogger.comtag:blogger.com,1999:blog-4721830145069718578.post-88342932914273996162010-03-12T07:17:46.580+11:002010-03-12T07:17:46.580+11:00You are a lifesaver! This is exactly what I was l...You are a lifesaver! This is exactly what I was looking for...<br /><br />Thanks for sharing!<br />LisaLisaJanehttps://www.blogger.com/profile/02639452418432685301noreply@blogger.comtag:blogger.com,1999:blog-4721830145069718578.post-87050225800894176352010-01-12T07:36:42.892+11:002010-01-12T07:36:42.892+11:00That worked! Thanks, Daniel!That worked! Thanks, Daniel!Unknownhttps://www.blogger.com/profile/16383878600379997249noreply@blogger.comtag:blogger.com,1999:blog-4721830145069718578.post-44753029585162983702010-01-09T11:47:04.280+11:002010-01-09T11:47:04.280+11:00Hi jwb3 thanks for your comment, the second "...Hi jwb3 thanks for your comment, the second "IF" statement should actually be the closing if statement for the first "If".<br /><br />I have edited the code in the post so it should paste into a text editor properly.<br /><br />To fix yourself, <br /><br />Change the line 34, 35 from:<br /><br />Line 34: End<br />Line 35: If<br /><br />To:<br /><br />Line 34: End If<br /><br />Thanks<br /><br />DanielDanielShttps://www.blogger.com/profile/07274977002584498975noreply@blogger.comtag:blogger.com,1999:blog-4721830145069718578.post-68060336069515403862010-01-09T11:22:27.988+11:002010-01-09T11:22:27.988+11:00This is cool, but I just tried it and got a syntax...This is cool, but I just tried it and got a syntax error at the second If...<br /><br />JohnBUnknownhttps://www.blogger.com/profile/16383878600379997249noreply@blogger.com