Telerik Forums
Reporting Forum
4 answers
178 views
Hi,

I have been using Telerik Reporting for the past couple of years. I upgraded my applications to use Q2 2012 and as a result some of the functionality that I had in place no longer works and I can't find a working alternative.

Structure:

- Master report with 3 subreports.
- Each subreport has a chart
- I set the chart series in the Page_Load event of the ASPX page that renders the report

Problem:

This doesn't work anymore - the Items collection for the SubReport is always empty. Before upgrading to Q2 2012 this worked fine.
// Get the chart from the subreport
    var individualContributionsReportChart = (Telerik.Reporting.Chart)individualContributionsReport.ReportSource.Report.Items["labelsGroupHeader"].Items["chart1"];


Code Example (I stripped out application logic that has nothing to do with the reports):
protected void Page_Load(object sender, EventArgs e)
{
    if (IsPostBack)
    {
        TotalContributionsOverviewReport report = new TotalContributionsOverviewReport();
 
        var individualContributionsReport = ((Telerik.Reporting.SubReport)(report.Items["reportFooter"].Items["IndividualContributionsSubReport"]));
        GetIndividualContributionsChart(individualContributionsReport, startDate, endDate, categoryNameFilter, categoryIdFilter);
 
        ReportViewer1.Report = report;
    }
}
 
private void GetIndividualContributionsChart(Telerik.Reporting.SubReport individualContributionsReport,
            DateTime startDate, DateTime endDate, string categoryNameFilter, string categoryIdFilter)
{
    // Get the chart from the subreport
    var individualContributionsReportChart = (Telerik.Reporting.Chart)individualContributionsReport.ReportSource.Report.Items["labelsGroupHeader"].Items["chart1"];
 
    // Get the chart data
    var records = PersistenceFactory.GetRecords();
 
    var categoryGroups = records.GroupBy(r => r.CategoryName);
    foreach (var g in categoryGroups)
    {
        // Create a ChartSeries and assign its name and chart type
        ChartSeries chartSeries = new ChartSeries();
        chartSeries.Name = g.Key;
        chartSeries.Type = ChartSeriesType.Line;
        // add new items to the series,
        // passing a value and a label string
        foreach (var c in g)
        {
            ChartSeriesItem item = new ChartSeriesItem()
            {
                XValue = c.ContributionDate.ToOADate(),
                YValue = Convert.ToDouble(c.Amount)
            };
            chartSeries.Items.Insert(chartSeries.Items.Count, item);
        }
 
        // add the series to the Chart Series collection
        individualContributionsReportChart.Series.Add(chartSeries);
 
        // format the chart axis
        FormatChartAxis(individualContributionsReportChart, startDate, endDate, step);
    }
}

Aaron
Top achievements
Rank 1
 answered on 19 Jul 2012
3 answers
542 views
hi telerik team,

I'm using telerik reports for time sheet report,

in that report we have total hours column for particular task,

we need to display sum of the total hours column.

Employee Name
  Task-1     3.30
  Task-2     4.00
  Task-3     5.50
              --------------
                  13.20 hrs


please provide me sum calculation for sum of fields

Thanks in advance
Malcolm
Top achievements
Rank 1
 answered on 19 Jul 2012
2 answers
177 views
Hi, Telerik Team.
I have a following definition for my XAxix:

defChart.PlotArea.XAxis.DataLabelsColumn = "DoubleDateTime"; 
defChart.PlotArea.XAxis.IsZeroBased =
false;
defChart.PlotArea.XAxis.AutoScale = true;
defChart.PlotArea.XAxis.Appearance.ValueFormat = ChartValueFormat.LongDate;
defChart.PlotArea.XAxis.Appearance.CustomFormat = "dd HH:mm";
defChart.PlotArea.XAxis.LayoutMode = ChartAxisLayoutMode.Inside;

The DateTime objects was converted to ToOADate().

The data source is something like this:
Date             Value
2012-07-11 09:40 22
2012-07-11 09:41 15
2012-07-11 09:43 16
2012-07-11 09:43 17
2012-07-11 09:44 16

