Telerik Forums
Reporting Forum
1 answer
364 views
Hello,

 I am not able to properly bind a DataTable to a report viewer that is embedded within a Sharepoint 2010 WebPart. (using Telerk.Reporting.dll version 6.1.12.820). I have bound the same data to a generic asp gridview without error.

I have followed the deployment/configuration steps for getting the report viewer to work properly within shareopint -- and it is appearing (just the underlying data is not that I'm binding is not).

I have also followed the instructions on how to bind a dataTable to a report viewer with no success.

http://www.telerik.com/help/reporting/object-data-source-how-to-bind-to-data-table.html

I have copied the code directly from this link (replacing the GetData() method with my own to create a simply 3 column, 1000 row table).

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ExportListUserControl.ascx.cs" Inherits="CADLibraryWebPart.ExportList.ExportListUserControl" %>

<%@ Register Assembly="Telerik.Web.UI, Version=2012.2.815.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"

Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<%@ Register Assembly="Telerik.ReportViewer.WebForms, Version=6.1.12.820, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"

Namespace="Telerik.ReportViewer.WebForms" TagPrefix="telerik" %>

<div style="height: 500px;">

<telerik:ReportViewer ID="ReportViewer1" runat="server" style="border:1px solid #ccc;" width="99%" height="99%"></telerik:ReportViewer>

</div>

private DataTable createData()

{

DataSet ds = new DataSet();
ds.Tables.Add();

DataTable table = ds.Tables[0];

int columnCount = 3;

int rowCount = 1000;

//Add columns

for (int column = 0; column <= columnCount - 1; column++)

{

table.Columns.Add("Column" + (column + 1).ToString(), typeof(string));

}

//Add rows

for (int row = 0; row <= (rowCount - 1); row++)

{

string[] rowVals = (string[])Array.CreateInstance(typeof(string), columnCount);

DataRowCollection rowCollection = table.Rows;

for (int column = 0; column <= columnCount - 1; column++)

{

rowVals[column] = "value_" + (column + 1).ToString() + "_" + (row + 1).ToString();

}

table.Rows.Add(rowVals);

}

return ds.Tables[0];

}

private void BindTelerikReport()

{

// Creating and configuring the ObjectDataSource component:

var objectDataSource = new Telerik.Reporting.ObjectDataSource();

objectDataSource.DataSource = createData(); // GetData(); // GetData returns a DataSet with three tables

// Creating a new report

Telerik.Reporting.Report report = new Telerik.Reporting.Report();

// Assigning the ObjectDataSource component to the DataSource property of the report.

report.DataSource = objectDataSource;

// Use the InstanceReportSource to pass the report to the viewer for displaying

Telerik.Reporting.InstanceReportSource reportSource = new Telerik.Reporting.InstanceReportSource();

reportSource.ReportDocument = report;

// Assigning the report to the report viewer.

ReportViewer1.ReportSource = reportSource;

}

protected void Page_Load(object sender, EventArgs e)

{

if (!Page.IsPostBack)

{

BindTelerikReport();

}

}

I would appreciate any help with this. Thanks you!


Steve
Telerik team
 answered on 04 Sep 2012
6 answers
454 views

Hello Telerik Team,

I am presently converting my crystal reports to telerik reports.But previously crystal reports datasource was sql stored procedures and select statements but now
I am planning to have a datasource as sharepoint list.Is there any sample on how we can do that.
I appreciate your help.

Look forward from you.

Thank you
Smith

Steve
Telerik team
 answered on 04 Sep 2012
1 answer
97 views
I am trying to upgrade to Q2 2012 but am getting some obsolete syntax errors (Warning 32 'Public Shared Widening Operator CType(report As Telerik.Reporting.Report) As Telerik.Reporting.ReportSource' is obsolete: 'The implicit Report to ReportSource conversion is obsolete. Please create InstanceReportSource instead.')
.
How do i correct this to use the create InstanceReportSource?

Me
.ProidersSubReport.ReportSource = Me.ReportFamiliesDetailProviderSub1
Steve
Telerik team
 answered on 04 Sep 2012
1 answer
154 views
I tried installing the latest report msi (also tried via the control panel) on Win8 and VS2012 pro. Both failed, the control panel said that .net 2 was needed. Any eta for when this will be ready for vs2012?

Robert
Steve
Telerik team
 answered on 04 Sep 2012
2 answers
157 views
I have created telerik report  and it repeats same chart  in 7 times.

Here for x axis,I have 7 diffrent values.Do you have any idea to solve this?
Gunasekar
Top achievements
Rank 1
 answered on 04 Sep 2012
1 answer
200 views
I've looked around on the docs and threads, but I can't seem to figure out the best way to get data from a WCF webservice with parameters.  Of note, I'm using silverlight and can't bind my data to the report.

I create a Objectdatasource and it maps my return object ok when I add a service reference.  But I don't see how to add parameters to my  WCF webservice?

The examples I've seen only show web services with no parameters.

Do I need to do a binding for the datasource and then call my webservice in that?
        public static ObjectDataSource ChangeConnectionString(object reportItem)
        {
            var report = (reportItem as Telerik.Reporting.Processing.Report);
            var dataSource = (Telerik.Reporting.ObjectDataSource)report.DataSource;
MyService.MyClient client = ...
client.GetMyData(str1,str1);
//How do I bind it to my datasource?
return datasource;???


Or do I add parameters like this:
objectDataSource.Parameters.Add(new Telerik.Reporting.ObjectDataSourceParameter("productModelID", typeof(int), 23));

Are the parameters in quotes supposed to match the parmeters of the webservice?
Elian
Telerik team
 answered on 03 Sep 2012
3 answers
112 views
Let's say I have a report that contains a table, and a bar chart and a pie chart. Is it possible for me to render each item separately?

The reason I'm asking is so that a user can choose which tables and charts to include in a report.

Thanks

PS: This is for ASP.NET
IvanY
Telerik team
 answered on 03 Sep 2012
1 answer
161 views
I have created a report that gets processed at run time (there's almost nothing in the designer).
We allow our users to configure how data is grouped in the report (fieldText is the name of a column in the DataTable the report is bound to).
The trouble is, I get separate groups for "Washington" and "washington".
Is there a way to have that Grouping be case insensitive?
Thank you.


Here is the code:
string expr = string.Format("Fields.{0}", fieldText);
 
myGroup.Groupings.AddRange(new Telerik.Reporting.Grouping[]
{
    new Telerik.Reporting.Grouping(expr))
});
Elian
Telerik team
 answered on 03 Sep 2012
3 answers
167 views
I created the report using Telerik reporting and Object Data Source. The report is shown on Web using Telerik Report Viewer. It works fine from Visual Studio in IE. After deployment it works in Google Chrome, but does not work in IE 9 (version 9.0.8112). The Report Viewer shows error : Report is unavailable or session has expired
The cookies are enabled and the security level is low.

Lily Polenov


 


Steve
Telerik team
 answered on 03 Sep 2012
1 answer
166 views
Hi,

I am dynamically builting a query in sql server based on the parameters from the main report and running the subreport for every item in the same groups resulting in Subreport not showing data.
But when i run the subreport seperatly with the same set of parameters but for single item in a group i get data.

I am thinking that it might be due to timeout in the report.I have change the command timout but still sub report does not return any data for 2 grouping scenarion but rest of the two sub report generates data.

Can you please help me or assit me how to fix this issue.
Chavdar
Telerik team
 answered on 03 Sep 2012
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?