SharePoint – Online ActiveX in Chrome Browser

January 8, 2018

Since I migrated my Hard and Software Inventory Scripts to SharePoint Online.

https://audministrator.wordpress.com/2018/01/08/sharepoint-online-computer-inventory/

I felt the need to check if I could run it in the Chrome Browser as well … ?

Solution :

Step 1. Is to configure Chrome to accept ActiveX Scripts

Open Chrome and go to Settings –> Advanced Options –> Proxy Settings

image

Go to the Security Tab –> Add you SharePoint Online site to the TRUSTED Sites

Next go to Custom Level –> Change the following ActiveX settings

image

Safe and restart Chrome

Step 2. Is to download IETab Extension for Chrome

image

Once installed is will ask you to run a local exe called ietabhelper.exe

And it will show you the Extension Icon here :

image

Step3. Run it and test the Result

Go to the Hardware Inventory Tool in SharePoint Online and click Get Info

image

As you can see it retrieved all the details, to be saved in the SharePoint Online Cloud using the Chrome Browser

How cool is that Smile Smile

Advertisements

SharePoint – Online Computer Inventory

January 8, 2018

Nearly 5 years ago I converted the Outlook forms to an on premise SharePoint 2010 Foundation version

https://audministrator.wordpress.com/2013/05/14/sharepoint-computer-hw-sw-inventory/

But now it’s time to migrate to Office365 – SharePoint Online !

Basically all of the scripting done in SP 2010 can be reused in the Online version.

Solution :

Step 1. I created a new Custom List in SP Online

With the exact same fields and field names as in SP 2010.

Step 2. I created the new SP Online Custom Forms

These where created from scratch again

Step 3. I migrated the JavaScript / JQuery Scripts

I adjusted the scripts where needed (very little efforts neededs)

Step 4. Tested the results

New Form :

image

When pressing Get Info, it will check if it can find the PC or Server in your network.

If the field is blank it will present an error message and the button will go RED.

In the other occasion the button will show GREEN.

image

Extra logic in the script will check disk Capacity and show RED if below 10 % free space.

Edit Form :

image

Using the EDIT form you can just refresh the data at all times, even if you make a remote VPN to your network.

GREEN means all data has been updated.

Display Form :

image

Once all Hardware is loaded you can have the bonus effect to have this info available using the SharePoint Mobile App.

So all the data is at your fingertips wherever you are.

Migrating and reusing this logic from MS Exchange Forms to SharePoint Online over more then 15 years, is very rewarding.

Isn’t that cool Smile


SharePoint–Online Publish a Power BI report (Personal Ed.)

January 5, 2018

Ever wanted to publish a Power BI report to SharePoint Online ?

Which is not out of the box functionality (It is for the PRO version of Power BI)

Solution :

Step 1. Get the link of the report

In your Power BI environment go to the report to publish –> File –> Publish to Web

image

Next copy the link code ….

image

Step 2. Create a Web Part Page

Add a Page Viewer Web Part

image

And add the Report link from Step 1.

Step 3. Save the page and see the result

image

Of course this does not give you all the full features of the Power BI Pro version.

But can be good enough to do some prototyping or publishing BI information.

image

Bonus is the fact that it will update automatically based on the Power BI Schedule frequency Smile

PS : Keep in Mind that your Tenant Admin needs to give you permission to Publish to the Web

image

Enjoy!


SharePoint–Online Publish a Power Pivot Excel file using a SalesForce Datasource

January 5, 2018

I was wondering if it was possible to use the (older) Power Pivot that had a SalesForce Datasource.

And publish it to SharePoint Online ?

Step 1. Connect to SalesForce using Power Query

Once the data source is filtered, formatted, …

image

Safe the Excel file… it stores automatically the data as a Power Pivot Data source.

Step 2. Create a Report Library

In your O365 SharePoint Online create a Report LibrarySs

image

Step 3. Save the file to the Library

image

image

Step 4. Next Create a Web Part Page

image

And add a Business Data WebPart

image

Point to the Excel in the Report Library.

image

Enjoy !


SharePoint – Online access to a Windows Core IoT on RPI3

December 31, 2017

After converting my HW & SW Inventory Tool to SharePoint Online…

https://audministrator.wordpress.com/2013/05/14/sharepoint-computer-hw-sw-inventory/

I guessed why not try this against a Windows IoT on a Raspberry PI3 ?

And indeed it went as expected … so cool not Smile

image

Possibilities are unlimited … I can check to see if the RPI3 is still online (when the button lights up green) where ever I am

Next bonus effect is that I can do a reboot remotely.

Technology :

Technology used behind the scene is just SharePoint and Client Side – JavaScript.

