在报表查看器中显示已添加的列c# [英] Display Added Columns at Report Viewer c#

查看:75
本文介绍了在报表查看器中显示已添加的列c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,这是我第一次参加这里,我一直在这个网站上阅读,我真的给你留下了深刻印象的人,开发者你是有史以来最聪明的生物,

我是民用的工程师,不过我是语言编程粉丝俱乐部之一

但我真的遇到了问题,我用c#和sql数据库创建一个windows表单应用程序

at the运行时,我能够在datagridveiw中添加/删除列,并获得更新,以便当我重新打开应用程序保存数据时,我还能够获得由向导静态设计的报表查看器,但是只显示在设计阶段而不是运行时添加的列,

i有一个很大的断裂问题是如何显示数据发生的修改(添加列或删除一个)在报告查看器中的运行时



例如(我设计报告有三列名称,LastN ame,money,并在运行时成功获取报告,然后我在运行时添加一些新列说(年龄,国家)

但是当我试图获取报告时我只有3列(名称,姓氏,金钱)更新的行但不是列



请这是重要的

Hello Everyone , This is my First participation here, I have been reading from this site for while and i am really impressed by you people, Developers You are The Smartest creatures ever,
I am civil Engineer , However i am one of languages programming fans club
but i am really having a problem in this , I create a windows form application using c# and sql database
at the run time, i was able to add/delete columns in the datagridveiw ,and get that updated so that when I reopen the application the data are saved, i also was able to get a report viewer that i design statically by the wizard, however it only shows the column that was added in the design phase not the run time,
i am having a big fractured problem which is How can I display the modifications that occur to the data ( adding column or delete one ) at the run time in the report viewer

For example ( I designed the report to have three columns Name , LastName, money, and get the report successfully at the runtime,then I add some new columns say (Age,Country)
at the run time but when I tried to get the report I only got 3 columns (Name, LastName,Money) with updated Rows But not column

Please This is SO important

推荐答案

尝试一件简单的事情,在添加Age和Country之后,停止您的应用程序,重新绑定数据源(刷新它,以便它将带来更新的数据列)并尝试运行它。
try one simple thing, After adding Age and Country, stop your application, rebind the data source(refresh it, so that it will bring updated data column) and try to run it.


这篇关于在报表查看器中显示已添加的列c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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