Telerik Forums
Reporting Forum
4 answers
193 views
I am trying to create some charts using Telerik Reporting - Q2 2010

I have a data source that returns 2 columns

Date Value
39812 931
39843 796
39871 855
39902 931
39932 752
39963 827
39993 852
40024 732
40055 677
40085 891
40116 723
40146 610
40177 774
40208 984
40236 1281
40267 2322
40297 2734
40328 2726
40358 2570

In the designer I have no data source for the report, but I have the SQLDatasource connected to the chart.

I have a bar series

I set the Series X to Date, and the Series Y to Value

If I preview the report in the designer the bars are all drawn over each other and it looks a complete mess.

See attached image for what it looks like (capture1.png)

Considering there are in the screen shot (and data above) there are 19 data points along the X axis.

But the # of areas defined by the grid is only 7 - this makes reading the labels along the bottom of the X Axis hard since they do not line up.

Have I missed something here?

Capture2.png is what I actually see after configuring some more properties in the chart. As you will see in that image there is 10 grid columns but 19 data columns. The Bars draw over each other.

I do not want to manually configure the width of the bars as the control should do this for me.

Chris

Chris Crowe
Top achievements
Rank 1
 answered on 04 Aug 2010
1 answer
218 views
Hi there!

On my project I have lots of report files, on which I bind a list of objects. One of the properties from these objects is a boolean field, which gives me as output the text "true" or "false".

I woundn´t like to use expressions, neither itemdatabound event, cause it would lead me to a herculeous work, since I have more than two hundred reports in this project.

Is here a way to set the boolean fields to get their text from a resource (resx) file instead of "true" and "false"?

btw, I´m already using the file Telerik.ReportViewer.WebForms.Resources.pt-BR.resx, but it only translates the interface itens, not the data.

Best regards,

Svetoslav
Telerik team
 answered on 04 Aug 2010
1 answer
354 views
Hi,
I'm running our reports with the Silverlight viewer and the WCF report service.
I'm using an authenticated channel and in the report, I want to be able to access the OperationContext of the service making the call to the report so that I can access the authentication information and know for whom I am executing the report.
However, in the report's constructor, OperationContext is null? How is that possible if the report is called from the reporting WCF service? and is there any way I can obtain the appropriate information and/or hook into the report service before it executes the report?

Thanks

Andrew
Svetoslav
Telerik team
 answered on 04 Aug 2010
4 answers
98 views
I am trying to put together a few reports - and can't seem to get the Telerik reports to work
here's what I did and how far I got

I added Telerik.Reporting and Telerik.ReportViewer,WebForms as reference to my web app
the verision is 4.1.10.714
the site is ASP.NET 4.0 created under Visual Studio 2010 with a SQL Server 2005 database

I had already created a view for my data
I added a New Item Telerik Report Q2 2010 - which Visual Studio wanted to put in the App_Code folder
I left clicked and opened View Designer

the menu item Telerik -> Reporting -> Report Wizard
I built a data source from the view, added a ConnectionString to the web config and hit Execute Query - it had 22 items
selected the fields
the data source control is at the bottom of the report
it shows on the left in Data Explorer
I built the report from the data source with the Report Wizard but Preview and HTML Preview are blank
what happened to the 22 records?
if the report is tied to the data source control and the data source control can locate data why can't the report?

also, to run the report, should I create a new page and add a Report Viewer to it, then create a report and move it into the viewer?
Help!
thanks

Marianne
Elliott
Top achievements
Rank 2
 answered on 04 Aug 2010
1 answer
156 views
I created a report and set up the objectdatasource as a "common type" that we use.  The "common type" has a structure of:

Class OrderSession
Property Name As String
Property ID As Integer
Property Orders As OrderList
End Class

The OrderList class contains a list of orders, with each order containing a list of OrderItems.  When I set the datasource as an order session..the only properties I can get to print in the details section are ID and Name.  Everything else causes a red box to display saying something about not having access to the field.  How would I go about printing properties from the Order and OrderItem in the details section?

I am new to Telerik Reporting but have used Crystal for a long time.  Any help on how to do this would be appreciated.
Peter
Telerik team
 answered on 03 Aug 2010
1 answer
64 views
Hello,
i've created a relerik report, my data only 5 record but it displayed on 2 pages the first one there's only report header, page header and one record as  attached the report image
Peter
Telerik team
 answered on 03 Aug 2010
2 answers
67 views
I recently upgraded to Telerik Reporting Q1 2010 and to VS2010.  I have a reporting project where most of my charts have converted up and run fine.  However I have one page where I render 4 charts on one page, and I'm getting 4 jscript errors:

Object required  Telerik.ReportViewer.axd?optype=Resource&version=4.0.10.423&name=Resources.ReportViewer.js, line 430 character 5

from this function:
ReportViewer.prototype.get_Height = function()
{
    var reportTable = document.getElementById(this.reportTableId);
    var lastRow = reportTable.rows[reportTable.rows.length - 1];
    var oldDisplay = lastRow.style.display;
    lastRow.style.display = "none";
  
    var viewer = document.getElementById(this.clientID);
    var clientHeight = viewer.clientHeight;
    lastRow.style.display = oldDisplay;
    return clientHeight;
}

The failure is caused by var viewer being null.
Any ideas?
Dan
Peter
Telerik team
 answered on 03 Aug 2010
4 answers
321 views
I have a function for exporting reports directly to pdf that works great but I want to be able to redirect the user once the report is generated and can't seem to make that happen. I either can redirect the user or print the report and the user stays on the page. Here is the code I use for the export, taken from a blog on this site. Works great.

