SSRS Oct Function

The SSRS Oct function is a Conversion function that will return the string representation of a given octal value of a numeric field or number. The syntax of the Oct function for returning the string representing an octal number is as shown below.

=Oct(40)

To demonstrate the Oct function in reporting services, we use the Employee table below, which has 20 records. The image shows the records in the Table report.

Source Table

SSRS Oct function Example

For this, let me add a new column to the right side of the Orders column. Next, right-click the textbox under the Oct and choose the Expression to open the expression window shown below.

The SSRS Oct function expression below will return the string representation of the octal value of the numbers in the OrderQuantity column. As the values are small, we multiplied them by 8.

  1. More Functions
  2. Charts
  3. Tables
  4. Format tables
  5. SSRS
=Oct(Fields!OrderQuantity.Value * 8)
SSRS Oct Function expression to convert decimal values to octal

Similarly, let me create a new column to show the string representing octal numbers in the YearlyIncome column. As the numbers are big, we used the Left function together with the first two digits.

=Oct(Left(Fields!YearlyIncome.Value, 2))

Please click the preview tab to see the report.

  • Decimal 32 = Octal 40
  • Decimal 70 = Octal 106
SSRS Oct Function to convert decimal values to octal report