每次在其他计算机上加载时,Crystal报告要求输入管理员密码 [英] Crystal report asking for admin password every time load on other machine

查看:79
本文介绍了每次在其他计算机上加载时,Crystal报告要求输入管理员密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为钢铁贸易公司开发了一个软件.我必须给他们提供如此多的水晶报告.我的后端是MS ACCESS2003.
问题是每次我加载到他的计算机时,我的一个Crystal报告中都会要求输入管理员密码,而其他报告却显示得很顺利.即使每个Crystal报告中都有相同的代码,这种情况也在发生.Plz尽快给我解决方案.从这个问题...

I have developed one software for Iron trading company.I have to give them so many crystal reports.My back end is MS ACCESS 2003.
The problem is that in one of my crystal reports asks for admin password every time i load at his computer while other report is showing smoothly.This is happening even there is same code in every crystal report.Plz give me solution ASAP.I m frustrated from this problem...

Private Sub itemrpt_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Try
            cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\ispat.mdb;Persist Security Info=True;Jet OLEDB:Database Password=admin"
            cn.Open()
            Dim da As New OleDbDataAdapter("select  distinct item_name from m_item", cn)
            Dim ds As New DataSet
            da.Fill(ds)
            Dim i As Integer = 0
            For i = 0 To ds.Tables(0).Rows.Count - 1
                cmbitem.Items.Add(ds.Tables(0).Rows(i).Item(0).ToString)
            Next
            ''cmbID.SelectedIndex = 0

            cmbitem.Text = a

            cn.Close()
        Catch ex As Exception
            MsgBox("E-itemRpeort Load")
        Finally

        End Try
    End Sub





Try
            Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\ispat.mdb;Persist Security Info=True;Jet OLEDB:Database Password=admin")
            cn.Open()


            Dim query As String = "Select * from t_purchase Where su_name=''" & cmbsup.Text & "'' and truck_no=''" & cmbtruck.Text & "''and pu_id in(select pu_id from m_item where item_name=''" & txtitem.Text & "''and sub_item=''" & txtsubitem.Text & "'')"
            Dim da As New OleDbDataAdapter(query, cn)
            Dim ds As New DataSet
            da.Fill(ds, "t_purchase")

            Dim query1 As String = "Select * from t_sale"
            Dim da1 As New OleDbDataAdapter(query1, cn)
            da1.Fill(ds, "t_sale")

            Dim query2 As String = "Select * from m_item Where item_name=''" & cmbitem.Text & "'' and sub_item=''" & cmbsubitem.Text & "''"
            Dim da2 As New OleDbDataAdapter(query2, cn)
            da2.Fill(ds, "m_item")

            doc.Load(Application.StartupPath & "\item_rpt.rpt")
            doc.SetDataSource(ds)
            CrystalReportViewer1.ReportSource = doc
            doc.Refresh()
            cn.Close()
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try

    End Sub


提前thnx....


thnx in advance....

推荐答案

您是否在该特定报告中使用了多个表?
如果是,则不要使用多个表....只需为这些表创建一个视图...
希望这对您有帮助.
are you using multiple tables in that particular report??
if yes, then don''t use multiple tables....just create a view for those tables...
hope this will help u..


这实际上是一个常见问题. [ ^ ]

此处 [
This is actually a common issue.[^]

Here[^] is what I suggested to someone else who had a similar problem.


@ Kschuler:我也尝试过通过创建数据视图... bt d同样的问题仍然存在于我的客户端.如果您对编码有任何建议,请放了改进的代码.这样我就可以摆脱这种挫败感.
@ Kschuler:I have tried that also by creating data view...bt d same problem is continue with my client.Plz frns if u ve any suggestions with coding then put improved code.so that i can come up from this frustration.


这篇关于每次在其他计算机上加载时,Crystal报告要求输入管理员密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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