IT Nota

  • Home
  • How To
  • .NET
  • WordPress
  • Contact

What To Do Next After Installing Linux Mint

After installing Linux Mint, these are the things you may want to keep it up to date and configured properly.

Get Updates

Open Update Manager by clicking on the shield icon on the bottom right-hand corner (see inset) and click on the Install Updates button.

Linux Mint Update Manager Shield Icon Inset

Or from the terminal run the following command:

sudo apt-get update && sudo apt-get upgrade

Set UTF-8 Locale

Open Terminal and type in this command:

ls /usr/lib/locale

You will see this result.

# ls /usr/lib/locale/
C.UTF-8  locale-archive

Now, type in the following command:

sudo locale-gen --purge --no-archive

# ls /usr/lib/locale/
C.UTF-8     de_LI.utf8  en_CA.utf8  en_IN       en_US.utf8
de_AT.utf8  de_LU.utf8  en_DK.utf8  en_NG       en_ZA.utf8
de_BE.utf8  en_AG       en_GB.utf8  en_NZ.utf8  en_ZM
de_CH.utf8  en_AU.utf8  en_HK.utf8  en_PH.utf8  en_ZW.utf8
de_DE.utf8  en_BW.utf8  en_IE.utf8  en_SG.utf8

Further Reading

How-to fix “Warning: No support for locale: en_US.utf”

June 15, 2013 Filed Under: How To Tagged With: Linux

How to Create SSRS Report with Dynamic Query and Parameters

Requirement: Produce an SSRS report the is searchable by the values of any fields in the report as shown below:

SSRS Report with parameter search

This type of report can be created using parameters input into a dynamic query in a stored procedure. We’ll use employee records from AdventureWorks database to demonstrate the report setup so it can be searchable by a search key and a search string as its value.

  1. Create Stored Procedure.

    CREATE PROCEDURE dbo.SearchEmployees 
      @SearchBy NVARCHAR(MAX),
      @SearchString NVARCHAR(MAX)
    AS
    SELECT NationalIDNumber, FirstName, MiddleName, LastName, 
         JobTitle, LoginID 
    FROM HumanResources.Employee e
    INNER JOIN Person.Person p
    ON e.BusinessEntityID = p.BusinessEntityID
    WHERE 
      CASE 
        WHEN @SearchBy = 'IDNo' THEN NationalIDNumber
        WHEN @SearchBy = 'Title' THEN JobTitle
        WHEN @SearchBy = 'First' THEN FirstName
        WHEN @SearchBy = 'Middle' THEN MiddleName
        WHEN @SearchBy = 'Last' THEN LastName
        WHEN @SearchBy = 'Login' THEN LoginID
      END 
      = (@SearchString)
    

    Stored Procedure search by parameters

  2. Test the stored procedure. Just to be sure the sproc works correctly, let’s do a test by executing it to search based on last name with a value “Brown.”

    EXEC dbo.SearchEmployees 'Last','Brown'
    

    And it should retrieve three records.
    Stored Procedure pass value

  3. Create a new report in Visual Studio (the assumption is that you already have a Report Server Project created and setup with Data Sources). On the left pane, right-click on Datasets and select Add Dataset…. Click on Stored Procedure on the Query type and select the procedure name created earlier from the drop-down list and click OK to close it.

    SSRS Setup Dataset

  4. Create report parameters. Right-click on Parameters on the Report Data window and click on Add Parameter… and the first parameter as below:

    Name: SearchBy
    Prompt: Search by:

    SSRS Add Parameter

  5. Go to Available Values and add all values you want end users to see and able to search from the report. These entries should match with the @SearchBy parameter in the stored procedure (SearchEmployees).

    SSRS Parameter Available Values

  6. Still on the same window, click on Default Values and check Specify values and pick any value from the drop-down list so we don’t get an error message that the parameter is blank.

    SSRS Parameter Default Value

    Click OK to close.

  7. Add a second parameter for the search string:

    Name: SearchString
    Prompt: Search for:

    Now, you should see two report parameters, @SearchBy and @SearchString. These two parameters still need to be linked to the dataset.

  8. Click on Datasets (dsEmployeeSearch) Parameters and set the names and values to the following:

    SSRS Parameter Name and Value in Dataset

  9. Setup the report as shown:

    SSRS Design View (Employee Search) Setup

That’s it. Once you’re done, click on the Preview tab and test it.

SSRS Report with parameter search

Caveat

While it’s nice to be able to search by any fields you want, it’s not too helpful because you can only search one record at a time. We will correct and enhance this report to accept multivalue parameters on the next SSRS tutorial, How to Create SSRS Report with Dynamic Query and Multi-Value Parameters.

Further Reading

Business Intelligence with SQL Server Reporting Services
Microsoft SQL Server 2012 Reporting Services (Developer Reference)

June 14, 2013 Filed Under: How To Tagged With: SQL, SSRS

Installing Apache, MySQL and PHP on Linux Mint

This setup is intended for those who need to get their system up and running to do PHP web development. It is not recommended for production websites.

Install Apache

Open Terminal and type:

sudo apt-get install apache2

At the end of installation you will see a message saying:

* Starting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

It’s nothing to worry about because most personal computers don’t have one.

Test Apache

Open a web browser and point it to URL:

http://localhost/

You should see a message saying:

It works!
This is the default web page for this server.
The web server software is running but no content has been added, yet.

Install PHP

Open up Terminal again and type in the following command:

sudo apt-get install php5 libapache2-mod-php5

Test PHP

In the terminal, type this command:

sudo pluma /var/www/test.php

This will create a new php file in Pluma text editor. Copy/Paste this line into the .php file.

<?php phpinfo(); ?>

Save and close the file.

From a web browser, try to load the file:

http://localhost/test.php

It should render a page with all information on the PHP installation.

Install MySQL

Still in the Terminal, type this command:

sudo apt-get install mysql-server

You will be prompted with Configuring mysql-server dialog to setup a root password. It’s recommended that you set a password.

Configuring mysql-server-5.5 Set Root Password

Install phpMyAdmin

sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

In Configuring phpmyadmin window, press spacebar to check apache2 and press TAB key to move to and press Enter.

Configuring phpmyadmin on Apache2

Choose when asked to configure database for phpmyadmin with dbconfig-common.

Configuring phpmyadmin dbconfig-common

Test phpMyAdmin

From the browser, open this address:

http://localhost/phpmyadmin

You should see phpMyAdmin’s login page and be able to login using ‘root’ as Username and the password you setup earlier when you installed MySQL.

phpMyAdmin Login Page

Further Reading

Installing LAMP (Linux, Apache, MySQL and PHP) On Linux Mint

June 12, 2013 Filed Under: How To Tagged With: Linux

How to Install Sublime Text in Linux

Sublime Text 2 This short tutorial is based on the link provided on the bottom of this post with slight modifications. The example is shown with 64-bit version of Linux Mint.

Download Sublime Text

Open your browser and go to Sublime Text and download the file to directory Downloads.

Setup

Open Terminal and type in the following command:

cd ~/Downloads

Then type in this command to extract the file:

tar -jxvf "Sublime Text 2.0.1 x64.tar.bz2"

Once the file is extracted, type the following commands individually:

sudo mv "Sublime Text 2" /opt/sublime/

sudo chown -R root:root /opt/sublime

sudo chmod -R +r /opt/sublime

Create a Sublime Text Executable

Execute the following commands to create a Sublime Text executable in your path:

sudo touch /usr/bin/sublime_text

sudo chmod 777 /usr/bin/sublime_text

Launch Pluma Text Editor by typing ALT+F2 (RUN) and enter this command:

gksu pluma /usr/bin/sublime_text

Copy & paste the code below:

#!/bin/sh
export SUBLIME_HOME="/opt/sublime"
$SUBLIME_HOME/sublime_text "$*"

Pluma Text Editor Sublime Text 2

Save the file and exit.

Next, type in this command:

sudo chmod 755 /usr/bin/sublime_text

Create a Menu Icon

Launch the default text editor (Pluma) again by typing Alt+F2 and type in:

gksu pluma /usr/share/applications/sublime.desktop

Copy & paste the code below:

[Desktop Entry]
Encoding=UTF-8
Name=Sublime Text 2
Comment=Edit text, code and markup
Exec=sublime_text
Icon=/opt/sublime/Icon/256x256/sublime_text.png
Terminal=false
Type=Application
Categories=GNOME;GTK;Utility;TextEditor;
StartupNotify=true

Pluma Text Editor Sublime Text Desktop

That’s it. If you go to the Menu, you should see Sublime Text 2 under the Applications, Accessories.
Sublime Text 2 in Linux Mint Applications Menu

Download

Sublime Text

Further Reading

Install Sublime text editor

June 2, 2013 Filed Under: How To Tagged With: Code Editor, Linux, Sublime Text

How to Setup ODBC Connection

Launch Microsoft ODBC Data Administrator

On a 64-bit Microsoft OS, there will be two versions of Microsoft Open Database Connectivity (ODBC) Data Source Administrator tool (Odbcad32.exe) in two different locations:

  • %systemdrive%\Windows\SysWoW64 folder (32-bit)
  • %systemdrive%\Windows\System32 folder (64-bit)

The Odbcad32.exe file displays the following types of data source names (DSNs):

  • System DSNs (Visible to all users on the machine, including NT services)
  • User DSNs (Only visible to current user and can only be used on the current machine)

In this tutorial, we’re going to create a System DSN to an SQL Server Database.
ODBC Data Source Administrator

Click on Add button and select the latest SQL Server Native Client if possible (otherwise SQL Server will work just fine), click Finish. You can download the latest SQL Server Native Client (sqlncli.msi) from Microsoft® SQL Server® 2012 Feature Pack link.

Microsoft SQL Server Native Client 11.0 is installed when you install SQL Server 2016 (13.x).

ODBC Create New Data Source

This will bring up a new screen to setup SQL Server data source. Type in all the pertinent information for the SQL Server and click Next.

ODBC Create New Data Source to SQL Server

Enter the SQL Server user id and password to access the database.

ODBC SQL Server Data Source Authentication

Click Next two times and Finish and you should see the entry on the System DSN tab.

ODBC Data Source Administrator System DSN

Download

Microsoft® SQL Server® 2012 Feature Pack

Further Reading

ODBC Administrator tool displays both the 32-bit and the 64-bit user DSNs in a 64-bit version of Windows
SQL Server Native Client
Installing SQL Server Native Client

May 29, 2013 Filed Under: How To Tagged With: Microsoft, Microsoft SQL Server, SQL Server, Windows

« Previous Page
Next Page »
Buy me a coffee Support this site
Buy Me a Coffee?

Categories

  • .NET
  • Coding
  • Cybersecurity
  • Database
  • How To
  • Internet
  • Multimedia
  • Photography
  • Programming
  • Resources
  • Review
  • Tips and Tricks
  • Uncategorized
  • Use Case
  • WordPress
  • Writing

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Recent Posts

  • How to View Stored Procedure Code in SQL Server
  • How to Find a String in SQL Server Stored Procedures
  • How to Remove Cached Credentials without Rebooting Windows
  • ESP Work Automation: Empowering Enterprises with Streamlined Workflows and Operational Efficiency
  • How to Search for a String in All Tables in a Database

Tags

.NET .NET Core AdSense ASP.NET Cdonts Dll Classic ASP Code Editor ETL FSharp Genesis Framework Git Google HP Asset Manager HTML5 Hugo IIS Information Security Internet Internet Information Services iOS JAMStack Linux macOS Microsoft Microsoft SQL Server MVC PHP PowerShell Python Simple Mail Transfer Protocol Smtp Server SQL SQL Server SSIS SSMS SSRS Sublime Text Visual Studio Visual Studio Code VPN Windows Windows 8 Windows 10 Windows 2012 Windows Server

Copyright © 2011-2026 IT Nota. All rights reserved. Terms of Use | Privacy Policy | Disclosure