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

pass table name by parameter

1 Answer 67 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
no
Top achievements
Rank 1
no asked on 04 Jul 2014, 03:48 PM

Is possible pass as parameter the table name in clause FROM? (simple example)

file *.cshtml
@section head
{  
   var report = new XmlReportSource() { Uri = "Report.trdx" };
   report.Parameters.Add(new Telerik.Reporting.Parameter("tmp", TempData["temp_table"]));
}

file *.trdx
 <SqlDataSource ConnectionString="AHEConnectionString" SelectCommand="SELECT * FROM @tmp " Name="sqlDS_info">
      <Parameters>
        <SqlDataSourceParameter DbType="String" Name="@tmp ">
          <Value>
            <String>=Parameters.tmp.Value</String>
          </Value>
        </SqlDataSourceParameter>
      </Parameters>
</SqlDataSource>

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 07 Jul 2014, 10:47 AM
Hello,

Please check the following forum discussion regarding Table valued parameters and the reporting SqlDataSource component: passing Table Valued Parameters toTelerik Report.

I hope this information helps you.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
no
Top achievements
Rank 1
Answers by
Stef
Telerik team
Share this question
or