Oct 25, 2004 #1 epsison IS-IT--Management Jan 7, 2003 24 PH I am using the VFP Report Designer. How do you pass parameters to a report?
Oct 26, 2004 1 #2 Mike Lewis Programmer Jan 10, 2003 17,516 Scotland You can't pass a parameter to a report. A report is not a program or function, so it has no mechanism for receiving parameters. If you want the report to reference a specific value from the calling program, store the value in a variable and make sure that it is Private. For example, if your report needs to know the name of the current user, you could do the following: PRIVATE pcUser pcUser = <code here to get the user name> REPORT FORM MyReport TO PRINTER RELEASE pcUser The report will then be able to see the contents of pcUser. Hope this helps. Mike Mike Lewis Edinburgh, Scotland My Visual Foxpro web site: http://www.ml-consult.demon.co.ukMy Crystal Reports web site: http://www.ml-crystal.com Upvote 0 Downvote
You can't pass a parameter to a report. A report is not a program or function, so it has no mechanism for receiving parameters. If you want the report to reference a specific value from the calling program, store the value in a variable and make sure that it is Private. For example, if your report needs to know the name of the current user, you could do the following: PRIVATE pcUser pcUser = <code here to get the user name> REPORT FORM MyReport TO PRINTER RELEASE pcUser The report will then be able to see the contents of pcUser. Hope this helps. Mike Mike Lewis Edinburgh, Scotland My Visual Foxpro web site: http://www.ml-consult.demon.co.ukMy Crystal Reports web site: http://www.ml-crystal.com