Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Unlocking Crystal Reports - vb6

Unlocking Crystal Reports - vb6

Scheduled Pinned Locked Moved Visual Basic
helpquestiontools
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    steff kamush
    wrote on last edited by
    #1

    I run multiple instances of a vb6 app from desktop PCs. The apps run crystal reports (v8). The .rpt files are on a shared folder. Problem is, if the folder allows 8 connections, running reports 9times leads to a no-access error (see below). It seems setting the report and application objects to nothing does not unlock the report. Users have to unlock it in Admin Tools\Comp Mnagement\Shared Folders\Open Folders. Exiting the app also unlocks the reports. How can I unlock a report after using it in code? Error occurs at line Dim crystalreport As New Report Dim crystalApplication As New Application .. Set crystalreport = crystalApplication.OpenReport(strReportPathName) The error is: 'Error in File UNKNOWN.RPT: Access to report file denied. Another program may be using it' :rose::rose: 1fm1fu

    D J 2 Replies Last reply
    0
    • S steff kamush

      I run multiple instances of a vb6 app from desktop PCs. The apps run crystal reports (v8). The .rpt files are on a shared folder. Problem is, if the folder allows 8 connections, running reports 9times leads to a no-access error (see below). It seems setting the report and application objects to nothing does not unlock the report. Users have to unlock it in Admin Tools\Comp Mnagement\Shared Folders\Open Folders. Exiting the app also unlocks the reports. How can I unlock a report after using it in code? Error occurs at line Dim crystalreport As New Report Dim crystalApplication As New Application .. Set crystalreport = crystalApplication.OpenReport(strReportPathName) The error is: 'Error in File UNKNOWN.RPT: Access to report file denied. Another program may be using it' :rose::rose: 1fm1fu

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      It would appear that the underlying file handles to open and read the report in the OpenReport method are not being released when you drop the objects out of scope. I can't remember the old version of Crystal Reports objects, but is there a Close method to go along with the OpenReport method on the Application object? You might want to try that and if it doesn't exist, try visiting BuisnessObjects.com and see if there is an update to the Crystal Reports package your using. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      1 Reply Last reply
      0
      • S steff kamush

        I run multiple instances of a vb6 app from desktop PCs. The apps run crystal reports (v8). The .rpt files are on a shared folder. Problem is, if the folder allows 8 connections, running reports 9times leads to a no-access error (see below). It seems setting the report and application objects to nothing does not unlock the report. Users have to unlock it in Admin Tools\Comp Mnagement\Shared Folders\Open Folders. Exiting the app also unlocks the reports. How can I unlock a report after using it in code? Error occurs at line Dim crystalreport As New Report Dim crystalApplication As New Application .. Set crystalreport = crystalApplication.OpenReport(strReportPathName) The error is: 'Error in File UNKNOWN.RPT: Access to report file denied. Another program may be using it' :rose::rose: 1fm1fu

        J Offline
        J Offline
        Jim Matthews
        wrote on last edited by
        #3

        also, to add to what dave mentioned... i don't recall if it existed in the older crystal libraries, but i know that it does in cr.net & cr 9. when you open your report you have the option of how you wish to open that report: OpenReportByDefault or OpenReportByTempCopy Open report by temp copy actually makes a temporary copy in the same folder as the original report template. then uses this temporary copy rather than the original allowing it to be accessed by other processes... which will hopefully also open by temp copy. again, not sure if it will be available to you from the com version of the libraries, but if not you can always check out the possibility of creating a com wrapper of the crystal .net assemblies if you think this option is worth checking out. hope this helps.


        -jim

        S 1 Reply Last reply
        0
        • J Jim Matthews

          also, to add to what dave mentioned... i don't recall if it existed in the older crystal libraries, but i know that it does in cr.net & cr 9. when you open your report you have the option of how you wish to open that report: OpenReportByDefault or OpenReportByTempCopy Open report by temp copy actually makes a temporary copy in the same folder as the original report template. then uses this temporary copy rather than the original allowing it to be accessed by other processes... which will hopefully also open by temp copy. again, not sure if it will be available to you from the com version of the libraries, but if not you can always check out the possibility of creating a com wrapper of the crystal .net assemblies if you think this option is worth checking out. hope this helps.


          -jim

          S Offline
          S Offline
          steff kamush
          wrote on last edited by
          #4

          Thanx Dave n jmatthew. Appears if i pass the OpenMethod optional parameter a 1 in OpenReport method i can open multiple instances. There is no close method for the Crystal Application class though. I'll do with the workaround for now... :rose::rose: 1fm1fu

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups