the reason I had to do it this way is because I am creating a table, where the user will enter a name of the report that he wants a pdf copy off that report. Therefore, to use this line of code in PDFCreator, I had to first figure out what the ReportID (objectID) will be for that report.
IF Object.GET(Object.Type::Report,'',ReportID) THEN;
Answers
If user will select report name from list form, based on object - you'll got id already
Therefore, I modified it so the user can see the list of reports that are available in the system and he can double click on the ones he want.