Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Help needed with SHELL Post Reply Post New Topic
Author Message
cmemetal
Newbie
Newbie


Joined: 21 Apr 2007
Online Status: Offline
Posts: 4
Quote cmemetal Replybullet Topic: Help needed with SHELL
    Posted: 29 Apr 2007 at 11:44am
I am trying to do the following from within Crystal during a subroutine:
 
Put a field in a sub routine that executes a DOS command string.
Something like this:
SHELL ("C:\Progra~1\av\avwin\avwin.exe /p" + {drawings.filename})
 
avwin.exe /P is the program Autoview with the Print Switch, and I want it to print the string path to the drawing held in {drawings.filename} which is in UNC path form of //drawings/customerfiles/file.dwg
 
I have just printed the {drawings.filename} field on my report and it is working correctly, but I can't find the proper syntax to run it from within Crystal. I have searched the web and found several examples, but none work in Crystal. I tried VB syntax and still cant get it.
 
I believe that I need to create a formula field to put this code into, and then put the formula into my SubReport?
 
In my closest attempt, I got it to print the whole string on the report, but did not execute it.
 
Help would be appreciated.
 
Regards,
George L. Hicks
 


Edited by cmemetal - 29 Apr 2007 at 11:45am
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 30 Apr 2007 at 11:49am
I've never seen anyone Shell out of Crystal Reports before. I don't think that this functionality is available.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
cmemetal
Newbie
Newbie


Joined: 21 Apr 2007
Online Status: Offline
Posts: 4
Quote cmemetal Replybullet Posted: 30 Apr 2007 at 1:56pm
You can do it in VB like this:

'// this code calls c: est.exe
Shell "c:\test.exe", vbNormalFocus

So I should be able to do something like this in Crystal with VB Syntax?
 
Any thoughts?
 
Regards,
 
George
 
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 30 Apr 2007 at 2:49pm
No. Shell() is a function of the Visual Basic language that is designed by Microsoft. Crystal Reports is by Business Objects and their language is "Basic Syntax" with some similarities. It does not have the Shell function.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.