4ae864887b3d2998154cdc84fe2b2c25b6fd1297
FAQ/Questions/exporting-hidden-columns.md
| ... | ... | @@ -0,0 +1,28 @@ |
| 1 | +#Exporting Hidden Columns |
|
| 2 | + |
|
| 3 | +[[_TOC_]] |
|
| 4 | + |
|
| 5 | +##Question |
|
| 6 | + |
|
| 7 | +How can I export columns in a report that are normally hidden in the viewer? |
|
| 8 | + |
|
| 9 | +##Answer |
|
| 10 | + |
|
| 11 | +Izenda does not currently offer a simple way of exporting columns that are normally hidden. However, through some knowledge of our API calls, it is possible to support this behavior. The following is a short code sample that demonstrates this at a very simple level. |
|
| 12 | + |
|
| 13 | +```csharp |
|
| 14 | +public override void PreExecuteReportSet(ReportSet reportSet) |
|
| 15 | +{ |
|
| 16 | + if (!string.IsNullOrEmpty(HttpContext.Current.Request.QueryString["output"])) |
|
| 17 | + { |
|
| 18 | + foreach (Field f in reportSet.Detail.Fields) |
|
| 19 | + { |
|
| 20 | + if (!f.Visible) |
|
| 21 | + f.Visible = true; |
|
| 22 | + } |
|
| 23 | + } |
|
| 24 | + base.PreExecuteReportSet(reportSet); |
|
| 25 | +} |
|
| 26 | +``` |
|
| 27 | + |
|
| 28 | +This simply checks if the report is being exported. If it is, then it will set all fields that are not visible to be visible. You can modify this as per your own company's needs require. |
|
| ... | ... | \ No newline at end of file |