Hello,
I am trying to create a Pie chart in code, and it is not looking like a pie, i feel like an just missing a setting at the points, but all resources I have read/reviewed have not helped be finish it. Thank for any help!
01.
ObjectDataSource src =
new
ObjectDataSource(curScope,
"GetData"
);
02.
03.
Telerik.Reporting.Graph test =
new
Graph()
04.
{
05.
NoDataMessage =
"Yes, we have no data"
,
06.
Location =
new
PointU(Unit.Inch(0), Unit.Inch(0)),
07.
Size =
new
SizeU(Unit.Inch(8.0D), Unit.Inch(3.0D)),
08.
StyleName =
"Normal.TableGroup"
,
09.
DataSource = src,
10.
Name =
"graph"
+colIndex.ToString()
11.
};
12.
13.
test.Titles.Add(
new
GraphTitle() { Text =
"% of"
+ ReportTitle });
14.
15.
BarSeries pie =
new
BarSeries();
16.
pie.Name =
"pie"
+ colIndex.ToString();
17.
var pallet =
new
ColorPalette();
18.
pallet.AddColors(Color.Red, Color.Blue, Color.Green, Color.Yellow, Color.Orange);
19.
pie.ColorPalette = pallet;
20.
test.ColorPalette = pallet;
21.
22.
GraphGroup category =
new
GraphGroup()
23.
{
24.
Name =
"cat1"
25.
};
26.
category.Groupings.Add(
"=Fields.IngredientName"
);
27.
pie.CategoryGroup = category;
28.
test.CategoryGroups.Add(category);
29.
30.
GraphGroup series =
new
GraphGroup()
31.
{
32.
Name =
"series1"
33.
};
34.
series.Groupings.Add(
"=Fields.PercentOfTotal"
);
35.
//series.Sortings.Add("=Sum(Fields.PercentOfTotal)", SortDirection.Desc);
36.
//series.Sortings.Add("=Fields.IngredientName", SortDirection.Asc);
37.
//series.Filters.Add("=Sum(Fields.PercentOfTotal)", FilterOperator.TopN, "20");
38.
pie.SeriesGroup = series;
39.
test.SeriesGroups.Add(series);
40.
41.
PolarCoordinateSystem polar =
new
PolarCoordinateSystem();
42.
43.
var radCat =
new
Telerik.Reporting.GraphAxis()
44.
{
45.
Name =
"radialAx1"
,
46.
Scale =
new
CategoryScale()
47.
{
48.
//SpacingSlotCount = 0,
49.
PositionMode = AxisPositionMode.OnTicks
50.
}
51.
};
52.
53.
var angNum =
new
Telerik.Reporting.GraphAxis()
54.
{
55.
Name =
"angularAx1"
,
56.
Scale =
new
NumericalScale()
57.
{
58.
//SpacingSlotCount = 1
59.
}
60.
};
61.
62.
polar.Name =
"polarScale"
;
63.
polar.RadialAxis = radCat;
64.
polar.RadialAxis.Style.Visible =
false
;
65.
66.
polar.AngularAxis = angNum;
67.
polar.AngularAxis.Style.Visible =
false
;
68.
69.
test.CoordinateSystems.Add(polar);
70.
pie.CoordinateSystem = polar;
71.
72.
pie.X =
"=IsNull(Sum(Fields.PercentOfTotal), 0)"
;
73.
pie.LegendItem.Value =
"=Fields.IngredientName"
;
74.
pie.ArrangeMode = GraphSeriesArrangeMode.Stacked100;
75.
//pie.DataPointLabel = "Sum(Fields.PercentOfTotal)/1000";
76.
//pie.DataPointLabelFormat = "{0:C0}K";
I have an existing Telerik report - designed in Visual Studio. It's been in production for several months. When I try to change the object data source on it now, it throws an error (can't load type xxx from assembly xxx). There's absolutely nothing wrong with my assemblies, this project compiles and runs fine and has been in production for several months as I said. Any idea what's causing this? I cannot contact support because the license has expired.
Hi,
I have a new problem when I apply the Expanded Display Toggle Visibility. The check box "Toggle mark initially expanded" is not working. As you can see in the attach images, the result in the Crosstab open always expanded whatever choice I make.
As you can see in image "Im-Result" a plus signal (+) is showed next to brand. If I click in the plus signal the table collapse.
Can please someone help?
Thank you.
We are considering purchasing Telerik Reporting but have encountered an issue while trying to install for a trial.
I am trying to install the Telerik.Reporting.Services.Mvc6 but it fails with:
"Could not install package 'Telerik.Reporting.Services.Mvc6 10.0.16.204'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author."
Can the service be installed in .NETFramework version 4.6.1?
Thanks
Hi Team,
In one of our application , we are using silverlight report viewer.
We have configured to save the report as PDF, Excel , Tiff , etc.
But we are not able to configured to save the report as Png, JPG or GIF .
Can you please guide us , how to configure this in report viewer ?
Thanks and regards,
Dhiraj Kumar
Hi
I am currently rewriting an old Silverlight Application in Angular. The original application had some reports which I would like to reuse.
So I added a REST service to my web api by following the instructions in the docs. This seems to be working (http://localhost:[portnumber]/api/reports/formats returns the expected result). I also created a HTML5 viewer (in Angular), and made sure the authorization token is set (I'm using OAuth).
Unfortunately the report doesn't show..
I started to investigate and, as you can see, the network traffic reveals several requests to the report service are triggered. The next to last request appears to contain the contents of the report in html, but in fact this html is just an error page.
While debugging I discovered that the request doing the actual rendering of the report is not authenticated and HttpContext.Current.User is null.
My code to retrieve the report data relies on this user and therefor throws an exception. The authorization header is present and correct but is somehow ignored.
In all other requests to the reportservice the request is authenticated and the current user is correctly filled, just not for this one request doing the rendering.
Do you have any idea what might be causing this?
Good Morning,
I've have seen in previous posts that with telerik reporting it's possible to create a report a Runtime, passing a object data model.
But reading this post I've seen that this can cause problem and there is not a best solution to create report (the post had been created on 2012 and 2013)
Now I want to know if this solution it's advisable or it's better create one report from each model and bind them by the import wizard of telerik report.
Thanks
Hello,
When I export result in excel(xls) all cell formats are "custom", how can I keep date format on cells where dates are written?