export hidden column
export hidden column
have a report with 10 columns. one of the columns is Notes. This field is 500 char. To prevent the Notes column from wrapping the contents and causing a single report line to occupy multiple rows, the plan is to output only the first 50 characters of the notes field. Have another hidden Notes field which will have the entire 500 char.
When user chooses to export to excel/csv the Hidden Notes field needs to be exported instead of the displayed Notes column. Please suggest a way to achieve this. Thank you.
This question has accepted answers - jump to:
Answers
Hi @idris_bengali ,
You don't really need the hidden field - just use orthogonal data with
columns.render
. You could truncate the notes field on the display, as in this example here, and then just export the full data (something like this, where it's rendered differently on the export),Hope that helps,
Cheers,
Colin
Thank you Colin... I will adopt this approach
after some more searching I found this simple render method and after carefully mimicking the syntax, not able to get the desired results.
the display works fine shows the first 50 and ... when length > 50, but the export is not sending the entire field. It is exporting what is displayed.
thank you once again colin for setting me on the right path.
just to mention the data source is not ajax/json. the rendering is done with html merge.
Resolved
1) defined the "columns": [ ]
2) in the buttons sections set exportOptions >> orthogonal: 'export'
That's it - see those two examples from my earlier post. Glad all working,
C