17388.html

来自「VB技巧问答10000例 VB技巧问答10000例」· HTML 代码 · 共 23 行

HTML
23
字号
<html>  <head>    <title>Re: try going here to find the answer....</title>  </head>  <body bgcolor="#FFFFFF" vlink="#808080">    <center>      <h1>Re: try going here to find the answer....</h1>    </center><hr size=7 width=75%><hr size=7 width=75%><p>Posted by <a href="mailto:otraa@sota.net">Olav Traa</a> on August 17, 1999 at 07:13:21:<p>In Reply to: <a href="17335.html">try going here to find the answer....</a> posted by Scott CJC on August 16, 1999 at 09:27:14:<p>Scott/Olav<p>Thanks very much.  I have been to Seagate's site, (and several others for that matter) the problem I am have is with password protected databases and subreports.  I was able to pass value down sub the subrprts when there was no security issue.  I have, however, found a solution and it looks like this: <br>'***********<br>Private Sub VcLogin(UserName As String, Password As String)<p>Dim iCounter As Integer<p>'with this syntax I can set values for the main report<br>Main.CrystalReport1.SubreportToChange = ""<p>Main.CrystalReport1.UserName = UserName<br>Main.CrystalReport1.Password = Password<br>Main.CrystalReport1.SessionHandle = 0 'default value<br>    <br>For iCounter = 0 To (Main.CrystalReport1.GetNSubreports - 1)<br>    <br>'with this syntax I can set the values for each particular subreport.<br>    Main.CrystalReport1.SubreportToChange = Main.CrystalReport1.GetNthSubreportName(iCounter)<br>    <br>    Main.CrystalReport1.UserName = UserName<br>    Main.CrystalReport1.Password = Password<br>    Main.CrystalReport1.SessionHandle = 0 'default value<p>Next iCounter<br>End Sub<br>'*********<p>It seems to work splendidly. What do you think? <p>Take Care,<br>Olav Traa<br>Montreal<br><br><hr size=7 width=75%><p><a name="followups">Follow Ups:</a><br><ul><!--insert: 17388--></ul><!--end: 17388--><br><hr size=7 width=75%><p></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?