Public Function ExportToPDF(ByVal reportToExport As Telerik.Reporting.Report) As Telerik.Reporting.Report
       Dim reportProcessor As New Telerik.Reporting.Processing.ReportProcessor()
       Dim result As RenderingResult = reportProcessor.RenderReport("PDF", reportToExport, Nothing)
       Dim fileName As String = result.DocumentName + ".pdf"
       HttpContext.Current.Response.Clear()
       HttpContext.Current.Response.ContentType = result.MimeType
       HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.Private)
       HttpContext.Current.Response.Expires = -1
       HttpContext.Current.Response.Buffer = True
       'Uncommenting the following line will prompt user to Open Save or Cancel. Otherwise report opens in new window
       HttpContext.Current.Response.AddHeader("Content-Disposition", String.Format("{0};FileName=""{1}""", "attachment", fileName))
       HttpContext.Current.Response.BinaryWrite(result.DocumentBytes)
       HttpContext.Current.Response.End()
   End Function
I was told to remove the last line that ends the request and add this:
HttpContext.Current.Response.Redirect("../WorkOrders/OpenWorkOrdersSummary.aspx", True)
But that didn't work, it only redirected me to the new page but no report got generated. Here is the code I use to generate the report:
If ChkPrint.Checked = True Then
           Dim tF As New TelerikFunctions
           Dim rv = New FacilitiesReportsLibrary.WorkOrder
           rv.setWorkOrderID = Session("WorkOrderID")
           tF.ExportToPDF(rv)
       Else
           Response.Redirect("../WorkOrders/OpenWorkOrdersSummary.aspx")
       End If
Any help would be appreciated.
AkAlan
Top achievements
Rank 2
 answered on 31 Jul 2010
4 answers
151 views
I have recently started using the Telerik reporting to make a multi-sourced complex report.  I have figured out how to fulfill most of my requirements, but I have two issues currently with the Telerik reporting that I have not been able to resolve.

Issue #1:

All of the paging/printing/exporting options at the top are doubled up.  (A colored icon and a greyed icon)  This happens regardless of the Skin that I tried.  Since the demos don't have a source option like the other Telerik controls, I have not been able to view how it was done in your demos to make the header look normal.  I have attached a small screenshot below.

Report definition looks like this:
<telerik:ReportViewer ID="ReportViewer1" Width="721px" Height="1100px" runat="server" 
    Report="NAVPass.Reports.AMRForm, NAVPass.Reports, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" 
    ProgressText="Generating AMR document..." Skin="Original">
</telerik:ReportViewer>

Issue #2:

I have checkboxes attached to a data source.  They load correctly, but no matter what parameters I try in the properties, they always appear left justified, and I am trying to center them within the column.  I have tried the following properties:

TextAlign : Center
Padding->Left : [some value]
CheckAlign : MiddleCenter
Location->X : [some value]

The two tables have data sources that are loaded in a fairly straightforward way:
// Detail section
ICollection<Inspection> inspectList = insRepo.GetInspectionsForAMR(ReportParameters["AMRID"].Value.ToString());
tableInspections.DataSource = inspectList;
ICollection<Equipment> equipList = equipRepo.GetEquipmentForAMR(ReportParameters["AMRID"].Value.ToString());
tableEquipment.DataSource = equipList;

From the designer.cs file:
// 
// cbRequired
// 
this.cbRequired.CheckAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.cbRequired.CheckedImage = ((object)(resources.GetObject("cbRequired.CheckedImage")));
this.cbRequired.IndeterminateImage = ((object)(resources.GetObject("cbRequired.IndeterminateImage")));
this.cbRequired.Location = new Telerik.Reporting.Drawing.PointU(new Telerik.Reporting.Drawing.Unit(0.30000001192092896, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0, Telerik.Reporting.Drawing.UnitType.Inch));
this.cbRequired.Name = "cbRequired";
this.cbRequired.Size = new Telerik.Reporting.Drawing.SizeU(new Telerik.Reporting.Drawing.Unit(0.59999996423721313, Telerik.Reporting.Drawing.UnitType.Inch), new Telerik.Reporting.Drawing.Unit(0.24999998509883881, Telerik.Reporting.Drawing.UnitType.Inch));
this.cbRequired.Style.BorderStyle.Top = Telerik.Reporting.Drawing.BorderType.Solid;
this.cbRequired.Style.Padding.Left = new Telerik.Reporting.Drawing.Unit(0, Telerik.Reporting.Drawing.UnitType.Inch);
this.cbRequired.Style.TextAlign = Telerik.Reporting.Drawing.HorizontalAlign.Center;
this.cbRequired.Style.VerticalAlign = Telerik.Reporting.Drawing.VerticalAlign.Middle;
this.cbRequired.StyleName = "";
this.cbRequired.Text = "     ";
this.cbRequired.UncheckedImage = ((object)(resources.GetObject("cbRequired.UncheckedImage")));
this.cbRequired.Value = "=Fields.Required";

Please let me know what I am doing wrong.  Thanks.
Peter
Telerik team
 answered on 30 Jul 2010
2 answers
90 views
I have a master report, the ctor of which accepts 4-arguments. This report contains 1-subreport. In the InitializeComponents() method of the master report, an instance of the sub-report is created, which fires the ctor of the sub-report. My problem is that I need to pass along some of the arguments sent to the master report ctor to the sub-report ctor. Ideas anyone? A sample of how to accomplish this would be most useful.

Thanks!
Patrick
Top achievements
Rank 1
 answered on 30 Jul 2010
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?