COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: krishdw85 on 13 May 2019 08:18:52 AM

Title: Data alignment for a row in CSV Format cognos 11 is not cmg in order horizontal
Post by: krishdw85 on 13 May 2019 08:18:52 AM
Hi Team,

PFA. Alignment is not coming in proper order and this is direct sql and DB2.
Though i tried with cast (dataitem, varchar(4)) .
Character data coming in right side in row and whereas number data coming in left side in row.

Please check and send your suggestions.

Regards,
Sai
Title: Re: Data alignment for a row in CSV Format cognos 11 is not cmg in order horizontal
Post by: adam_mc on 13 May 2019 09:46:57 AM
I believe this is Excel formatting the .csv file to look like this - Text values left aligned, numbers right aligned.
Open the file in a text editor (notepad...), not Excel, and view how these entries look.

Hope this helps.
Adam.
Title: Re: Data alignment for a row in CSV Format cognos 11 is not cmg in order horizontal
Post by: krishdw85 on 13 May 2019 11:50:20 AM
NO, attachment was from csv .. in excel it is coming in one row\alignment whereas in csv format only it is taking left right.
in notepad it is not aligned perfectly and users expecting this to be aligned in a proper order in csv format whereas pdf,excel is it coming fine.
Title: Re: Data alignment for a row in CSV Format cognos 11 is not cmg in order horizontal
Post by: dougp on 13 May 2019 12:36:24 PM
adam is correct.  Excel doesn't know how to handle a CSV file.

Are you saying it's too difficult for the user to select the column and click the left-align button?
Title: Re: Data alignment for a row in CSV Format cognos 11 is not cmg in order horizontal
Post by: krishdw85 on 13 May 2019 01:08:18 PM
May be he want that to be done from cognos end rather than manually
Title: Re: Data alignment for a row in CSV Format cognos 11 is not cmg in order horizontal
Post by: adam_mc on 14 May 2019 07:55:12 AM
Cognos has NO control about how Excel formats the data.

To confirm this is an Excel issue, just go and manually create a text .csv file with the following columns:
123
AB
456
X
12

The columns are nicely aligned in a text editor.
However, when you open the file with Excel and you will see the Text values left aligned, numbers right aligned.

This is not a Cognos issue.

Thanks,
Adam.
Title: Re: Data alignment for a row in CSV Format cognos 11 is not cmg in order horizontal
Post by: dougp on 14 May 2019 10:39:36 AM
Maybe the problem here is the report does not meet the user's needs.  If the report provided everything the user needed, there would be no reason to use Excel.

I know it's difficult, but try getting the user to tell you what questions the report is intended to answer.  Then complete the development of the report to answer those questions.  ...and maybe that will mean more than one report, or multiple pages in one report.