WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Samples from Users

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Crystal Reports Print Extender

 Keywords:  

Question:

I have been trying to use Roboscripter to automate the running or a crystal report and extporting the output the html pages. As part of this process I have to select the export options to use. One of the export options is to select the directory to load the html pages to. My script failes at the cSetEditText(ControlHandle,`ActCensus`) line of code. Any suggestions?
;RoboScripter
; Made with 
; RoboScripter ver: 30
; CtlMgr ver: 20034
AddExtender("wwctl44i.dll")

;Launch Program
Run("C:\Data\Report\actcensusaddress.exe","")

;Title: ActCensusAddress.rpt
;ID: 0
;Class: CRW_RUNEXE
;Level: 1
ControlHandle=cWndByWndSpec("CRW_RUNEXE","crrun32",13,401,402,403,404,405,406,407,408,409,452,411,412,410)
cSetFocus(ControlHandle) ; Activates Window


;Title: 
;ID: 401
;Class: ComboBox
;Level: 2
window1=cWndByWndSpec("CRW_RUNEXE","crrun32",13,401,402,403,404,405,406,407,408,409,452,411,412,410)
ControlHandle=cWndByID(window1,401)
cSetCBItem(ControlHandle,2) ;Set ComboBox item


;Title: Export &Options...
;ID: 452
;Class: Button0
;Level: 2
window1=cWndByWndSpec("CRW_RUNEXE","crrun32",13,401,402,403,404,405,406,407,408,409,452,411,412,410)
ControlHandle=cWndByID(window1,452)
cPostButton(ControlHandle) ;Alternate to cClickButton


;Title: Export
;ID: 0
;Class: #32770
;Level: 1
ControlHandle=cWndByWndSpec("#32770","crrun32",7,1,2,57670,65535,16401,65535,16934)
cSetFocus(ControlHandle) ; Activates Window


;Title: 
;ID: 16401
;Class: ComboBox
;Level: 2
window1=cWndByWndSpec("#32770","crrun32",7,1,2,57670,65535,16401,65535,16934)
ControlHandle=cWndByID(window1,16401)
cSetCBItem(ControlHandle,13) ;Set ComboBox item


;Title: OK
;ID: 1
;Class: Button0
;Level: 2
window1=cWndByWndSpec("#32770","crrun32",7,1,2,57670,65535,16401,65535,16934)
ControlHandle=cWndByID(window1,1)
cClickButton(ControlHandle)


;Title: OK
;ID: 1
;Class: Button1
;Level: 2
window1=cWndByWndSpec("#32770","crrun32",7,1,2,57670,65535,16401,65535,16934)
ControlHandle=cWndByID(window1,1)
cClickButton(ControlHandle)


;Title: Export to Directory
;ID: 0
;Class: #32770
;Level: 1
ControlHandle=cWndByWndSpec("#32770","crrun32",13,1039,1121,1091,1120,65535,1088,1089,1136,1137,1090,1152,65535,65535)
cSetFocus(ControlHandle) ; Activates Window


;Title: 
;ID: 1039
;Class: Edit
;Level: 2
window1=cWndByWndSpec("#32770","crrun32",13,1039,1121,1091,1120,65535,1088,1089,1136,1137,1090,1152,65535,65535)
ControlHandle=cWndByID(window1,1039)
result=cGetEditText(ControlHandle)
Message("EditBox Contents",result) ; TODO - Remove message. Add code.


;Title: 
;ID: 1039
;Class: Edit
;Level: 2
window1=cWndByWndSpec("#32770","crrun32",13,1039,1121,1091,1120,65535,1088,1089,1136,1137,1090,1152,65535,65535)
ControlHandle=cWndByID(window1,1039)
cSetEditText(ControlHandle,`ActCensus`)


;Title: OK
;ID: 1
;Class: Button0
;Level: 2
window1=cWndByWndSpec("#32770","crrun32",13,1039,1121,1091,1120,65535,1088,1089,1136,1137,1090,1152,65535,65535)
ControlHandle=cWndByID(window1,1)
cClickButton(ControlHandle)


;Title: ActCensusAddress.rpt
;ID: 0
;Class: CRW_RUNEXE
;Level: 1
ControlHandle=cWndByWndSpec("CRW_RUNEXE","crrun32",13,401,402,403,404,405,406,407,408,409,452,411,412,410)
cSetFocus(ControlHandle) ; Activates Window


;Title: &Print
;ID: 451
;Class: Button0
;Level: 2
window1=cWndByWndSpec("CRW_RUNEXE","crrun32",13,401,402,403,404,405,406,407,408,409,452,411,412,410)
ControlHandle=cWndByID(window1,451)
cClickButton(ControlHandle)


;Title: Record Selection
;ID: 0
;Class: #32770
;Level: 1
ControlHandle=cWndByWndSpec("#32770","crrun32",5,601,1,2,652,651)
cSetFocus(ControlHandle) ; Activates Window


;Title: OK
;ID: 1
;Class: Button0
;Level: 2
window1=cWndByWndSpec("#32770","crrun32",5,601,1,2,652,651)
ControlHandle=cWndByID(window1,1)
cClickButton(ControlHandle)


;Title: OK
;ID: 1
;Class: Button1
;Level: 2
window1=cWndByWndSpec("#32770","crrun32",5,601,1,2,652,651)
ControlHandle=cWndByID(window1,1)
cClickButton(ControlHandle)


;Title: &Done
;ID: 2
;Class: Button0
;Level: 2
window1=cWndByWndSpec("CRW_RUNEXE","crrun32",13,401,402,403,404,405,406,407,408,409,452,411,412,410)
ControlHandle=cWndByID(window1,2)
cClickButton(ControlHandle)

Answer:

Here is a Crystal Reports Printing Extender DLL written by a third party: https://techsupt.winbatch.com/techsupt/CRPrintPackage.ZIP
Article ID:   W16651
File Created: 2019:08:14:09:27:30
Last Updated: 2019:08:14:09:27:30