This is a migrated thread and some comments may be shown as answers.

Saving report in PDF with default file name

6 Answers 279 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Gilles
Top achievements
Rank 1
Gilles asked on 01 Mar 2012, 06:22 PM
Hello,

I try to programmically set  the default file name of my PDF report export but it doesn't work well. I read, on this forum, I have to set the DocumentName of the Report. But it doesn't work. When the dialog box appeared after selecting "Acrobat (PDF) File" in the toolbox of the report viewer, the file name is empty.
I try to set the default file name in the designer, in the constructor, in the OnRenderBegin method, but the file name is still empty.

Is it a bug or I missed something ? I am using the ReportViewer in Silverlight 5 ( version : Telerik_Reporting_Q1_2012_v6_0_12_215) and I use a ReportService.svc file to generate the report.

Thank you for your help.

Gilles

6 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 02 Mar 2012, 10:04 AM
Hello Gilles,

The Silverlight report viewer is still build against Silverlight 4 where the SaveFileDialog doesn't have a default file name parameter. We see that this limitation has bee addressed in Silverlight 5, so once we upgrade you would be able to specify a default file name.

Sorry for the temporary inconvenience.

Greetings,
Steve
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
0
Gilles
Top achievements
Rank 1
answered on 05 Mar 2012, 10:08 AM
Thanks for your answer. I build my own export with a Silverlight button and using RenderAsync with "PDF" as parameter. So, now, I want to remove the export button from the viewer's toolbar. I found how to filter the export format but I did'nt find how to hide this button. Is it possible in Silverlight ?

Thanks for your help.

Gilles
0
Steve
Telerik team
answered on 05 Mar 2012, 10:23 AM
Hi Gilles,

The Silverlight report viewer control is a template and you can use Blend to extract its template and modify it as necessary, for more info see Creating Style in Expression Blend help article.
General information on styling templated controls is available in the Styling a control that supports templates MSDN article.

Kind regards,
Steve
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
0
Gilles
Top achievements
Rank 1
answered on 05 Mar 2012, 05:34 PM
I am trying to edit the ReportViewer template with blend 4 and it's not working. When I try to add the ReportViewer on an empty MainPage.xaml, I get an error message HR_RESULT E_FAIL with a COM componant.

I tryed with Blend 5 beta and I can add the ReportViewer to the MainPage.xaml but when I edit the ReportViewer template, the template is empty (ControlTemplate).

Any ideas ?

I just need to edit the template of the ReportViewer in Silverlight to hide the export button from the toolbar.

Gilles
0
Steve
Telerik team
answered on 05 Mar 2012, 05:58 PM
Hello Gilles,

I've attached the Silverlight viewer template that we extracted with Blend 4 directly from our examples. Let us know if you need further help.

Greetings,
Steve
the Telerik team
NEW in Q1'12: Telerik Report Designer (Beta) for ad-hoc report creation. Download as part of Telerik Reporting Q1 2012. For questions and feedback, use the new Telerik Report Designer Forum.
0
Gilles
Top achievements
Rank 1
answered on 05 Mar 2012, 06:12 PM
That's perfect. Everything is working as I wanted now.
Thank you so much !
Tags
General Discussions
Asked by
Gilles
Top achievements
Rank 1
Answers by
Steve
Telerik team
Gilles
Top achievements
Rank 1
Share this question
or