开发者

Currency format without the thousands separator (remove comma in fields in saved reports)

I currently set some of my fields on my data grid with "c2" as the FormatString. When I generate .csv reports with XtraReports by printing on the XtraGrid, the thousands separator is included in the fields formatted as "c2". I don't want to include the comma in the exported .csvs as external systems have trouble importing the data.

What are my options to remove the comma in the fields in the .csv reports?

  • Can I just format the data with a preceding $ sign without the thousands separator in the data grid (and what would the FormatString be for that in this case). However, I do like visually having the separator on the grid, just not the .csv file.

  • Is there some sort of interceptor I can write that will remove comm开发者_StackOverflow中文版as during report generation?


I suggest that you clear the FormatString property before exporting the grid and revert this property value back when the exporting result is ready. This looks to be the easiest solution to this problem.


Hm... why don't you clone whole grid, assign the datasource to the new one, change the formatting and then print. Is that viable solution to you?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