Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Runtime file requirements

Runtime file requirements

Runtime file requirements

Hello all,

I have integrated two RDC reports (both with sub-reports)
into a VB6 application.  I am using the OLEDB Driver for SQL Server using SQL Server authentication as I am working on a windws 98 network.  Both reports were built against the database they are currently being executed against, hoever I would like to set the logon ifo at run time

The code to set the parameters and logon info for the report looks like the following (gobjsession is just an object that holds connection parameters)

Dim objTimeSheetReport As New dsrTimeSheetReport 'main rpt
Dim objSubReport As CRAXDRT.Report

With gObjSession
objTimeSheetReport.ParameterFields(1).AddCurrentValue FromRosterDate
objTimeSheetReport.ParameterFields(2).AddCurrentValue ToRosterDate
For i = 1 To objTimeSheetReport.Database.Tables.Count
objTimeSheetReport.Database.Tables(i).SetLogOnInfo .Server, .Database, .UserID, .Password
objTimeSheetReport.Database.Tables(i).Location = gobjClientUtility.stripOwner(objTimeSheetReport.Database.Tables(i).Location)

Set objSubReport = objTimeSheetReport.OpenSubreport("TimeSheet")
For i = 1 To objSubReport.Database.Tables.Count
objSubReport.Database.Tables(i).SetLogOnInfo .Server, .Database, .UserID, .Password
objSubReport.Database.Tables(i).Location = gobjClientUtility.stripOwner(objSubReport.Database.Tables(i).Location)
End With

CRViewer.ReportSource = objTimeSheetReport

This code works perfectly in both in the IDE and as a compiled application on the machine where crystal reports is installed in its full version.  The problem is that every machine I install the application on (built with the visual studio packager) I get the dreaded "not yet logged on server" message whenever a report is run.  All destination machines are also running windows 98. and all have MDAC service pack 2.61

The VB6 deployment wizard packages the following DLLS by default:


What am I missing?  If I can't get this thing to install I'm just going to install the whole Crystal reports on everones machine as my "free runtime license"

Appreciate any feedback

RE: Runtime file requirements

Alright I'll answer my own post.

The package and deployment wizard did not pick up p2soledb.dll or p2sodbc.dll which both belong in the system directory.

Everythings cool now.

J Shaw Consulting

RE: Runtime file requirements

I don't know if this will answer your question or help you, but in the past I've used an actual login.frm that captures the login information for each user in global variables that are declared in a file I created called global.bas module.
I then use these global variables as follows:

Public Sub AddDatabase()
'Variables used to setup the Database connection
    Dim crDBTables As CRAXDRT.DatabaseTables
    Dim sTableName As String
    Dim iTableType As Integer
    Dim sDLLName As String
    Dim sServerName As String
    Dim sDatabaseName As String
    Dim sUserName As String
    Dim sPassword As String
'Get the TABLES collection because it has the ADD() method needed to add a conection the report
    Set crDBTables = crReport.Database.Tables
'Set the values for the connection variables

'The database Stored Procedures
    sTableName = "STES_GetDailyFundDetails"

'The database table type. Set this to 2 for all stored procedures
    iTableType = 2
'The database DLL name (Crystal Native MSSQL Driver)
    sDLLName = "p2ssql.dll"
'The physical server name
    sServerName = strServer
'The database name
    sDatabaseName = strDatabase
'The user ID
    sUserName = strUserName
'The password
    sPassword = strPassword
'Use the .Add() method to add the Stored Procedure to the report.
'There are several optional arguments for the Add method.  which
'arguments are passed will depend on the type of database, the type
'of the table and the type of connection.

    crDBTables.Add sTableName, , , iTableType, sDLLName, sServerName, , sDatabaseName, sUserName, sPassword

End Sub

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close