Note that, the 09:42 is missing and I have duplicate value to 09:43.

So, I have  problem to show a timeline for DateTime in XAxi (a timeline with one entry for each minute).
I realy need include into data source a entry to 09:42 and agregate the 09:43, to obtain a timeline?

Thanks
Giuliano Caetano
             


Giuliano Caetano
Top achievements
Rank 1
 answered on 19 Jul 2012
1 answer
465 views
Hello,

I followed the wizzard and made no changes to the report layout besides what the wizzard did and when I export to Excel there are two extra blank rows between every row of data.  What is causing this?

The report has a labels group header and detail...

How to avoid blank rows? Its urgent.

Thank you
Jayanthi

IvanY
Telerik team
 answered on 19 Jul 2012
1 answer
346 views
I am settings multiple textboxes text from code file.The textboxes are arranged vertically.The textboxes working fine when there is small text is set but when large strings are set the spaces between textboxes increase to much actually the height of textboxes increases so it looks that  like spaces between two textboxes increases which is not looks good.Is there any possible solution for this?
I  already set CanGrow and CanShrink property to true but didn't get the result i want. 
for example:-

With Small texts

StudentName : john,sarah,William
Subject: Science, Maths,English


With large text

StudentName : john,sarah,William,
                         j....jjj..j..
                         j....fafafakuk.,kffkdgkf
                         f gdfg/gsgsg.sgsg.sg
                        gsgsdg


Subject: Science, Maths,English 
Hrisi
Telerik team
 answered on 19 Jul 2012
7 answers
473 views
Is there a way I can embed the Telerik Report viewer and not have it conform to the in-built paging. In simple words have all the pages of the report extend down the viewer in the webpage. Meaning not getting a Page by Page output.
Elian
Telerik team
 answered on 19 Jul 2012
1 answer
210 views
How do I filter charts using Report parameters? Do you have any sample project? I am new to telerik reporting.. :(.. Please help me to create chart and filter using report parameters..
Peter
Telerik team
 answered on 19 Jul 2012
6 answers
468 views
I am unable to use panels in my report simply because the right side border of my panel is not visible. I have tried playing with the border size and setting the border style to solid bu the right side of the panel still stays borderless. Can someone please help out?


Thanks. 
Hrisi
Telerik team
 answered on 19 Jul 2012
1 answer
168 views
i have been able to get my report to send as an email attachment with out any parameters, i would like to know if anyone could assist me with sending a telerik report with parameters.
IvanY
Telerik team
 answered on 19 Jul 2012
2 answers
132 views
Hello Telerik team,

I created a pie chart dynamically in the pie NeedDataSource function.
void chart1_NeedDataSource(object sender, EventArgs e)
{
    List<Product> products = new List<Product>();
    products.Add(new Product("Parka L", 120));
    products.Add(new Product("Parka M", 100));
    products.Add(new Product("Parka S", 132));
 
    Telerik.Reporting.Processing.Chart procChart = (Telerik.Reporting.Processing.Chart)sender;
    Telerik.Reporting.Chart defChart = (Telerik.Reporting.Chart)procChart.ItemDefinition;
    defChart.IntelligentLabelsEnabled = false;
    ChartSeries serie = new ChartSeries();
    serie.Type = ChartSeriesType.Pie;
    serie.Clear();
    serie.Appearance.LegendDisplayMode = Telerik.Reporting.Charting.ChartSeriesLegendDisplayMode.ItemLabels;
    foreach (Product lst in products)
    {
        ChartSeriesItem item = new ChartSeriesItem();
        item.YValue = (double)lst.QuantityInStock;
        item.Name = (string)lst.Name;
        item.Appearance.Exploded = true;
        item.Label.TextBlock.Text = (string)lst.Name + " - #%";
        serie.Items.Add(item);
    }
    defChart.Series.Add(serie);
}

Unfortunatly the chart is duplicated at each row as you can see with the attached file.
Have you got an idea please ?

Thanks



Forest
Top achievements
Rank 1
 answered on 19 Jul 2012
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?