5 Answers, 1 is accepted
0
Hi Paul,
Steve
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
You cannot change the layout of a report or conditionally hide sections/items depending on the export format the report is rendered into. The excel export aims for a WYSIWYG representation of the report, and if you need only the report data than you can export to csv, where you can concentrate on the data only as shown in this KB article:Configuring the CSV Rendering Extension.
Greetings,Steve
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0

Manpreet
Top achievements
Rank 1
answered on 16 Oct 2015, 06:48 AM
Can we remove header and footer of the page using code behind file as we need excel format only and not the csv and that too without header and footers. Please help.
0
Hello Manpreet,
It is possible to modify the report definition before processing and rendering the report to XLSX. In this scenario you need to create the report object and modify its definition by removing the page header and page footer sections from the report items collection:
Additional information is available in the Programmatic Control of Reports help article.
Regards,
Nasko
Telerik
It is possible to modify the report definition before processing and rendering the report to XLSX. In this scenario you need to create the report object and modify its definition by removing the page header and page footer sections from the report items collection:
var report =
new
MyReport();
report.Items.RemoveByKey(
"pageHeaderSection1"
);
report.Items.RemoveByKey(
"pageFooterSection1"
);
Additional information is available in the Programmatic Control of Reports help article.
Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
0

Tommy
Top achievements
Rank 1
Iron
Iron
Iron
answered on 07 May 2021, 03:59 AM
Do we know if there is an easier way to do this now in the report designer?
Todor
commented on 11 May 2021, 11:31 AM
| edited
Telerik team
Hello Tommy,
You may use Bindings or Conditional Formatting to hide the sections when the Global Object RenderingFormat is 'XLSX' and/or 'XLS'.
You may use Bindings or Conditional Formatting to hide the sections when the Global Object RenderingFormat is 'XLSX' and/or 'XLS'.
1

Jose
Top achievements
Rank 1
Iron
answered on 13 May 2021, 09:46 AM
Yes, you can do this using conditional formats.
On the page header, create a new Conditional Format.
Set the Filter as follows:
Expression: =RenderingFormat.Name
Operator: =
Value: XLSX
Then the in Style, untick Layout - Visible