Telerik Forums
Reporting Forum
5 answers
227 views
Hi,
Do you have any sample codes for for creating a pie chart with the value of each slice displayed (counter or %).
I have tried the codes below to create pie chart on-fly but couldn't get it done:

........

Dim

 

objChart As New Telerik.Reporting.Chart()

 

 

objChart.SeriesPalette =

"Palette1"

 

 

 

 

 

 

objChart.Style.Color = Color.DarkBlue

 

objChart.BitmapResolution = 96.0F

 

objChart.ImageFormat = System.Drawing.Imaging.ImageFormat.Emf

objChart.Name = strFieldName

objChart.ChartTitle.TextBlock.Text = objChartDetails.ChartTitle

objChart.ChartTitle.Appearance.FillStyle.MainColor = Color.Transparent

objChart.Size =

New Telerik.Reporting.Drawing.SizeU(New Telerik.Reporting.Drawing.Unit(drReport("Width"), Telerik.Reporting.Drawing.UnitType.Pixel), New Telerik.Reporting.Drawing.Unit(drReport("Height"), Telerik.Reporting.Drawing.UnitType.Pixel))

 

 

objChart.ChartTitle.Appearance.Dimensions.Margins =

New Telerik.Reporting.Charting.Styles.ChartMargins(0, 10, 10, 10)

 

 

objChart.PlotArea.EmptySeriesMessage.Appearance.Visible =

True

 

 

 

 

 

 

objChart.PlotArea.EmptySeriesMessage.Visible =

True

 

 

 

 

 

 

 

 

 

objChart.PlotArea.Appearance.FillStyle.MainColor = Color.White

 

objChart.PlotArea.Appearance.FillStyle.SecondColor = Color.White

 

 

Dim

 

objChartSeries As New ChartSeries()

 

objChartSeries.DefaultLabelValue =

"#%"

 

objChartSeries.Appearance.TextAppearance.Visible =

True

 

objChartSeries.Appearance.LegendDisplayMode = Telerik.Reporting.Charting.ChartSeriesLegendDisplayMode.ItemLabels

objChartSeries.DataLabelsColumn =

"StatName"

 

objChartSeries.Type = objChartDetails.ChartType

objChartSeries.DataYColumn =

"StatCount"

 

 

objChart.Series.Add(objChartSeries)

 

 

........

my data source is from a table with StatName (varchar) and StatCount(int)
StatName      StatCount
Verified          23
No-Verified    65


Attached is a sample of my result.

Thanks
quan



Steve
Telerik team
 answered on 26 May 2011
4 answers
230 views
I am trying to find a way to alternate the style of a report by group.  Similar to alternating the by line using conditional formatting "RowNumber()%2=1" but at the group level.  Any suggestions would be welcome.

Thanks - Steve
E Pons
Top achievements
Rank 1
 answered on 26 May 2011
14 answers
362 views
 Hello.

I develop the Silverlight application with WCF Service, and use Telerik Reporting version 4.1.10.714.
I created the new class MyReportBook:
public class MyReportBook : Telerik.Reporting.ReportBook

