Telerik Forums
Reporting Forum
3 answers
402 views
I have a bar chart in my report,  X-axis is the employee name, Y-axis is the sales amount.   If sales amount over X, I would like to color the bar "Green".  If they are below X, color the bar "Red".  How can I do this?  I tried looking at Conditional Formatting but it's not working. 

Please guide me into right direction. 

Thanks!
Peter
Telerik team
 answered on 28 Jul 2011
5 answers
240 views
Hello,

How can I access the a textbox value from chart needdatasource method?
My code:
private void Pie_NeedDataSource(object sender, EventArgs e)
       {
           Telerik.Reporting.Processing.Chart chart = sender as Telerik.Reporting.Processing.Chart;
           //Telerik.Reporting.Chart defChart = (Telerik.Reporting.Chart)chart.ItemDefinition;
           //Processing.TextBox textBox21 = (defChart.Items["textBox21"] as Processing.TextBox);
           Telerik.Reporting.Chart chartDef = (Telerik.Reporting.Chart)chart.ItemDefinition;
           Telerik.Reporting.Charting.ChartSeries series = new Telerik.Reporting.Charting.ChartSeries();
           series.Type = ChartSeriesType.Pie;
           Telerik.Reporting.Charting.ChartLegend legend = new Telerik.Reporting.Charting.ChartLegend();
 
           string CoverDescription;
           int itemValue;
          
           string commandText = string.Empty;
           SqlConnection connection = new SqlConnection(global::QTaskReporting.Properties.Settings.Default.QTDbConnString);
           commandText = "SELECT COUNT(*) AS ItemCount, SDesc FROM vwSubTasksAndStatuses where TaskID=" + textBox21.Value + " GROUP BY SDesc";
           SqlCommand cmd = new SqlCommand(commandText, connection);
           SqlDataAdapter da = new SqlDataAdapter(cmd);
           DataSet ds = new DataSet();
           da.Fill(ds);
            
           foreach (DataRow rowView in ds.Tables[0].Rows)
           {
               Telerik.Reporting.Charting.ChartSeriesItem seriesItem = new Telerik.Reporting.Charting.ChartSeriesItem();
 
               //The chart Y value will be based on the Value amount
               seriesItem.YValue = Convert.ToInt32(rowView["ItemCount"]);
               seriesItem.Appearance.FillStyle.FillType = Telerik.Reporting.Charting.Styles.FillType.Solid;
 
               //The chart item label should be set to the Value amount
               itemValue = Convert.ToInt32(rowView["ItemCount"]);
               seriesItem.Label.TextBlock.Text = itemValue.ToString("##");
               seriesItem.Label.Appearance.LabelLocation = Telerik.Reporting.Charting.Styles.StyleSeriesItemLabel.ItemLabelLocation.Inside;
               seriesItem.Label.TextBlock.Appearance.TextProperties.Color = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(58)))), ((int)(((byte)(112)))));
 
               //Assign the chart item description
               CoverDescription = rowView["SDesc"].ToString();
               seriesItem.Name = CoverDescription.Trim();
 
               //Give the "Shortfall in Cover" chart item an exploded appearance
               if (seriesItem.Name == "New")
               {
                   seriesItem.Appearance.Exploded = true;
               }
 
               series.AddItem(seriesItem);
 
           }
 
           //Display the legend
           series.Appearance.LegendDisplayMode = ChartSeriesLegendDisplayMode.ItemLabels;
           series.Appearance.Border.Color = System.Drawing.Color.White;
           series.Appearance.Border.Visible = false;
           series.Appearance.DiameterScale = .90;
 
           series.Appearance.ExplodePercent = 10;
 
           chartDef.Series.Clear();
           chartDef.Series.Add(series);
 
           chartDef.Legend.Appearance.Position.AlignedPosition = Telerik.Reporting.Charting.Styles.AlignedPositions.TopRight;
       }

In the above code I need to use the textbox value in the sql syntax.
Both chart and textbox are placed within a table (Please view the attached screen-shot).

Please, I need your help,
It is appreciated to send me the modified code.

Regards,
Bader
Peter
Telerik team
 answered on 28 Jul 2011
2 answers
76 views
I have referred to the ReportBook (Q2 2011), that it can be done by


reportBook.Reports(2).PageNumberingStyle = PageNumberingStyle.ResetNumberingAndCount

My version is 2009 Q3.  How can I do this?

I have mutliple reports which are added to a report book.
For instace,
Report A: total pages: 3
Report B: total pages: 2
Report C: total page: 1

I want to show like this:
Report A: page 1 of 3
Report B: page 1 of 2
Report C: page 1 of 1

ie. the report will reset the page count.

