02e1be304fd8b7772693f8697e0848d1ffe36b9a
FAQ/Questions/Dynamically-change-report-title.md
| ... | ... | @@ -0,0 +1,18 @@ |
| 1 | +#Dynamically Changing the Report Title |
|
| 2 | + |
|
| 3 | +##Question |
|
| 4 | + |
|
| 5 | +Can I change the report title dynamically? |
|
| 6 | + |
|
| 7 | +##Answer |
|
| 8 | + |
|
| 9 | +Yes, the report attributes can be changed in the PreExecuteReportSet method, most of the attributes for a report are available there. To change the title of the report dynamically add this to the Global.asax PreExecuteReportSet: |
|
| 10 | + |
|
| 11 | +```csharp |
|
| 12 | +public override void PreExecuteReportSet(Izenda.AdHoc.ReportSet reportSet) |
|
| 13 | +{ |
|
| 14 | + reportSet.Title = "Some Title"; |
|
| 15 | +}//end PreExecute |
|
| 16 | +``` |
|
| 17 | + |
|
| 18 | +This method executes when a report is created to be exported or viewed. At this point, the xml from the actual report file has been parsed and loaded, so changes made here will not be permanent. |
|
| ... | ... | \ No newline at end of file |