我的子报表通常会提示您输入数据库密码 [英] my sub-report usually prompt for database password

查看:65
本文介绍了我的子报表通常会提示您输入数据库密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用子报表,其中我需要显示父数据,然后我需要将父数据的一个字段发送给存储过程以进行某些处理,以返回子数据表

我正在使用sql数据源向报表提供数据-我在将参数从父数据源发送到子数据源时遇到很多问题

我找到了解决方案,但我不知道它是否正确-因此我根据罗斯文数据库(sql 2000)的要求附加了一个类似的类似符号,以便任何人都可以尝试下载并帮助我plz

我正在使用CrystalReportSource
然后我将CrystalReportSource1添加到页面并转到CrystalReportSource1的属性

然后报告
然后添加主报表和子报表的数据源
然后添加参数

CrystalReportSource1属性中的所有这些属性

一切正常,但
提示登录后
然后我写密码

然后报表以正确的方式显示数据

那我有什么问题
谁能看一下我的水晶报告
http://www.4shared.com/file/YMPWN_7V/WebSite1.html [ ^ ]
你能帮我调查这个奇怪的问题吗?

考虑到
当我尝试运行没有报告的报告时
子报表,无子数据
没事
没有任何提示

预先感谢您

i m using a sub-report where i need the parent data to be displayed then one field of the parent data i need to send it to a stored procedure for some processing the return a table for the child data

i m using sql datasource to provide the data to the report - i faced a lot of problems to send parameter from parent to child datasources

i found the solution but i dont know if it is correct or no - so i attached a simillar one like what i need depending on northwind database (sql 2000) so that any one can try to downlload and help me plz

i am using CrystalReportSource
then i add CrystalReportSource1 to the page and go to properties of CrystalReportSource1

and then Report
and then add the datasources for the main report and the sub
and then add the parameters

all these properties in the CrystalReportSource1 properties

ALL is going ok but
AFTER prompting for logon
THEN i write the password

THEN the report display data in the right way

SO what am i wrong with this
can anyone take a look on my crystal reports
http://www.4shared.com/file/YMPWN_7V/WebSite1.html[^]
and could u plz help me investigate this strange problem

taking into consideration
that when i try to run a report with no
sub report and no sub data
it goes right
without any prompt

thank u in advance

推荐答案

我认为您尚未将数据库登录信息传递给子报告.

您是否编写了以下代码(如果没有尝试的话).

crpt =报告变量.


对于i As Integer = 0到crpt.Subreports.Count-1
对于crpt.Subreports(i).Database.Tables中的每个MyTable
myLogin = MyTable.LogOnInfo
myLogin.ConnectionInfo.ServerName =服务器
myLogin.ConnectionInfo.DatabaseName =数据库
myLogin.ConnectionInfo.UserID =用户
myLogin.ConnectionInfo.Password =密码
MyTable.ApplyLogOnInfo(myLogin)
下一个
下一个

希望我已经正确理解了您的查询.
I think you have not passing database login information to the sub reports.

have you written the below code, if not try it.

crpt=report variable.


For i As Integer = 0 To crpt.Subreports.Count - 1
For Each MyTable In crpt.Subreports(i).Database.Tables
myLogin = MyTable.LogOnInfo
myLogin.ConnectionInfo.ServerName = Server
myLogin.ConnectionInfo.DatabaseName = Database
myLogin.ConnectionInfo.UserID = user
myLogin.ConnectionInfo.Password = password
MyTable.ApplyLogOnInfo(myLogin)
Next
Next

Hope i have understood your query correctly.


这篇关于我的子报表通常会提示您输入数据库密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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