Telerik Forums
Reporting Forum
2 answers
134 views
Hello Telerik,

I am creating a chart from a SQL datasource.  I have two series that are bound to columns on the datasource.  If I preview the chart, it looks good and the chart matches the data.  My next step is to display my own custom X-Axis labels.  I do this by setting PlotArea.XAxis.AutoScale = false and create the items manually.  However when I do this and preview the chart, the chart does not look correct (the line does not match the data from the database).

This forum post seems to be related: http://www.telerik.com/community/forums/aspnet/chart/trouble-with-custom-xaxis-labels.aspx
It suggests that I do not set the xvalue inside my chart series.  However, I am adding the series by binding to a datasource, so I do not see how to make this work in my case.

Here is my code:
//set the datasource
chart1.DataSource = this.sqlDataSource1;
//COMMENT OUT THIS SECTION AND THE CHART LOOKS GOOD
//add new xaxis series items
chart1.PlotArea.XAxis.AutoScale = false;
chart1.PlotArea.XAxis.AddRange(1, 7, 1);
chart1.PlotArea.XAxis[0].TextBlock.Text = "12/1/10";
chart1.PlotArea.XAxis[1].TextBlock.Text = "12/5/10";
chart1.PlotArea.XAxis[2].TextBlock.Text = "12/10/10";
chart1.PlotArea.XAxis[3].TextBlock.Text = "12/15/10";
chart1.PlotArea.XAxis[4].TextBlock.Text = "12/20/10";
chart1.PlotArea.XAxis[5].TextBlock.Text = "12/25/10";
chart1.PlotArea.XAxis[6].TextBlock.Text = "12/30/10";
  
//add the series 1
ChartSeries seriesAvg = new ChartSeries();
seriesAvg.DataYColumn = "Average";
seriesAvg.Type = ChartSeriesType.Area;
seriesAvg.DefaultLabelValue = "";
chart1.Series.Add(seriesAvg);
//add the series 2
ChartSeries seriesMax = new ChartSeries();
seriesMax.DataYColumn = "Max";
seriesMax.Type = ChartSeriesType.Line;
seriesMax.DefaultLabelValue = "";
chart1.Series.Add(seriesMax);


Am I doing this totally wrong, or is there a work around?

Thanks, Chris
Chris Ward
Top achievements
Rank 1
 answered on 10 Feb 2011
12 answers
511 views
I have a very simple report of names and departments.  The report has a grouping to print departments and does a page break after a department to start a new one.

Sales
  John Smith
  Mary Jones

Human Resources
  Steve Garcias
  Jeremy Doe

Etc...

However, I'd like the Department Name to print all the way at the very bottom of the page so that every page has its department on the bottom, in the same spot regardless of how many names are on the page (or if the list of names spans several pages each page prints the department name in the same spot).  If I add the department name to the Group Footer, it prints directly after the names and I noticed on the forums you cannot align the group footer to the bottom of the page.  If I put the department in the Page footer, it just prints the first department name on every page. 

This is a simple task in an Access Database Report, but how can I do this in Telerik?
David Gallant
Top achievements
Rank 1
 answered on 10 Feb 2011
1 answer
98 views
Hi,

I have not been able to have a report display when the business object is located outside the report's class library project.  I have added a reference to the business object's project, and the report designer allows me to set up a data source and view fields in the data explorer, but when I click on preview it says:

Error has been thrown by the target of an invocation.
------------------- InnerException ------------
Object reference not set to an instance of an object.


When I move the business object into the report library and hardcode its connection string, then it works.  I notice that the sample app supplied by Telerik also has the business object in the report library.  Is this a necessity, or can the business objects be in another project?

Thanks.
Ron
Steve
Telerik team
 answered on 10 Feb 2011
1 answer
296 views
Hello,

Here's a page were I display a barcode:
http://74.84.130.250/

The report viewer scrolls.

How do I adjust this so it does not scroll?

Like an iFrame you can do scroll=0
Steve
Telerik team
 answered on 10 Feb 2011
1 answer
122 views

Hello,

I am currently using Telerik reporting Q1-2009.  I have a report that prints fine when viewed in the ReportViewer.  When I implement the code to print the report directly to the printer  based on the following KB Article http://www.telerik.com/help/reporting/p_telerik_reporting_processing_reportprocessor_printcontroller.html it will go directly to the printer and not display the dialog box, however, the report itself prints the right and bottom margins off the pages is the best way to describe it.  The top and left margins appear to be ok, but the line spacing is also off a bit. 

I am assuming that it may be the difference between printing to printer and not using the adobe reader vs viewing in the viewer which is using the adobe reader and printing from there maintains the look.  If this is the case, how do I get it to print directly to the printer in the same format as when viewed and printed from the viewer. 

I am using ASP.NET VB code for the website.  This is a web application.

