Sage 100

 View Only
  • 1.  Am trying to automate exporting of a Crystal Repor

    Posted 01-24-2012 09:14
      |   view attached
    Am trying to automate exporting of a Crystal Report to csv. Found a sample script on SSO, but keep getting the attached error. The line it errs on is Set App = CreateObject (""CrystalRuntime.Application"") . I have Crystal 11 installed on the PC. Some time ago, @AlnoorCassim kindly posted some sample scripts to accomplish this task. Tried his and am getting same error on same line. Can anyone shed light on a resolution? http://community.sagemas.com/t5/Personalization-Customization/Crystal-Reports-export-questions/m-p/6675


  • 2.  RE: Am trying to automate exporting of a Crystal Repor

    Posted 01-24-2012 09:25
    Could this be some type of network rights issue?


  • 3.  RE: Am trying to automate exporting of a Crystal Repor

    Posted 01-24-2012 09:28
    I'm testing on my laptop at the moment, so everything is local and I have admin rights.


  • 4.  RE: Am trying to automate exporting of a Crystal Repor

    Posted 01-24-2012 09:32
    That exact error will occur when running from a 64-bit machine - if that's the case here I will advise how to resolve


  • 5.  RE: Am trying to automate exporting of a Crystal Repor

    Posted 01-24-2012 09:37
    @AlnoorCassim Thats it!


  • 6.  RE: Am trying to automate exporting of a Crystal Repor

    Posted 01-24-2012 09:59
      |   view attached
    Okay there are different schools of thought in VB community on how to resolve this but these 2 original ones (as far as I know) are my favorite 1. Place script on My Tasks menu of the MAS Launcher (Business Desktop). In My Tasks tab, rt-click and create the Public or Private folder. Then rt-click and choose New Program and point it to your current .VBS file. Change the desc if needed. That's it. This works because you are running under the context of a 32-bit Launcher in your 64-bit o/s. 2. Wrapper script - Create a 2nd script who's purpose is to strictly run the 32-bit WSH and call your .VBS program. I just did one yesterday (with client info removed and saved as text file here). Note that: a) The regular script (that errs on 64-bit) is called Run32bit_Ready2BCommitted.vbs b) All this does is run your regular script but uses the 32-bit Wscript.exe from the SysWOW64 folder Hope that helps.

    Attachment(s)



  • 7.  RE: Am trying to automate exporting of a Crystal Repor

    Posted 01-24-2012 10:35
    Another option is to run the script using a batch file with the command to use the 32 bit wscript.exe: C:\Windows\SysWOW64\wscript.exe eStylez_MAS_data_export.vbs


  • 8.  RE: Am trying to automate exporting of a Crystal Repor

    Posted 01-24-2012 11:10
    Thanks guys! Got it running with Alnoors sample script and Myron's batch file suggestion.