This is a migrated thread and some comments may be shown as answers.

to pass dynamic DataSet C# to Report Telerik

2 Answers 332 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Daniel Botero Correa
Top achievements
Rank 1
Daniel Botero Correa asked on 20 Nov 2009, 11:32 AM

Hello everybody,

I want to pass a dynamic DataSet which has been generated by
an outside code (request) to telerik's report.

Exemple

 
//Library Report DataSet 
 
DataSetReport{ 
column1, 
column2, 
column3, 
column4 
 
 
//OutSideCode 
 
request = "Select * from Telerik"
DataSet dataSetReport = request.Result().DataSet(); 
 
LibraryReportDataset libraryReport = new LibraryReportDataset (); 
 
//To this report, i want to associate my dataSetReport... 
 
libraryReport.AssociateDataSet(dataSetReport); 


and after, the result is going to be a report with the dataSetReport's data...

I searched everywhere but i found nothing...

Can someone help me?

Thanks...
Daniel Botero Correa

2 Answers, 1 is accepted

Sort by
0
Daniel Botero Correa
Top achievements
Rank 1
answered on 20 Nov 2009, 12:18 PM
Hi,
I solved my own question so I did a little code which works, i hope it helps someone:

ProductCatalogDataSet library you can find it in a telerik reporting's examples:

    protected void Page_Load(object sender, EventArgs e) 
    { 
        ProductCatalogDataSet productDataSet = new ProductCatalogDataSet(); 
        DataRow row = productDataSet.Tables[0].NewRow(); 
        row["ProductSubCategory"] = "Hola"
        row["ProductModel"] = "Holaa"
        row["ProductCategory"] = "Holaaa"
        row["ProductName"] = "ProductName"
        row["ProductNumber"] = 0; 
        row["StandardCost"] = 3; 
        row["ListPrice"] = 4; 
        productDataSet.Tables[0].Rows.Add(row); 
        ProductCatalog product = new ProductCatalog(); 
        product.DataSource = productDataSet; 
        ReportViewer1.Report = product; 
    } 


Bye
Daniel Botero Correa
0
Chris @ Intrinsic
Top achievements
Rank 1
answered on 01 Jun 2011, 07:48 PM
Where is that example?  I can't find any telerik code examples (except from 2008 which is not useful at all)  I am assuming that code is in the .aspx.cs file which will load the report into the reportviewer object?

Thanks.
Tags
General Discussions
Asked by
Daniel Botero Correa
Top achievements
Rank 1
Answers by
Daniel Botero Correa
Top achievements
Rank 1
Chris @ Intrinsic
Top achievements
Rank 1
Share this question
or