Results 1 to 11 of 11

Thread: SetLogOnInfo ( Resolved )

Threaded View

  1. #1

    Thread Starter
    Fanatic Member vishalmarya's Avatar
    Join Date
    Feb 2001
    Location
    New Delhi , INDIA
    Posts
    858

    SetLogOnInfo ( Resolved )

    I am using the following function to set the datapath of the tables used in a crystal report at runtime.

    access is being used as the database

    the SetLogOnInfo statement is not working.





    Set rep_application = Nothing
    Set rep_application = New CRAXDRT.Application


    Dim rep As New CRAXDRT.Report

    Set rep = rep_application.OpenReport(App.Path & "\reports\" & RepName, crOpenReportByTempCopy)

    rep.VerifyOnEveryPrint = True


    Dim DataPath As String

    DataPath = "c:\myapp\database\"

    dim password as string

    password="mypassword"


    Dim counter As Integer
    Dim str_DataFile As String

    Dim DataFiles As New CRAXDRT.DatabaseTables

    Set DataFiles = rep.Database.Tables


    For counter = 1 To DataFiles.count

    str_DataFile = returnFileName(DataFiles(counter).Location) '' this returnFileName function returns the filename from the fullpath


    DataFiles(counter).SetLogOnInfo "msaccess", DataPath & str_DataFile, , password

    Next


    SmartViewer.ReportSource = rep

    SmartViewer.ViewReport
    Last edited by vishalmarya; Nov 6th, 2004 at 10:46 AM.
    Vishal Marya, MCP .net 3.5
    My Site
    http://www.vstoolsgallery.com/
    http://visualstudiogallery.msdn.micr...b-f87a909b9266





    Please indicate what version of vb you use.
    Please mark your thread resolved using the Thread Tools above.
    -----------------------------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width