Mahesh Yadav
asked on
Report Control Toolbar during runtime
Hi
I'm having following code to display report designer during runtime.
But report control toolbar is go behind of the desktop form
I tried DOCK WINDOW "Report Controls" POSITION 0
but no luck so far.
How resolve this issue.
thanks
I'm having following code to display report designer during runtime.
But report control toolbar is go behind of the desktop form
I tried DOCK WINDOW "Report Controls" POSITION 0
but no luck so far.
How resolve this issue.
thanks
PROCEDURE RptDesignMode(tcReportFileName)
LOCAL loform as Form
loform=CREATEOBJECT("RptDesginForm")
WAIT CLEAR
WITH loform as Form
.Show()
MODIFY REPORT (tcReportFileName) IN WINDOW (loForm.Name)
.Release
ENDWITH
ENDPROC
DEFINE CLASS RptDesginForm as Form
Desktop=.t.
Width=SYSMETRIC(1)
Height=sysmetric(2)
ENDDEFINE
And this code should work a little bit better...
PROCEDURE RptDesignMode(tcReportFileName)
LOCAL loform as Form
loform=CREATEOBJECT("RptDesginForm")
WAIT CLEAR
WITH loform as Form
.Show()
IF WEXIST("Report Controls")
IF WVISIBLE("Report Controls")
HIDE WINDOW "Report Controls"
ENDIF
SHOW WINDOW "Report Controls" IN WINDOW (loForm.Name)
ENDIF
MODIFY REPORT (tcReportFileName) IN WINDOW (loForm.Name)
IF WEXIST("Report Controls")
SHOW WINDOW "Report Controls" IN SCREEN
ENDIF
.Release
ENDWITH
IF WEXIST("Report Controls")
HIDE WINDOW "Report Controls"
ENDIF
ENDPROC
DEFINE CLASS RptDesginForm as Form
Desktop=.t.
Width=SYSMETRIC(1)
Height=sysmetric(2)
ENDDEFINE
ASKER
Nope, it is not working , report control window is not exist
and as a result it does not satisfy WEXIST("Report Controls") to true.
That window is only active when Modify report command in used
I dont know how to solve .
and as a result it does not satisfy WEXIST("Report Controls") to true.
That window is only active when Modify report command in used
I dont know how to solve .
Yes, my code works fine in VFP IDE but you probably need Run-time functionality... which is not so easy.
Do you need to display the Report designer in a separate window? Why don't you accept VFP screen which allows to display the Toolbar?
Do you need to display the Report designer in a separate window? Why don't you accept VFP screen which allows to display the Toolbar?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Excellent pcelba.
many thanks
many thanks
Just a note: there are two MODIFY REPORT commands by mistake:
MODIFY REPORT (tcReportFileName) IN WINDOW (loForm.Name) NOWAIT
MODIFY REPORT (tcReportFileName) IN WINDOW (loForm.Name)
You may remove the first one.
MODIFY REPORT (tcReportFileName) IN WINDOW (loForm.Name) NOWAIT
MODIFY REPORT (tcReportFileName) IN WINDOW (loForm.Name)
You may remove the first one.
Open in new window