Telerik Forums
Reporting Forum
1 answer
170 views

My problem is after I assigned data to report by calling report constructor, put it into report viewer and called dataBind() of report viewer. It should show my Pie chart and legend, but it only display the legend.

        public PieChart(Dictionary<string, int> results, ArrayList percentageResult)  
        {  
            InitializeComponent();  
            ChartSeries chartSeries = new ChartSeries();  
            chartSeries.Name = "Pie Chart";  
            chartSeries.Type = ChartSeriesType.Pie;  
            int i = 0;  
            foreach (KeyValuePair<string, int> item in results)  
            {  
                List<Color> itemColor = new List<Color>(10);  
                itemColor.Add(Color.Red);  
                itemColor.Add(Color.Yellow);  
                itemColor.Add(Color.Green);  
                itemColor.Add(Color.Blue);  
                itemColor.Add(Color.Brown);  
                itemColor.Add(Color.Pink);  
                itemColor.Add(Color.Orange);  
                itemColor.Add(Color.Black);  
                itemColor.Add(Color.Gray);  
                itemColor.Add(Color.Olive);  
                chartSeries.AddItem(item.Value, item.Key, itemColor[i]);  
                chartSeries.Items[i].Appearance.FillStyle.FillType = Telerik.Reporting.Charting.Styles.FillType.Solid;  
                chart1.Legend.Items.Add(new LabelItem(item.Key + ": " + item.Value + ": "  
                    + percentageResult[i] + " %"));  
                chart1.Legend.Items[i].Marker.Appearance.FillStyle.MainColor = itemColor[i];  
                chart1.Legend.Items[i].Marker.Appearance.FillStyle.FillType = Telerik.Reporting.Charting.Styles.FillType.Solid;  
                i++;  
            }  
 
            chartSeries.Appearance.LabelAppearance.Visible = false;  
            chart1.Series.Add(chartSeries);  
            chart1.Series[0].Appearance.TextAppearance.TextProperties.Font =  
    new System.Drawing.Font(FontFamily.GenericSansSerif, 15);  
 
            LabelItem labelItem = new LabelItem("chart");  
            chartSeries.AddItem(10, "a");  
            chartSeries.AddItem(20, "b");  
            chartSeries.AddItem(50, "c");  
            chartSeries.AddItem(100, "d");  
 
 
            chart1.Series.Add(chartSeries);  
            detail.Items.AddRange(new ReportItemBase[] { chart1 });  
              
        }  
 

,above is report constructor source code,

            PieChart pieChart = new PieChart(results, percentageResult);  
            ReportViewer2.Report = pieChart;  
            ReportViewer2.RefreshReport(); 

and this is my calling constructor source code part.
 
I also checked out the items in chart1, there are data.
 

Pakorn
Top achievements
Rank 1
 answered on 31 Mar 2010
7 answers
460 views
I am trying to hide a table based on data.  Are whole tables subject to conditional formatting?  I have not even been able to get individual rows to see it.

Here is my expression:
=Reportitem.parent.dataobject.Tiertype = "4T"

Style result is Visible = false (unchecked).

This is the latest of many excpressions I have tried.

Thanks for your usual wise counsel.
Steve
Telerik team
 answered on 30 Mar 2010
0 answers
117 views
Hi,
      I am trying to calculate the height of current page by programatically on runtime. but their does not have such type property.
how can I calculate the height of page?
        I am also try to calculate whitespace height?
   this is also not possible to me.

Replay,
shiatl kasliwal
Top achievements
Rank 1
 asked on 30 Mar 2010
3 answers
85 views
Hi, I have used your example userdef function FormatArray() to show the value of multi params selected on a report.  However since Q1 2010 some of the reports now show textbox errors at preview/runtime stating "An error has occured while processing TextBox 'TextBox8': The expression contains undefined function call FormatArray()."

It seems to be only if the textbox expression has spaces in between some static text and the function 
i.e. "= 'Site: ' + FormatArray(Parameters.paramSite)" fails
but "= 'Site: '+FormatArray(Parameters.paramSite)" works


Steve
Telerik team
 answered on 30 Mar 2010
1 answer
213 views
I have a time sheet report in vb that I want to create subtotals (grouping) by weekly. How can I do this?

My date field is tim_date which is from SQL as datetime field.
Chris Gillies
Top achievements
Rank 1
 answered on 30 Mar 2010
0 answers
74 views
How do I update the copyright date that appears at the footer of all web pages, in a site that uses Telerik? I looked for a footer file, include file and also looked in the site source files but could not find it anywhere. Thanks for your help/instructions...
Jason Turner
Top achievements
Rank 1
 asked on 29 Mar 2010
1 answer
328 views
After upgrading to the newest reporting version, a report that had been working fine previously started giving the following error:

An error has occured while processing Report '':
Unable to cast object of type 'DataObject' to type 'Telerik.Reporting.Expressions.IHierarchicalData'.

After some experimentation I found that removing the textbox in the report's footer that used Count(RowNumber()) (to display the total count of detail items) the error went away and the report worked as before.  How can I show the count without getting an error?

Thanks,
Mike
Steve
Telerik team
 answered on 29 Mar 2010
3 answers
76 views
Hello,
I am new to Telerik Reporting.I want to use Reporting in silverlight.I found very less documentaion available for silverlight.
Can anybody send me some usefull links where i can get an complete example for silverlight with database connection and without database connection.

Thanks in advance !
Massimiliano Bassili
Top achievements
Rank 1
 answered on 29 Mar 2010
1 answer
83 views
Dear Telerik support, the bug I reported back in 2008 (possible bug in params - Martin P - Posted on Aug 19, 2008)  seems to be back in Q1 2010, when rendered in the web reportview and a trailing space exists an error is shown  "invalid value. - Parameters: One or moreparameters are not set or have invalid values"

In a multi-value parameter ddl if just the value with a trailing space is selected you get the error but what is much worse is if all the ddl values are selected and preview is pressed the report displays but has automatically de-selected the param with the trailing space and displayed the data minus any calc which would've been taken into account from the missing val.  You get no errors so do not know the report is incorrect.

As previously reported "An easy fix to place an RTRIM() in the dataset but think this is a bug an caught me out completely." AGAIN!!

I'm disappointed this has happened again and my client has been working with incorrect figures based on the reports

Regards
Martin
Steve
Telerik team
 answered on 29 Mar 2010
1 answer
137 views
When I export to Excel, the rows merge. This is a really bad inconveniance.And i tried to search for a solution and I don´t know why is this, and any help will be appreciated. Please, if it is there a programatical solution please send it.
Steve
Telerik team
 answered on 29 Mar 2010
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?