Hitachi Vantara Pentaho Community Forums
Results 1 to 1 of 1

Thread: How can I print white spaces into fields when export a report in csv format

  1. #1

    Default How can I print white spaces into fields when export a report in csv format

    Hello,

    (I use Pentaho 5.0, Pentaho Report Designer)

    I have a problem, how can I print white spaces for fields null or empty when I export a report in csv format.
    I have many registers like these:


    Name;LastName;Phone;Phone2;Address
    Name;LastName;Phone;Phone2;Address
    Name;LastName;Phone;Phone2;Address


    but, if one of these field is null or empty I need fill with blank spaces to keep the format (spaces) when I open it with a text editor...


    i.e. Phone2 is empty I want something like this: (Note: the underscores "_" mean blank spaces)


    Name;LastName;Phone;Phone2;Address
    Name;LastName;Phone;______;Address
    Name;LastName;Phone;Phone2;Address


    I build a function that check when a field is empty or null and replace it with blank spaces the length of field. However, when export the report in csv format I got this


    Name;LastName;Phone;Phone2;Address
    Name;LastName;Phone;;Address
    Name;LastName;Phone;Phone2;Address


    Somebody can help me please.
    Last edited by VictorRivero; 04-09-2014 at 03:46 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.