搜索Crystal Report VB.NET的问题 [英] Search Problem For Crystal Report VB.NET

查看:66
本文介绍了搜索Crystal Report VB.NET的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在One Record中搜索这个写VB.NET代码

I want to search One Record for this write VB.NET Code That "

Dim str As String = ("Data Source=ROBI-PC\SQLEXPRESS;Ini Catalog=benjir;Integrated Security=True")

        Dim con As New SqlConnection(str)

        Dim cmd As New SqlCommand("select * from Table_4 where ID like '%" + Trim(TextBox1.Text) + "%'", con)

        Dim da As New SqlDataAdapter(cmd)

        Dim ds As New DataSet()

        If (da.Fill(ds, "Table_4")) Then

            Dim report As CrystalReport1
            report = New CrystalReport1()
            report.SetDataSource(da)
            CrystalReport1.ReportSource = report
            Form2.ShowDialog()
            MessageBox.Show("")

        Else

            MessageBox.Show("")

        End If





当我运行我的项目然后显示消息参考被重新组装到程序集'水晶Decisions.ReportAppServer.Controllers,Vesion = 13.0.2000.0,Culture = PublicKeyToken = 692fbea5521e1304'包含

类型'CrystalDecision.ReportAppServer.Controllers.ReportSource'Add在您的项目上



请帮我解决问题


"
When I Run My Project Then Show Message " Reference recuired to Assembly 'Crystal Decisions.ReportAppServer.Controllers ,Vesion = 13.0.2000.0,Culture = PublicKeyToken =692fbea5521e1304' Containing the
type 'CrystalDecision.ReportAppServer.Controllers.ReportSource'Add On your Project "

Please Help Me Where Problem

推荐答案

错误信息非常清楚,你需要添加对程序集的引用Crystal Decisions.ReportAppServer .Controllers。这个程序集包含你在项目中使用的一些类。



请参考汇编'& lt; assemblyname& gt;'所需的参考'包含基类'& lt; classname& gt;' [ ^ ]和管理项目中的引用 [ ^ ]



作为旁注,永远不要将值直接从用户界面连接到SQL语句。这使您对SQL注入和转换问题等持开放态度。您应该使用参数。有关详细信息,请访问正确执行数据库操作 [ ^ ]
The error message s quite clear, you need to add reference to assembly "Crystal Decisions.ReportAppServer.Controllers". This assembly contains some of the classes you use in your project.

Please refer to Reference required to assembly '<assemblyname>' containing the base class '<classname>'[^] and Managing references in a project[^]

As a side note, never concatenate values directly from user interface to a SQL statement. This leaves you wide open to SQL injections and conversion problems etc. Instead you should use parameters. For more information please go through Properly executing database operations[^]


这篇关于搜索Crystal Report VB.NET的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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