If it cannot be achieved with my version, then may I ask how to :
add "Continue" at Report A, page 1 and 2, then Total Page: 3
add "Continue" at Report B, page 1, then Total Page: 2
add "Continue" at Report C, Total Page: 1


Thanks.
Alfred
Top achievements
Rank 1
 answered on 27 Jul 2011
1 answer
106 views
Hello,  I have a Point Chart in my report.  Some points will be in the same location, or very close to eachother and the point labels overlap.  Currently nothing is done about the overlap and it looks messy.  Does the Telerik Chart have a solution for this?  SSRS draws arrows to the points when there is overlap so all labels are readable.  Does Telerik have something like this?  If so, what property do I have to set in the chart (or series)?

Thanks,
Justin
Peter
Telerik team
 answered on 27 Jul 2011
3 answers
204 views
Is it possible to pop up a busy indicator while waiting for the print dialog to show up in the Silverlight Report Viewer. This is an issue with larger reports that take a while to render since users have no real indication that the application is doing anything. We get an indicator when you select one of the export options (i.e pdf export).
Steve
Telerik team
 answered on 27 Jul 2011
0 answers
98 views
delete that thread , sorry ;]
Błażej
Top achievements
Rank 1
 asked on 27 Jul 2011
3 answers
115 views
Hello,
I've created a chart dragging it from the toolboxes, I need to use totally the space it offers so, no margin, no padding, no title.... I set Elements->Plot Area->Appearance->Dimension->Auto size to false and set the margins/paddings to zero....when I close the designer then reopen it I got all the margin and padding set and also the autosize to true..... how can I set it to false?
Thanks
Steve
Telerik team
 answered on 27 Jul 2011
1 answer
282 views
Hi,

I have got a report viewer control in one of the tab. It does not stretch to 100% height. Please remember the page sits inside Master page layout. 

I have follow the link http://www.telerik.com/help/reporting/faq-web-viewer-100-percent-height.html but it does not seem to help. Attachment shows the partial view of the report being rendered with scroll bars at the right hand side.


Following is the code-snippet

<telerik:RadPageView ID="RptView" runat="server" Width="100%" Height="100%">
                            <table style="width: 100%; height: 100%;">
                                <tr>
                                    <td>
                                        &nbsp;
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <div id="content" style="width: 100%; height: 100%;">
                                            <telerik:ReportViewer ID="rptViewer" runat="server" Width="100%" Height="100%" Visible="true">
                                            </telerik:ReportViewer>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                        </telerik:RadPageView>


Many thanks.


Steve
Telerik team
 answered on 27 Jul 2011
1 answer
747 views
Hi,
I've excactly the same problem as described in another post (want to achieve horizontal data) here:

http://www.telerik.com/community/forums/reporting/telerik-reporting/vertical-data.aspx

I downloaded the sample but it doesn't work with the latest release (missing datasource, other design time errors without stakc trace...). It would be nice to have a description of how to solve an issue in addition to code samples.

Can you point me to the documentation page where this is described. I can only find the general desciption of Table/CrossTable/List items. Is it really neccessary to dig into all the complicated inner group / outer group / parent call... concepts if I just want to create a simple table? Well, I am sure the CrossTable item is an excellent component if you need such a complexity, but I am not sure that melting such a complex component with a standard table or easy list was such a smart idea.

Its always the same problem "complexity vs. easy-to-handle" controls. However, I am evaluating the telerik reporting tool for three days now and I spent a lot of time reading forum posts and documentation. Here is my conclusion:

First, the reporting framework is probably the best you can get on market today. You can generate and customize almost all types of reports with it. However, for someone which is new to this framework, it is incredibly hard to build a simple table from scratch (not using the wizzard). With regards to a future "end-user-designer" tool I don't think any end-user would be able to create a table this way.

Best regards,

Stefan
Steve
Telerik team
 answered on 27 Jul 2011
8 answers
763 views
Hi to all,
i started to test telerik report system. I made a really simple report (a simple grid from an sql table of about 100 rows... without images). I added webreportviewer to my project and connected it to my report. When i test my application i can see the report preview, i can export it in RTF or CSV but i cannot export it in PDF or XLS due an out of memory exception.
I'm using it on windows azure development enviroment. My system is an updated windows 7 64 bit with 4GB of ram and visual studio 2010 pro.

