如何从表中选择行以在报表中显示 [英] How to select rows from a table for display in report

查看:94
本文介绍了如何从表中选择行以在报表中显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在asp.net的报表查看器中很差。在下面的代码中,显示了包含数据的3列。

显示表中可用的所有行。我的表名是'product'。列名称为ProductId,ProductName,Rate。如果我想显示具有ProductId = 5的特定行,该怎么做?



I am poor in report viewer of asp.net. In the following code 3 columns with data is displayed.
All the rows that is available in the table is displayed. My table name is 'product'. the columns names are ProductId,ProductName,Rate. If I want to display that particular row which has the ProductId=5, how to do it?

<form id="form1" runat="server">
<div>
    <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana"

        Font-Size="8pt" Height="400px" Width="400px">
        <LocalReport ReportPath="Report1.rdlc">
            <DataSources>
                <rsweb:ReportDataSource DataSourceId="ObjectDataSource1"

                    Name="prasiddhiDataSet_product" />
            </DataSources>
        </LocalReport>
    </rsweb:ReportViewer>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"

        SelectMethod="GetData"

        TypeName="prasiddhiDataSetTableAdapters.productTableAdapter">
    </asp:ObjectDataSource>
</div>
</form>

推荐答案

看看这里:添加和配置ReportViewer控件 [ ^ ]


这篇关于如何从表中选择行以在报表中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