(in attachments ignore the 2 images with the dark gray border.  This was confusing as it was the background of my desktop when I captured the images.)

Doug

Steve
Telerik team
 answered on 10 Feb 2011
0 answers
64 views
Hi,

    I have a Master report with two SubReports. In the sub reports i am loading simple dynamic reports files. Even though the two reports can be fitted in one single page(as there might be lot of gap in the first reports page at the bottom) of the master report, the reports are getting displayed in two different pages(Fist reports print is getting started from the first page starting and the second reports print is getting started from the second page starting). Can any body please solve my problem of displaying the two reports in a single page without any discontinuity(i.e; the second reports print must start from the end of the first reports print). I am using Telerik Reporting Q3 2010 for windows applications.
Ravi
Top achievements
Rank 1
 asked on 10 Feb 2011
1 answer
113 views
hi,
i have one subreport in my report.
i pass parameters to report and report pass this value to sub reports's parameter.
it will work perfectly.

but i want sub reports parameters values on subreport_ItemDataBound().
Jayesh Goyani
Top achievements
Rank 2
 answered on 10 Feb 2011
1 answer
539 views
I have an aspx page with a report viewer on it that is not rendering a report. The report does render in the report designer.  When I test it in debug mode it does not stop on the  Page_Load sub as expected.  The code is short, so I've included it:


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="RptViewer.aspx.vb" Inherits="RptViewer" %>

<%@ Register assembly="Telerik.ReportViewer.WebForms, Version=4.2.10.1221, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.ReportViewer.WebForms" tagprefix="telerik" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>telerik Report Viewer</title>
    <style type="text/css">           
        html#html, body#body, form#form1, div#content, center#center
        {   
            border: 0px solid black;
            padding: 0px;
            margin: 0px;
            height: 100%;
        }
    </style>
</head>
<body id="body">
    <form id="form1" runat="server">              
    <div id="content"><center id="center"><telerik:ReportViewer ID="ReportViewer1"
            runat="server"  style="border:1px solid #ccc;"
            width="99%" height="99%" Skin="WebBlue"/></center></div>
    </form>
</body>
</html>

The codebehind:

Imports System
Imports System.Web.UI
Imports Telerik.Reporting
Imports Reports

Partial Class RptViewer
    Inherits System.Web.UI.Page

    Protected Sub Page_load(ByVal sender As Object, ByVal e As EventArgs)
        If Not IsPostBack Then
            Dim rpt As New PDS
            Me.ReportViewer1.Report = rpt
        End If
    End Sub
End Class


Thank you
Ron
Ron
Top achievements
Rank 1
 answered on 10 Feb 2011
2 answers
160 views
Latest Telerik.Reporting (2010.3 1221) - the order of attributes can break reports.  This did not appear to be an issue with prior (at least .1119)

As an example, from the included samples in From CSharp.ReportExamples.vs2010 - CSharp.Silverlight.Demo: MainPage.xaml

This works (as supplied in demo)
<telerik:ReportViewer Grid.Row="1" x:Name="ReportViewer1"
   Width="1000"
   telerikControls:StyleManager.Theme="{Binding SelectedItem, ElementName=ThemeSelector}"
   ReportServiceUri="../ReportService.svc"
   Report="Telerik.Reporting.Examples.CSharp.ReportCatalog, CSharp.ReportLibrary"  />


Changing the order of  Report  and ReportSerivceUri does not work (Page will load, and will display "No Report" where the report content should be within the viewer).
<telerik:ReportViewer Grid.Row="1" x:Name="ReportViewer1"
     Width="1000"
       telerikControls:StyleManager.Theme="{Binding SelectedItem, ElementName=ThemeSelector}"
       Report="Telerik.Reporting.Examples.CSharp.ReportCatalog, CSharp.ReportLibrary"
       ReportServiceUri="../ReportService.svc" />

I tried to post this as a support ticket - but received the message "Hashtable insert failed. Load factor too high." - guess I'm two for two today.

Also note that if you are using say the ReportView.RenderBegin event, that event will not be raised in addition to the report not being rendered in the following:
<telerik:ReportViewer Grid.Row="1" x:Name="ReportViewer1"
     Width="1000"
       telerikControls:StyleManager.Theme="{Binding SelectedItem, ElementName=ThemeSelector}"
       Report="Telerik.Reporting.Examples.CSharp.ReportCatalog, CSharp.ReportLibrary"
       ReportServiceUri="../ReportService.svc"
       RenderBegin="ReportViewer1_RenderBegin" />

Karlkim Suwanmongkol
Top achievements
Rank 1
 answered on 09 Feb 2011
0 answers
170 views
How do I bind a sqlDatasource field I have to a textbox value?
Scott
Top achievements
Rank 1
 asked on 09 Feb 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?