Page 1 of 1

File location reference....

Posted: Wed Feb 24, 2010 4:21 am
by arkstar
I created a report with Quartam. I created the script and saved the .qrl file on the desktop where my main stack is located.

put "testrpt.qrl" into tLayoutFile

When I run the script, I get an error, "Can't find testrpt.qrl" If I enter the absolute path, it works perfectly.
I am drawing a blank here.... what would the relative file path be?

Thanks for the help/clue!

Rob

Re: File location reference....

Posted: Wed Feb 24, 2010 11:55 am
by Mark
Rob,

The relative path starts from the defaultFolder. Usually this starts off as the folder where the Revolution executable is located and definitely not your desktop folder.

A solution that always works:

Code: Select all

set the itemDel to slash
put item 1 to -2 of the effective filename of this stack into myPath
put myPath & "/testrpt.q2rl" into tLayoutFile
-- now continue with your own script
Best regards,

Mark

Re: File location reference....

Posted: Thu Feb 25, 2010 3:51 pm
by arkstar
Thanks again Mark!

Worked perfectly!

Rob