如何将DataGridView数据传递给Crystal Report [英] How to pass DataGridView Data to Crystal Report

查看:71
本文介绍了如何将DataGridView数据传递给Crystal Report的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 DataGridView ,其中显示了一些选定的数据,具体取决于具有条件的选择查询。



现在我希望 DataGridView Crystal Report 中打印,这是另一种形式。



我该怎么做?



DataGridView 的代码如下。

I have a DataGridView where some selected data is displaying depending on select query with conditions.

Now i want that DataGridView to print in Crystal Report, which is there in another form.

How do i do that?

The code for DataGridView is as follows.

Dim cn As New SqlConnection("Data Source=.\INSTANCE;initial catalog=record;user=sa;password=gariahat")

Dim ds As New DataSet
Dim tb2 As DataTable
Dim cmd As New SqlCommand("select * from fullsort where return_dt is null ", cn)

Dim da As New SqlDataAdapter(cmd)
tb2 = New DataTable
da.Fill(tb2)

FullsortDataGridView.DataSource = tb2

推荐答案

来自bangkok的sudeshna写道:
sudeshna from bangkok wrote:

我得到这个错误

无法加载文件或程序集'file:/// C:\Program Files(x86)\SAP BusinessObjects \ Crystal的.NET报表Framework 4.0 \Common\SAP BusinessObjects Enterprise XI 4.0 \ win64_x64 \ remotenet1 \crdb_adoplus.dll'或其依赖项之一。系统找不到指定的文件。

this error i am getting
Could not load file or assembly 'file:///C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64\dotnet1\crdb_adoplus.dll' or one of its dependencies. The system cannot find the file specified.



如何修复错误无法加载文件或程序集'file:/// C:\Program Files(x86)\SAP BusinessObjects \ Crystal Framework 4.0 for的Crystal Reports Common\SAP BusinessObjects Enterprise XI 4.0 \ win64_x64 \ remotenet1 \crdb_adoplus.dll'或其依赖项之一。系统找不到指定的文件。 [ ^ ]

在运行时加载SAP Crystal Report时发生错误 [ ^ ]


这篇关于如何将DataGridView数据传递给Crystal Report的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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