Links: Sites About Me
Excellence - http://excellence.bergren.net
Pics - http://picasaweb.google.com/rnbergren
Bibles - www.ilikebibles.com
Polk City - www.polkcity.org
Church - www.ridgelife.org
Need a PDF Form -
www.bergren.net/pdf
DMACC - wwww.dmacc.edu
http://rnbergren.stumbleupon.com/
twitter
Linked In

Having fun being a father and a web geek.

Hello, my name is Rod Bergren

Who am Who am I?  I am a geek/programmer/webmaster/manager for the bestest company.  I write applications for Web Services and Windows.  I also do on the side contract programming as my time allows (which is not very much).

 

Tuesday, July 10, 2018

Borked SharePoint site? Anyone?
I am ending up with this.















Code Example is here. Powershell

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client")
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime")
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.SharePointOnlineCredentials")

$tempC = new-object System.Net.WebClient
$tempC.UseDefaultCredentials=$true
        $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext("http://bergren.net/")
        $Ctx.Credentials=$tempC.Credentials

        #Get the Web
        $Web = $Ctx.web
        $Ctx.Load($Web)
        $Ctx.ExecuteQuery()
   
        #Frame Master page URL
        $MasterPageURL = "$($web.ServerRelativeUrl)/_catalogs/masterpage/seattle.master"

        #Set Default Master page & Custom Master page
        $web.CustomMasterUrl = $MasterPageURL
        $Web.MasterUrl = $MasterPageURL
        $web.Update()
        $Ctx.ExecuteQuery()

        $fontSchemeUrl = "$($web.ServerRelativeUrl)/_catalogs/theme/15/fontscheme003.spfont"
        $themeurl =  "$($web.ServerRelativeUrl)/_catalogs/theme/15/Palette013.spcolor"
        $imageUrl =  "$($web.ServerRelativeUrl)/_layouts/15/images/siteIcon.png?rev=23"
     
        $web.ApplyTheme($themeurl, $fontSchemeUrl, $imageUrl, $false)
        $web.Update()
        $Ctx.ExecuteQuery()


Thoughts and Ideas are welcome.
Wednesday, April 11, 2018

Pano of saylorville

Just a picture

Saturday, March 10, 2018

Sun Dog from January this year.
Just found this on my camera.  Forgot I had taken it.  One kewl thing about -20 below


Friday, February 09, 2018

Most Important TV shows for my life
a while back one of those stupid survey things came up on the fb.  It was asking what the most important three TV shows/Movies of your life that impacted you.  

Got me to thinking.  I do have three.  But I have a ton of others that I would love to just site and watch over and over.  FireFly for one.  Really you need to see this show if you haven't.  FireFly free on just about everything.  Greatest Space Western of all time.

Anyway here is my list.  
most important TV shows of my life?
Buck Rodgers - taught me the future isn't what it used to be.    Computers might take over and they might actually work with us.
Macgyver - Anything is fixable
Captain Kangaroo - Childhood and adulthood should be fun.  And green jeans are cool. I am wearing some today actually

honorable mentions

Mash
Archey Bunker
Fresh Prince
Greatest American Hero
Hogans Heroes
Ba Ba Black Sheep
Lone Ranger
Warner Brothers Bugs and Road Runner
Bewitched
Love Boat 8 pm sat
Fantasy Island 9pm Sat 
Cosby Show 
Happy Days
Dukes of Hazard
Thundarr the Barbarian
Dungeons and Dragons Cartoon 
Star Trek
Space Above and Beyond
Dark Angel
FireFly
Reef Doctors (Australian  Great Show)
Last Man Standing
Wednesday, September 13, 2017

SSRS Pageviewer in SharePoint formatting incorrectly 2016
&rs:format=HTML4.0  

There is your answer.  Ok, so you don't need me anymore.  

Anyway reports are supposed to be embedded in a page with the pageviewer webpart in SharePoint 2016.  The Expansion is on one line and the group name is on another line.  

It isn't supposed to be this way.
In the IDE and in SSRS browsing on the Reporting Server it looks just fine.

which is nice and compact.

Hmmm what is going on?

After some googling.  Which didn't really give me what I wanted I found this page

https://technet.microsoft.com/en-us/library/ms152835%28v=sql.105%29.aspx?f=255&MSPPError=-2147217396

So reading thru there I find that adding format= might change the formating.  So I tried the 
&rs:format=HTML4.0

Which worked.

I just added that to the end of each of my URLS in the pageviewer and I was good to go.

Hope this helps.

&rs:format=HTML4.0

Saturday, June 17, 2017

Pretty night in Iowa

Just wonderful

Monday, June 05, 2017

XML Document from SharePoint 2016 Client Context
Yep this is always ugly.  I have had many opportunities in the past to read the XML file from InfoPath or some other source and open it to get information and create a workflow load into various other systems.  We aren't going to discuss the pros and cons of this.  Suffice it to say it isn't always optimal.  But sometimes things have to be done.

Trying to read thru the following sites. 
Microsoft's fun documentation
https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.web_members.aspx

Obligatory Stack Exchanges to get some ideas on what is going on.
https://stackoverflow.com/questions/9847935/upload-a-document-to-a-sharepoint-list-from-client-side-object-model

https://sharepoint.stackexchange.com/questions/62087/how-to-get-a-file-using-sharepoint-client-object-model-with-only-an-absolute-url

nothing was really working.  But wait what?  FileStream.  Hmmm I can just stream from file into Xdocument right? perhaps?

Yep that works.  Simple basically 
XDocument.Load(FileInformation.Stream);
inner ends up with the entire stream and away you go.  One blessed little line. 


Code is as follows.  
     string astr = "\mySPSite\MyLibrary\Myfile.xml";

        Microsoft.SharePoint.Client.ClientContext cc = new Microsoft.SharePoint.Client.ClientContext(siteUrl);
        cc.Credentials = System.Net.CredentialCache.DefaultCredentials;
        Microsoft.SharePoint.Client.Web sp16 = cc.Web;
        cc.Load(sp16);
        cc.ExecuteQuery();
        
        XmlDocument xDoc = new XmlDocument();
        Microsoft.SharePoint.Client.FileInformation f = Microsoft.SharePoint.Client.File.OpenBinaryDirect(cc, astr);
        xDoc.Load(f.Stream);
 

 


The Crew

  More pictures are here.

 
From Ariea

Papa's concert.


     

Other stuff of interest to people possibly.

Trip to Tahiti.

Belize is nice as well