In the Silverlight app I set MyReportViewer.Report = "MyReportBook"; (it's the "string" type for the Silverlight ReportViewer)
I add the Reports to the MyReportBook.Reports collection in the runtime.
Now I need transmit parameter value from the Silverlight application to each report in the collection.
As far as I understand, I can do it only through the MyReportBook.
It is possible?
Stuart
Top achievements
Rank 1
 answered on 26 May 2011
2 answers
183 views
Hi,

When I try to insert a big amount of lines into a cell, it's displayed only in the following page.

What can I do to make the content appear on the first page?

Peter
Telerik team
 answered on 25 May 2011
1 answer
110 views

I want to bind a table to a list of objects, each object has a IDictionary.

public ObjectInstance

   public IDictionary<string, object> Dictionary { get; set; }

The source is a IEnumerable of ObjectInstance's, I've tried this with no success:
void table1_ItemDataBinding(object sender, EventArgs e)
    {
        //create two HtmlTextBox items (one for header and one for data) which would be added to the items collection of the table
        Telerik.Reporting.HtmlTextBox textboxGroup;
        Telerik.Reporting.HtmlTextBox textBoxTable;
 
 
        //we do not clear the Rows collection, since we have a details row group and need to create columns only
        this.table1.ColumnGroups.Clear();
        this.table1.Body.Columns.Clear();
        this.table1.Body.Rows.Clear();
        int i = 0;
        this.table1.ColumnHeadersPrintOnEveryPage = true;
        var attributes = _objectInstances.First().ObjectType.Attributes;
        foreach (var attribute in attributes)
        {
            if (string.IsNullOrWhiteSpace(attribute.ColumnName)) continue;
 
 
            var tableGroupColumn = new Telerik.Reporting.TableGroup();
            this.table1.ColumnGroups.Add(tableGroupColumn);
            this.table1.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(Unit.Inch(1)));
 
 
            textboxGroup = new Telerik.Reporting.HtmlTextBox();
            textboxGroup.Style.BorderColor.Default = Color.Black;
            textboxGroup.Style.BorderStyle.Default = BorderType.Solid;
            textboxGroup.Value = attribute.ColumnName;
            textboxGroup.Size = new SizeU(Unit.Inch(1.1), Unit.Inch(0.3));
            tableGroupColumn.ReportItem = textboxGroup;
 
 
            textBoxTable = new Telerik.Reporting.HtmlTextBox();
            textBoxTable.Style.BorderColor.Default = Color.Black;
            textBoxTable.Style.BorderStyle.Default = BorderType.Solid;
            textBoxTable.Value = "=Dictionary[\"" + attribute.ColumnName + "\"]"; //_objectInstances.First()[attribute.ColumnName].ToString();
            textBoxTable.Size = new SizeU(Unit.Inch(1.1), Unit.Inch(0.3));
            this.table1.Body.SetCellContent(0, i++, textBoxTable);
            this.table1.Items.AddRange(new ReportItemBase[] {textBoxTable, textboxGroup});
        }
 
 
    }

Which is the correct way to bind to a dictionary ?
Peter
Telerik team
 answered on 25 May 2011
1 answer
83 views
Hello, Just a couple of questions regarding where Telerik reporting is heading.

  1. Is an end-user report designer on the Telerik reporting road map?
  2. Are we able to deploy the reports as a separate xap file that can magically be related to the Core app xap file?
  3. Is there or will there in the future be a way to copy the report file (eg Report1.cs) in to a report folder on the server and have the app magically integrate that file (eg, a database record point to the file name)?

Many thanks

Steven
Steve
Telerik team
 answered on 25 May 2011
1 answer
116 views
Hello everybody :)

First of all, I like telerik reporting very much, but I have a question here.
How can I add sub reports dynamically to a master report? The procedure could go like this:
1. Create an empty collection of type <SubReport>, like ReportCollection<SubReport>()
2. Then populate the collection with ReportCollection.add(SubReport1); ReportCollection.add(Subreport2); at run time.
3. Assume the reports will be arranged one after another like a stack.
4. If a report have no data (after filtering it) I would like that the columns headers will be collapsed or not shown.

Can you tell me please, how can I achieve these behavior in a standard way.
I really appreciate it if you could attach a project sample of this in WPF. 

I hope you can help me.
Best regards.
Telerik rules!
Steve
Telerik team
 answered on 25 May 2011
1 answer
239 views
Is there a way to request the list of reports from Telerik Reports; Similar to SSRS,  ReportingService2005 class: ListChildren
Peter
Telerik team
 answered on 25 May 2011
1 answer
136 views
Is it possible to style the calendar when used as a report parameter? Can I set the calendar to use the Vista skin?

In your demo http://demos.telerik.com/reporting/employee-sales-summary/demo.aspx the calendar control does not seem to use any skin styling.
Peter
Telerik team
 answered on 25 May 2011
3 answers
434 views
When my report is exported to excel is there an event that fires? I need to add 2 tabs to the excel sheet.
Peter
Telerik team
 answered on 25 May 2011
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?