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

Export to PDf Issue:- there is no empty series

4 Answers 111 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Shweta
Top achievements
Rank 1
Shweta asked on 29 Jun 2011, 08:21 PM
Hi,

I am using telerik Silevrlight Reportviewer. I am able to see pie chart with values in Report Viewer but when i try to Export to PDF , instead of pie chart I am getting "There is no empty series". Any help is highly appreciated.

Regards,
Shweta

4 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 30 Jun 2011, 09:29 AM
Hi Shweta,

How do you create the chart item and its series? You can either bind the chart declaratively with the help of our Data Source Components or use its NeedDataSource event to manually create the series and items. If you're adding them in any other event then verify that your code is executed for a second time as the report is recreated prior exporting.

Greetings,
Steve
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Shweta
Top achievements
Rank 1
answered on 01 Jul 2011, 11:01 AM
Hi Steve,

Thanks for reply. This is how I am binidng the chart items under needdatasource event.

 

 

private void chart1_NeedDataSource(object sender, EventArgs e)

 

{

Telerik.Reporting.Processing.

 

ReportItemBase itemBase = sender as Telerik.Reporting.Processing.ReportItemBase;

 

Telerik.Reporting.Processing.

 

Chart chart = sender as Telerik.Reporting.Processing.Chart;

 

 

 

string serviceTypeId = (string)itemBase.DataObject["ServiceTypeId"];

 

 

 

string inputXml = (string)this.ReportParameters["InputXMLParameter"].Value;

 

 

 

ChartSeries series = new ChartSeries();

 

series.Appearance.LegendDisplayMode = Telerik.Reporting.Charting.

 

ChartSeriesLegendDisplayMode.ItemLabels;

 

series.DataLabelsColumn =

 

"Status";

 

series.DataYColumn =

 

"DurationforChart";

 

series.Name =

 

"Series 1";

 

series.Type = Telerik.Reporting.Charting.

 

ChartSeriesType.Pie;

 

chart2.Series.Clear();

 

 

this.chart2.Series.Add(series);

 

chart.DataSource = statusSummaryByFacility.GetStatusDataByRegionFacillityAndServiceType(inputXml, viewId, facilityId, serviceTypeId);

}

Is there anything worng I am doing.

REgards,
Shweta

0
Steve
Telerik team
answered on 05 Jul 2011, 02:18 PM
Hello Shweta,

I do not see anything wrong with the code you have posted and suspect that the problem is related to the GetStatusDataByRegionFacillityAndServiceType method. Most probably the four parameters it accepts do not contain data upon export i.e. where are viewId and facilityId coming from. Please debug your code and make sure that the method you set as data source for the chart, returns data.

Regards,
Steve
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Aitor
Top achievements
Rank 1
answered on 08 Jul 2011, 06:31 AM
Hello, first, apologize me for my terrorific english.

I'm in the same problem. When I try to export to i.e. PDF my report parameters are null.
At first time, i catch the report parameters in the myReport_NeedDataSource event like this and go all OK:

Telerik.Reporting.Processing.Report report = (Telerik.Reporting.Processing.Report)sender;
<
br> param1 = report.Parameters["paramString1"].Value.ToString();
<
br> param2 = report.Parameters["paramString2"].Value.ToString();


but when I try to export I don't known how to get again the report parameters.

thanks for all.

I Fixed my problem, with a method that catch my Report as parameter and I call when myChart_NeedDataSource event fires.
Tags
General Discussions
Asked by
Shweta
Top achievements
Rank 1
Answers by
Steve
Telerik team
Shweta
Top achievements
Rank 1
Aitor
Top achievements
Rank 1
Share this question
or