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

using Stored procedure in telerik reporting

3 Answers 182 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Zahra Mottaghi-Far
Top achievements
Rank 1
Zahra Mottaghi-Far asked on 10 Sep 2009, 09:09 PM
hi,
when i use stored procedure, i am not able to use the Wizard so i have to add the reports column one by one manually by adding
the textboxes.
is there an easy way to use the stored procedure.
is there anyway to use wizard for creating the report and using the stored procedure?

Thanks

3 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 11 Sep 2009, 07:22 AM
Hello Zahra,

Telerik Reporting does not provide its own data layer but depends on the existing .NET objects (DataSet, Data Table, DataView, ADO.NET, lists - for more information on report data binding, please, refer to this help topic). Because of that, the Telerik Reporting Data Source Wizard cannot be used to connect to parameterized data source such as stored procedure or a Select command with parameters out of the box.
 
What can be done is to manually execute it, feed the returned result set in a DataSet and then pass this DataSet to the Telerik Reporting DataSource. Another approach using our report parameters and NeedDataSource event is shown in this KB article.

For more information how to use ADO.NET to call a parameterized stored procedure, please refer to this KB article.

Kind regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Zahra Mottaghi-Far
Top achievements
Rank 1
answered on 11 Sep 2009, 05:55 PM
Thanks Steve for your reply.
i have another question.
when i use a report viewer to display my telerik report, the height of the report is not %100 of the page.
here is my code.
do you know how i can increase the height of the report section  to full page?

Thanks
Zahra


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.cs" Inherits="Forms_test" EnableSessionState="True" %>

<%@ Register assembly="Telerik.ReportViewer.WebForms, Version=3.1.9.807, 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 runat="server">
    <title>Untitled Page</title>

   <style type="text/css">   
form#form1, div#content
  {
   height: 100%;
  }
  </style>
</head>
<body >
    <form id="form1" runat="server" >
    <div style="height: 100%;">

    <telerik:ReportViewer ID="test" runat="server"
        Height="100%" Width="100%" ZoomMode="PageWidth" Skin="">
    </telerik:ReportViewer>
     </div>
    </form>
</body>
</html>


0
Zahra Mottaghi-Far
Top achievements
Rank 1
answered on 11 Sep 2009, 06:11 PM
hi Steve,
i figured out how to solve it.
i had to remove this line of code from my aspx page.
i guess that is not necessary to specify which version of Xhtml i am using. right?

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

Tags
General Discussions
Asked by
Zahra Mottaghi-Far
Top achievements
Rank 1
Answers by
Steve
Telerik team
Zahra Mottaghi-Far
Top achievements
Rank 1
Share this question
or