Maybe I will share the scripts, but not for free… Winking smile

Happy New Year …


SharePoint – Online Content Editor CEWP Missing

December 22, 2017

When starting to work with SharePoint Online, first thing you notice is that the CEWP is missing out of the box Sad smile

But no stress, there are 2 ways of getting it back ….

Solution 1

Go to office365 admin –> SharePoint –> Setting –> Custom Script –> enable it

image

image

Be aware that this option will affect ALL site collection settings…which is not advisable in my opinion.

Solution 2

You can activate Publishing features for both Site Collection and Site level

  1. Site Settings > Site Collection Administration > Site Collection Features -> SharePoint Server Enterprise Site Collection features
  2. Site Settings > Site Actions -> Manage Site Features -> SharePoint Server Publishing

image

image

This option has only impact on the individual site collection, which is more advisable.

image

Enjoy !


PowerShell – Crystal Reports COM Object

December 17, 2017

Recently I was going through my files and found (again) Smile the very nice Crystal Reports COM libraries

 

image

As you can see these are more then 15 years old !!

But still works like a charm … many years back I created an example in AutoIT using the CRViewer COM object.

image

Actually the Crystal Reports at that time came with some nice COM libraries, which are still my all time favourites.

And tons of functionality to automate your tasks…

image

It can access all kinds of Database formats using ODBC and native DB connections.

As you can see it also has a multitude of Export and printing abilities.

$Crystal_Report = 1
$Data_Interchange = 2
$Record_Style = 3
$CSV = 5
$Tab_Sep_Val = 6
$CharSepVal = 7
$Text = 8
$TabSepText = 9
$Paginated_Text = 10
$Lotus_23WKS = 11
$Lotus_123WK1 = 12
$Lotus_123WK3 = 13
$Word = 14
$Excel_5 = 21
$Excel_5_Tabular = 22
$ODBC = 23
$HTML32 = 24
$Explorer32 = 25
$Excel_7= 27
$Excel_7_Tabular = 28
$Excel_8 = 29
$Excel_8_Tabluar = 30
$PDF = 31
$HTML40 = 32
$Crystal_Report_7 = 33
$Report_Definition = 34
$RTF = 35
$XML = 36

 

PowerShell COM Backwards compatible ?

So the idea now is to see how PowerShell is able to handle these old COM libraries.

Here we go …  Smile

This script will read a Crystal Report 8.5 report using a MS SQL database data source.

Refreshes the data in the report, Exports it to Excel and next E-mails this to 1 or more recipients.

CLS

$Excel_7= 27

$ServerType = "p2lodbc.dll"
$ServerName = "ServerName"
$databaseName = "DatabaseName"
$user = "UserName"
$pswd = "Password"
 
$vFilenameReport = "C:\Deliveries per customer.rpt"
$vFilenameExport = "C:\Deliveries per customer.xls"

$oApp = New-Object -ComObject "CrystalRuntime.Application" # Com Object

# LogOnServer
    $oApp.LogOnServer($ServerType, $ServerName, $databaseName, $user, $pswd)

# Open Report
  $oRpt = $oApp.OpenReport($vFilenameReport, 0) # 0 / 1

# Report Options
  $oRpt.DiscardSavedData() # DiscardSavedData In Report to REFRESH
  $oRpt.EnableParameterPrompting = $False
  $oRpt.DisplayProgressDialog = $False
  $oRpt.MorePrintEngineErrorMessages = $False

# Export Options
Start-Sleep 2

  # $oRpt.ExportOptions.Reset | out-null
   $oRpt.ExportOptions.DestinationType = 1 # 1=>filesystem 
   $oRpt.ExportOptions.FormatType = $Excel_7  # 27=> Excel 7
   $oRpt.ExportOptions.DiskFileName = $vFilenameExport 

  # $oRpt.ExportOptions.ExcelExportAllPages = $True 
  # $oRpt.Export($True) # Export without prompting = False

   $oRpt.Export($False) # Export without prompting = False

# Send Email
 Send-MailMessage -to Your.Name@Company.com `
-from admin@Company.com `
-Subject "Monthly Email Service" `
-body "Hello !!! `nThis is your personal E-mail service.`nPlease find the updates enclosed.`nUntill next time. `nRegards," `
-Attachments $vFilenameExport `
-smtpserver YourEmailServer  

# Remove Attachment File
   Start-Sleep -s 2
   Remove-Item $vFilenameExport

 

If you schedule this script you have created your own reporting platform.

 

image

Keep in mind that you need to you the 32Bit PowerShell version

image

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe

But it doesn’t spoil the fun Smile

And this proves PowerShell is 100% backwards COM compatible !!

 

Enjoy !