选择要在报告中使用的数据 [英] Selecting data to be use in a report

查看:77
本文介绍了选择要在报告中使用的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了以下代码以使用visual basic打开报告,但我想要做的是选择一系列日期,我想将其用作报告的样本。我尝试了一个选择语句,并尝试将其输入到报告中但得到了数据集错误。



如果有人帮我解决这个问题会很棒!



I wrote the following code to open a report using visual basic, however what I would like to do is select a range of dates in which I want to use as the sample for the report. I tried a select statement and tried feeding that into the report but got a dataset error.

If anyone would help me out that would be great!

Dim reportDataSource As New ReportDataSource
Try
    With Me.ReportViewer1.LocalReport
        .ReportPath = "C:\CallReport.rdlc"
        .DataSources.Clear()
    End With
    Dim ds As New OCTCADataSet
    Dim da As New OCTCADataSetTableAdapters.CallDataTableAdapter
    da.Fill(ds.CallData)

    reportDataSource = New ReportDataSource("DataSet1", ds.Tables("CallData"))
    Me.ReportViewer1.LocalReport.DataSources.Add(reportDataSource)
    Me.ReportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.Normal)
Catch ex As Exception
    MsgBox("Could not compile and open that report.")
End Try

推荐答案

您好b $ b

我建议您查看此链接获取关于报告制作的非常好的信息:



Microsoft Reporting Services(子报告,图表,参数,表达式编辑器等) [ ^ ]

使用智能客户端应用MS Reporting Services 101 [ ^ ]



最好的问候。
Hi
I suggest to you look at this link for getting a really good information about report making:

Microsoft Reporting Services (Sub Reports, Charts, Parameters, Expression Editor, etc.)[^]
Applied MS Reporting Services 101 using Smart Client[^]

Best Regards.


这篇关于选择要在报告中使用的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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