报告 - 数据集 - 不显示数据(只是列名称) [英] Reports - DataSet - Data are not displayed (just the colum names)

查看:80
本文介绍了报告 - 数据集 - 不显示数据(只是列名称)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。

这是我的第一个问题。我正在尝试生成一个报告,其中数据源是我的应用程序中的DataSet。但是我没有使用CrystalReportViewer(MS ReportViewer)得到我想要(查看)的结果。我创建报告,指定数据源是我的DataSet的
,在我的表(报告内)中放置一些列,但是,当我查看它或运行应用程序并要求可视化报告时,我不知道获取表数据,只获取列(标题)的标题。例如:colum1 - colum2
- colum3 ...没有下面的数据...

This is my first question here. I am trying to generate a report which data source is a DataSet in my application. But I do not get the result I want (to view) with the CrystalReportViewer (neither with the MS ReportViewer). I create the report, specify that the data source is my DataSet, put some colums at my table (inside the report), but, when I view it or run the application and ask to visualize the report, I don't get the table data, just the headers of the colums (names). For example: colum1 - colum2 - colum3... without the data below...

在我的代码中,我从报告中填写了Refresh()和填充(),来自DataAdapter,我们可以看到:

In my code, I put the Refresh(), from Report, and the Fill(), from the DataAdapter, as we can see:

     this.dataTableVendaRealizadaTableAdapter.Fill(this.dataSetVendaRealizada1.DataTableVendaRealizada);

     this.dataTableVendaRealizadaTableAdapter.Fill(this.dataSetVendaRealizada1.DataTableVendaRealizada);

     this.reportViewer2.RefreshReport();

     this.reportViewer2.RefreshReport();

有人知道为什么没有显示数据吗? (DataSet中的查询是正确的!)



提前付款。



[] s



Does someone know why the data are not being displayed? (the query in the DataSet is right!)

Thanks in advance.

[ ]s

推荐答案

您还需要添加以下行:

You need to add this line also:

 

YourReportObject。 SetDataSource(ds);

YourReportObject.SetDataSource(ds);

 

Don


这篇关于报告 - 数据集 - 不显示数据(只是列名称)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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