Telerik Forums
Reporting Forum
1 answer
193 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
85 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
102 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
369 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
190 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
119 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
2 answers
103 views
I am using Reporting version 4.0.10.423 and have run into an issue. I have just loaded IE8 and now my reporting toolbar disappears. After reading some threads I did add "

<!

 

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

 

"
to my page but I am still having problems with it disappearing.

Any ideas?


Thanks

Dwayne Starkey
Top achievements
Rank 1
 answered on 30 Jul 2010
1 answer
398 views
Hello,

I try to bind a datatable to a table on a report in the C# code.
I could find anything about this topic. Is this possible?

Just want to fill a datatable with two columns and 2 rows. That datatable should be shown on a report.

(or maybe)

When it's possible to bind a filtered Telerik.DataGrid on a report table that would be better.

Chris
Peter
Telerik team
 answered on 29 Jul 2010
0 answers
87 views
I am building the report in code and basically create textboxes and images from a wpf canvas. When the user scales a textbox on the canvas and the program creates a report from the canvas there does not seem to be a may to add the ScaleTransform to the report textbox. I am also allowing the user to rotate the textbox and I am using the angle property to set the textbox angle on the report.

Does anyone know if I can set a scale transform on a report textbox?
Rodney Hilton
Top achievements
Rank 1
 asked on 29 Jul 2010
2 answers
86 views
Hi,

I am trying to Modify the chart Y Axis Item Labels of a report that is displayed in the silverlight report viewer (2010 Q2).
The Reason for this is that I need to modify the Labels into a non standard format string 'HHH:mm:ss' where hours could be more than 24.
I have followed the samples but none seem to work in the silverlight vierwer.
Setting the chart title visible and setting the text does work.
I can debug the code and all the settings are applied but it is as if the report is already rendered or if it is re-rendered after the modifications.
I have tried the code in the NeedDataSource Event but the series (to get the max value) is not available yet.
It is available in the ItemDataBound Event but the .

Am I missing a setting?

Help please....

Code:

chart1.ChartTitle.Visible =

 

true; // works

 

chart1.ChartTitle.TextBlock.Text =

 

"Test setting the value"; // works

 


chart1.PlotArea.YAxis.Clear();

chart1.PlotArea.YAxis.AutoScale =

 

false;

 

chart1.PlotArea.YAxis.AddRange(1, 10000, 10000 / 10);

 

 

for (int ii = 0; ii < chart1.PlotArea.YAxis.Items.Count; ii++)

 

{

chart1.PlotArea.YAxis.SetItemLabel(ii,

 

LabelConverterhelper.ConvertToTimeString((double)chart1.PlotArea.YAxis.Items[ii].Value)); // Does Nothing
// Does not work either

 

 

 

 

//chart1.PlotArea.YAxis[ii].TextBlock.Text = ChartLabelConverter.ConvertToTimeString((double)chart1.PlotArea.YAxis.Items[ii].Value);

 

 

 

 

}

Kobus
Top achievements
Rank 1
 answered on 29 Jul 2010
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?