With an URL variable I take it you mean a GET parameter, like build_report.php?partno=12345.
AFAIK, you can't pass GET data when calling PHP from the command line, so you'd have to use cURL. Attached is a small example of how you could do this with cURL. The curl_exec() function returns after the page was fully retrieved, so the report should be generated after calling it.