This is the exception stack trace
[OutOfMemoryException: Memoria insufficiente.] 
   System.Drawing.Graphics.FromHdcInternal(IntPtr hdc) +203 
   System.Drawing.Font.ToLogFont(Object logFont) +184 
   System.Drawing.Font.ToHfont() +166 
   Telerik.Reporting.Pdf.Fonts.TrueType.FontReader.GetFontData(Font font, Boolean& isTTC) +390 
   Telerik.Reporting.Pdf.Fonts.TrueType.TrueTypeDescriptor..ctor(Font gdiFont) +736 
   Telerik.Reporting.Pdf.Fonts.TrueType.TrueTypeDescriptor..ctor(PdfFont font) +84 
   Telerik.Reporting.Pdf.PdfFontTable.GetDescriptor(PdfFont font) +399 
   Telerik.Reporting.Pdf.PdfFontDictionary..ctor(PdfDocument document, PdfFont drawingFont) +198 
   Telerik.Reporting.Pdf.PdfFontType0Dictionary..ctor(PdfDocument document, PdfFont font) +73 
   Telerik.Reporting.Pdf.PdfFontTable.GetFont(PdfFont font) +315 
   Telerik.Reporting.Pdf.PdfPageDictionary.GetFontName(PdfFont font, PdfFontDictionary& fontDictionary) +132 
   Telerik.Reporting.Pdf.Rendering.PdfRenderer.GetFontName(PdfFont font, PdfFontDictionary& fontDictionary) +101 
   Telerik.Reporting.Pdf.Rendering.PdfRendererGraphicsState.Update(PdfFont font, Brush brush, Int32 renderMode) +179 
   Telerik.Reporting.Pdf.Rendering.PdfRenderer.Update(PdfFont pdfFont, Brush brush, Int32 renderMode) +184 
   Telerik.Reporting.Pdf.Rendering.PdfRenderer.DrawString(String text, PdfFont font, Brush brush, RectangleF rect, Boolean rightToLeft) +404 
   Telerik.Reporting.Pdf.Drawing.PdfGraphics.DrawString(String s, Font font, Brush brush, RectangleF rect, StringFormat format) +303 
   Telerik.Reporting.ImageRendering.CanvasPdf.DrawStringMultiline(String s, Font font, Brush brush, RectangleF rect, StringFormat format) +954 
   Telerik.Reporting.ImageRendering.TextBox.Render() +846 
   Telerik.Reporting.ImageRendering.RenderingElement.RenderToPage(RectangleRF clip, RoundedFloat parentLeft, RoundedFloat parentTop, RoundedFloat parentReservedTop, RoundedFloat parentReservedBottom, RoundedFloat parentReservedLeft, RoundedFloat parentReservedRight) +2858 
   Telerik.Reporting.ImageRendering.RenderingElement.RenderChildren(RectangleRF clip) +473 
   Telerik.Reporting.ImageRendering.RenderingElement.RenderToPage(RectangleRF clip, RoundedFloat parentLeft, RoundedFloat parentTop, RoundedFloat parentReservedTop, RoundedFloat parentReservedBottom, RoundedFloat parentReservedLeft, RoundedFloat parentReservedRight) +3025 
   Telerik.Reporting.ImageRendering.CompositionBase.RenderPageSection(PageArea pageArea, RenderingElement pageSection, Single height) +713 
   Telerik.Reporting.ImageRendering.CompositionBase.ApplyPageSections() +405 
   Telerik.Reporting.ImageRendering.CompositionBase.SendPhysicalPages(Boolean force) +142 
   Telerik.Reporting.ImageRendering.CompositionBase.End() +145 
   Telerik.Reporting.ImageRendering.CompositionPdf.End() +262 
   Telerik.Reporting.ImageRendering.CompositionBase.Dispose(Boolean disposing) +94 
   Telerik.Reporting.ImageRendering.CompositionPdf.Dispose(Boolean disposing) +91 
   Telerik.Reporting.ImageRendering.CompositionBase.System.IDisposable.Dispose() +53 
   Telerik.Reporting.ImageRendering.ImageRendererBase.RenderReport(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback) +557 
   Telerik.Reporting.ImageRendering.ImageRendererBase.Telerik.Reporting.Processing.IRenderingExtension.Render(Report report, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback, EvaluateHeaderFooterExpressions evalHeaderFooterCallback) +96 
   Telerik.Reporting.Processing.ReportProcessor.Render(IList`1 reports, ExtensionInfo extensionInfo, Hashtable renderingContext, Hashtable deviceInfo, CreateStream createStreamCallback) +2090 
   Telerik.Reporting.Processing.ReportProcessor.RenderReport(String format, IReportDocument reportDocument, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback) +814 
   Telerik.ReportViewer.WebForms.ServerReport.Render(HttpResponse response, String format, Int32 pageIndex) +1390 
   Telerik.ReportViewer.WebForms.ReportExportOperation.PerformOperation(NameValueCollection urlQuery, HttpContext context) +180 
   Telerik.ReportViewer.WebForms.HttpHandler.ProcessRequest(HttpContext context) +501 
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +1182 
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +230 
 

Some suggestion about to solve (or workaround) the problem?

Thanks

Sandro
Steve
Telerik team
 answered on 27 Jul 2011
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?