>Hello,
>
>I am trying to run a Telerik Report from withing my VFP8 /SP1 desktop application. I can get the Report to open; however, I am having difficulty passing the GUID value as a parameter.
>
>This command works to open the report: RUN /n &lcProgram &lcReport Case_ID lcCID
>The lcProgram variable is the path to the Telerik Report Program.
>The lcReport variable is the path to the actual Telerik Report.
>Case_ID is the Telerik Report Parameter.
>lcCID is the Telerik Report Parameter Value.
>
>When I run the above command, the Telerik Report viewer opens and "lcCID" is in the parameter value field. The report is blank. (I need the value of lcCID which is "AFD6E102-944B-3D4F-B697-5731D8D267F3."
>
>If I manually past the lcCID GUID value into the parameter value field after the Telerik Report opens, the report displays just fine.
>
>Question: How do I pass the lcCID GUID value (AFD6E102-944B-3D4F-B697-5731D8D267F3) to the Telerik report in plain text?
>
>I have played with various scenarios with no luck:
>-- Error -- RUN /n &lcProgram &lcReport Case_ID &lcCID
>-- Error -- RUN /n &lcProgram &lcReport Case_ID "AFD6E102-944B-3D4F-B697-5731D8D267F3"
>-- Error -- RUN /n &lcProgram &lcReport Case_ID AFD6E102-944B-3D4F-B697-5731D8D267F3
>-- Error -- RUN /n &lcFullPath Case_ID lcCID
>-- Error -- RUN /n &lcFullPath Case_ID "AFD6E102-944B-3D4F-B697-5731D8D267F3"
>-- Error -- RUN /n &lcFullPath Case_ID AFD6E102-944B-3D4F-B697-5731D8D267F3
>-- Error -- RUN /n &lcFullPath &lcCaseID
>-- Error -- RUN /n &lcProgram &lcReportNP Case_ID &lcCID
>-- Error -- RUN /n &lcProgram &lcReportNP Case_ID "AFD6E102-944B-3D4F-B697-5731D8D267F3"
>-- Error -- RUN /n &lcProgram &lcReportNP Case_ID AFD6E102-944B-3D4F-B697-5731D8D267F3
>
>Any ideas of what to try next?
>
>Thanks,
>TFISHER
No need for Run, Shellexecute is far better.
lcProg = fullpath(lcProgram)
lcPar = textmerge(<<lcReport>> Case_ID <<lcCID>>)
Shellx(lcProg, lcPar)
Lparameters tcURL, tcParameter
if empty(tcParameter)
tcParameter = ''
Endif
#define SW_HIDE 0
#DEFINE SW_SHOWNORMAL 1
#DEFINE SW_SHOWMINIMIZED 2
#DEFINE SW_SHOWMAXIMIZED 3
DECLARE INTEGER ShellExecute IN shell32.dll ;
INTEGER hndWin, STRING cAction, STRING cFileName, ;
STRING cParams, STRING cDir, INTEGER nShowWin
ShellExecute( 0, "open", tcURL, tcParameter , "", SW_SHOWNORMAL )
Update: If there's spaces it the path, you must add apostrophes, like this
lcPar = textmerge("<<lcReport>>" Case_ID <<lcCID>>)