Account numbers with 3 spaces in database display in OBIEE with only one space — Oracle Analytics

Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Account numbers with 3 spaces in database display in OBIEE with only one space

Received Response
42
Views
6
Comments
3601907
3601907 Rank 5 - Community Champion

I have account numbers that are a mix of alpha numeric characters example W_ _ _123456. (The underscores are only to show the number of spaces). This is how the account numbers show in the database and also in SQL Developer when I run a query against the database. When I export to Excel or CSV from SQL Developer after running the query the export files show the spaces. The numbers are shown as reflected in the database. However, in OBIEE when I run the report the numbers are stripped of 2 extra spaces.

For example  W_ _ _123456 will now show as W_123456. What might be the cause for this issue and anyone knows how I can fix it?

We are using OBIEE 12c. I recall this was the same issue in 11g.

Answers

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    OBI has always trimmed leading, trailing and multiple spaces.

  • To extend Christian answer, it isn't OBIEE itself in the background but the web visualization in OBIEE doing that. It's a purely simple CSS property: https://developer.mozilla.org/en-US/docs/Web/CSS/white-space

    Normal behaviour being that sequences of white space are collapsed, that's what you are seeing right now (looks like 1 single white space).

  • User_QTT7B
    User_QTT7B Rank 1 - Community Starter

    Thanks, I was also facing the same issue. With the help of  "<span class="property token" style="color: #990055;">white-space</span><span class="punctuation token" style="color: #999999;">:</span> pre<span class="punctuation token" style="color: #999999;">;" CSS styling, I was able to display the data in OBIEE report with the spaces, but export to xlsx still remains an issue. CSV export preserves spaces, but xlsx export trims the spaces.</span>

    Any suggestions on this?

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    Yeah I was assuming a lot with my answer :-) But as always @Gianni Ceresa thankfully makes things perfectly clear.

  • 3601907
    3601907 Rank 5 - Community Champion

    Apparently it was an easy fix I needed. The report space trimming issue is resolved. I went to column properties --> data format --> Treat text as: Plain Text (don't break spaces)

  • 3601907
    3601907 Rank 5 - Community Champion

    Space Trimming Issue.JPG