Thanks for the reply, what I want to do is have an .exe file that prints out a Crystal Report with a .RPT extension from within another application, I just want to put the .exe on a toolbar then users can just click it and it prints out the report.
SET oCRApp = Createobject("crystal.crpe.application")
SET oReport = oCRApp.OpenReport("C:\MyPath\MyReport.rpt")
oReport.ParameterFields(0) = 2 'set 1st parm value to 2
oReport.ExportOptions.FormatType = 14 'to Word doc
oReport.ExportOptions.DiskFileName = "C:\MyPath\MyDoc.doc"
oReport.ExportOptions.DestinationType = 1
oRep.Export False 'True to see dialog
SET oReport = Nothing
SET oCRApp = Nothing
this is from an earlier post, it exposes the crystal report app object and you can do 'stuff' with it, there must be a
oReport.Print or something of that nature
if not then as i said if there is a crystalreport.exe like you would find with winword.exe then you might be able to do something like
crystalreport.exe "c:\report.rpt" /print
you are in a vbscript forum, save the code in notepad and save it as report.vbs, double click on this report.vbs and see if it does what you want.
you might want to consider something like
SET oCRApp = Createobject("crystal.crpe.application")
SET oReport = oCRApp.OpenReport("C:\MyPath\MyReport.rpt")
oReport.PrintOut()
'if that doesn work then try exporting it to a word doc 'and print it out that way, shouldnt be needed though
if you really need an exe, which i dont think you actually do, a shortcut pointing to the vbscirpt file will be enough, anyway if you want an exe then install .net or visual studio or SMS installer or whatever dev enviroment floats your boat and complile the code into an exe, but as i say the vbscirpt should do you. and getting back to my first post that if the crystalreportss.exe
saying that i might be the thickest person around and all your users dont have crystal reports installed on their machines, who knows if they ahve the dll the vbscript needs to point to, blaa blaa blla
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.