Jump to content

jamesb

Members
  • Posts

    2,502
  • Joined

  • Last visited

Blog Entries posted by jamesb

  1. jamesb
    Revisiting this, we may now be going down a completely different path (which I feel little, if any, regret about). We're looking at a third party solution which would do exactly what I want it to do. The only problem is the price, and the fact that only the Enterprise license provides the required API. On the other hand I think I can justify the price tag as to build anything more than simple, static reports ourselves, let alone coming close to what this one provides, would take six months at a bare minimum and probably longer.
     
    It's also worth noting, for those who are looking to do some more detailed SharePoint usage reporting on SP2007, that they also have a Lite version available for free.
     
    The product's CardioLog and I'd be interested to know if anyone has prior experience of this or any other information which might be useful. I'm currently trying to schedule a phone call with them to discuss requirements and will be able to update after that.
  2. jamesb
    [font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af]SPFarm[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] farm = [/size][/font][/size][/font][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]this[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2].Farm;[/size][/font] [/size][/font][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]int[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] intTime;[/size][/font] [/size][/font][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]foreach[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] ([/size][/font][/size][/font][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af]SPService[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] service [/size][/font][/size][/font][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]in[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] farm.Services)[/size][/font] [size=2][font=Consolas]{[/font][/size][/size][/font] [indent][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]if[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] (service [/size][/font][/size][/font][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]is[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af]SPWebService[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2])[/size][/font] [size=2][font=Consolas]{[/font][/size][/size][/font] [indent][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af]SPWebService[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] webService = ([/size][/font][/size][/font][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af]SPWebService[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2])service;[/size][/font] [/size][/font][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]foreach[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] ([/size][/font][/size][/font][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af]SPWebApplication[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] webApplication [/size][/font][/size][/font][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]in[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] webService.WebApplications)[/size][/font] [size=2][font=Consolas]{[/font][/size][/size][/font] [indent][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]foreach[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] ([/size][/font][/size][/font][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af]SPSite[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] site [/size][/font][/size][/font][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]in[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] webApplication.Sites)[/size][/font] [size=2][font=Consolas]{[/font][/size][/size][/font] [indent][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af]OrganizationProfileManager[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] organizationManager = [/size][/font][/size][/font][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]new[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af]OrganizationProfileManager([/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af]SPServiceContext[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2].GetContext(site));[/size][/font] [/size][/font] [/indent] [indent][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af]OrganizationProfile[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] root = organizationManager.RootOrganization;[/size][/font][/size][/font] [/indent] [/indent][/indent][/indent] [indent][indent][indent][indent][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]foreach[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] ([/size][/font][/size][/font][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af]OrganizationProfile[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] organizationProfile [/size][/font][/size][/font][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]in[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] root.GetChildren())[/size][/font] [size=2][font=Consolas]{[/font][/size][/size][/font] [indent][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]if[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] (!(listOrganizations.Contains(organizationProfile)))[/size][/font] [size=2][font=Consolas]{listOrganizations.Add(organizationProfile);[/font][/size][/size][/font][font=Consolas][size=2][font=Consolas][size=2]}[/size][/font][/size][/font] [/indent] [font=Consolas][size=2][size=2][font=Consolas]}[/font][/size] [/size][/font] [/indent][/indent][/indent] [indent][indent][font=Consolas][size=2][size=2][font=Consolas]}[/font][/size][/size][/font] [/indent] [font=Consolas][size=2]}[/size][/font] [font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]foreach[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] ([/size][/font][/size][/font][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af]OrganizationProfile[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] organizationProfile [/size][/font][/size][/font][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]in[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2] listOrganizations)[/size][/font] [size=2][font=Consolas]{ [indent]AddOrgPairing(organizationProfile.ID.ToString(), organizationProfile.GetImmediateMembers().ToList< [/indent] [/font][/size] [/size][/font] [indent][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af][font=Consolas][size=2][color=#2b91af]UserProfile[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2]>());[/size][/font] [/size][/font] [/indent] [font=Consolas][size=2][size=2][font=Consolas]}[/font][/size][/size][/font] [/indent][font=Consolas][size=2][size=2][font=Consolas]}[/font][/size][/size][/font] [/indent][font=Consolas][size=2]}[/size][/font]
  3. jamesb
    Due to some, ahem, technical difficulties with getting the custom usage provider to actually trigger (registering wasn't a problem, and it did intercept the event, just never actually triggered it's own handler so I essentially spent several days in order to write a solution which comprehensively breaks usage logging) I've been re-evaluating my approach to this.
     
    New method will still involve logging organisation IDs along with users (any direct memberships get logged with the user, chains are ignored to simplify report filtering), but will log these to a dedicated SQL table in the WSS_Logging database, along with Content Type details, and the custom fields of documents. Then it should be a simple case of creating View and Reports which leverage all of this and pipe them into SharePoint. I'll be putting the code up here once I know it's working.
     
    Update - The code is now up in another blog entry, unfortunately it was too long to include in this one. Currently uncommented but essentially just collates the data required, processes it, fires it off to a couple of methods in order to turn the data into stored procedure calls for SQL, finds the local logging database for SQL and drops the data in through the stored procedures. The stored procedures are there to make sure that entries are updated rather than duplicated if they already exist.
  4. jamesb
    One of the first tasks I've been faced with in my new job is to get some sort of SharePoint usage reporting working. At first I thought this would be nice and easy, after all, SharePoint comes with a nice set of usage reporting which could simply be plugged in to some custom reporting modules - easy, yes?
     
    No. The problem comes in that they want reporting for groups of users. These groups are currently ill-defined, conceptual groupings, so part of the first challenge is to deal with that by getting user management set up. For the time being I've put that off while I concentrate on a method for getting the reports working at all, with the added information that's required. After some hours of hunting I did manage to find this lovely post which was enough to make a start at least.
     
    So after numerous meetings we have now settled on the actual information that needs to be reported, and I've thrown together a quick and dirty system design which'll allow for all of the stats processing to be done away from the SharePoint farm other than the initial collection. So far I've only got the usage receiver itself coded, since interfaces need to go through a few more discussions (Silverlight or no Silverlight, how customizable do the reports need to be, and so on) but I do at least seem to be getting a nice lost of HTTP posts going out with the information and can start building a web service to receive and log them.
     
    If nothing else this should at least keep me out of trouble for a while. Any suggestions or ideas others might have, either for this area or the user management, are more than welcome.
  5. jamesb
    As I'll shortly be setting up my own blog/news site for this sort of thing this is somewhat temporary, but I need somewhere to write rather than forgetting what I plan to put down.
     
    A few people are probably already aware that in September I'm planning to carry out a sponsored cycle ride from De Panne to Sluis and back again, with a total distance of 100 miles (the most direct route is a little short, but we'll be going North of Bruges on the way out and South on the way back to bring it up). Since I've so far only been cycling for a month and a bit this may be a little ambitious, but the idea of fundraising is to do something challenging. Trying to get myself sponsored for an eight mile journal would be a little harder - and it's not easy to get sponsorship for the full distance as it is.
     
    Luckily I have plenty of time left before I actually leave, which'll hopefully let me beg, cajole, guilt and in other ways persuade people to give the charity money. The charity in question is the Alzheimer's Research Trust, which received a little publicity some time ago as being patronized by Terry Pratchett. Of course publicity does not last long and research into dementia is always underfunded as it is.
     
    So a little bit about why I'm doing this. My grandfather was an aeronautical engineer, and contributed a lot to some well known plane designs. Many, many stories were told about this, and we were often taken along to air shows in order to see the planes he worked on (of which my favourite was always the harrier). Some time ago he died, but it is the time leading up to that which is hard for me to talk about.
     
    In the runup to his death my grandfather began suffering from dementia. I rarely saw him at this point, but when I did I was lucky in that I saw his lucid moments. What was harder was seeing the effect that this had on the rest of my family, particularly my parents and grandmother. The strain that the illness put on them was frightening, and I worried about their health as much as anything else. This is not a time I particularly want to go into but anyone who has experienced this will know for themselves.
     
    Research into dementia is not a popular cause. It does not make headline news and is not even a popular topic of discussion, but this research can make a difference not just to those suffering from dementia but everyone around them as well.
     
    So with this in mind I decided to try and raise some money to help. Anything I can hand to the trust will help them fund this research. I am meeting all costs of the trip, and will also be donating what I can, and would ask anyone else who can afford a few pounds to consider sponsoring me at my JustGiving site.
  6. jamesb
    After a hectic couple of weeks, I've finally started looking at the file management thing again. I think this should handle the actual moving and renaming of the file themselves (as yet untested, I plan to test it tonight when I get home). The updating of links in PowerPoint files is currently on hold until either I find a reliable fix for the PowerShell localization problem with Office, or I get around to using PowerShell 2 instead. I'm assuming its fixed there.
     
    For anyone interested in the code, its stuck in below.
     

    function Move-Files ($OldPath, $NewPath, $Overwrite) { $OldPath = $OldPath.TrimEnd('\') + '\' $Filenames = Get-ChildItem $OldPath -Recurse -Include "*.ppt*" foreach ($OldFile in $Filenames) { $Keywords = $OldFile.Split(".") $Limit = $Keywords.Count() - 3 $Buildpath = $Path $NewFile = $OldFile foreach ($Keyword in $Keywords) { if ($Count -le $Limit) { $Buildpath = $Buildpath + ($Keyword) + '\' $NewFile = $NewFile -replace "$Keyword." if (!(Test-Path $Buildpath)) { New-Item $Buildpath -ItemType Directory } $Count ++ } $OldFile = $Path + $OldFile $NewFile = $Buildpath + $NewFile if (!(Test-Path $NewFile)) { Copy-Item -Path $OldFile -Destination $NewFile } else { if (!$Overwrite) { Write-Host -Object "$NewFile already exists - skipping" -ForegroundColor Red -BackgroundColor Black } else { Copy-Item -Path $OldFile -Destination $NewFile -Confirm } } } } }
  7. jamesb
    Someone I know has recently asked me if it's possible to create a tool for them.
     
    What they want is something which'll iterate through several thousand PowerPoint files in a directory tree, renaming them and moving them to a new tree with different subfolders depending on name, and then go through the slides themselves in order to update any OLE links which they contain.
     
    Originally I was hoping to do this in PowerShell and making progress. The problem came when I discovered that PowerShell and Office Automation have problems if your culture isn't set to en-US. I'm not willing to change it just for this (plus I did try changing it, and still had the same problem) and so have had to move to the next step.
     
    I've been learning PowerShell, and a bit of .NET over the last couple of weeks. Just finished installing Visual Studio and I'm going to have a look at whether I can learn to do this within Visual C#. I'm already tripping over a few conventions which are different from PowerShell (having to declare every single variable as strongly typed, and define array sizes is not my favourite thing) but I'm getting there slowly.
     
    If anyone knows any good resources for this, they'd be appreciated. I'm getting there but anything which'd speed up the learning process would be great.
     
    Once this one's out of the way I'll be looking for a new hobby project, and hopefully going back to PowerShell for a bit.
×
×
  • Create New...