On 2 Mar 2006, at 14:20, [EMAIL PROTECTED] wrote:


A popular cross-platform function to get the
appropriate path was written by Richard Gaskin:
##
function AppPath
  put the filename of this stack into tPath
  set the itemdel to "/"
  If (IsOSX()) then
    get offset(".app/Contents/MacOS/", tPath)
    if it > 0 then -- 2.4.3 or later
      delete char it to len(tPath) of tPath
    end if
  end if
  delete last item of tPath
  return tPath &"/"
end AppPath

function IsOSX
  if the platform is not "MacOS" then return false
  get the systemversion
  set the itemdel to "."
  if item 1 of it >= 10 then return true
  return false
end IsOSX
##
(for a more complete explanation, go to:
<http://www.sonsothunder.com/devres/revolution/tips/file008.htm>)

So, armed with the function above, you can change the
path to the report layout file as follows:
##
on mouseUp
  -- prep all the variables
  put AppPath() & "reports/myreport.qrl" \
      into tLayoutPath
  put "MyDataStack" into tStackName
  put true into tPreviewFlag
  put "all" into tCardRange
  -- and print the data stack
  qrtReports_PrintReportFromStack \
      tLayoutPath,tStackName,tPreviewFlag,tCardRange
end mouseUp
##

Hope this helped,

Jan Schenkel.

Quartam Reports for Revolution
<http://www.quartam.com>

Jan,

Thanks for all your help with this - it is very much appreciated. I now have my program generating attractive reports on both the Mac and Windows :-). I'm very pleased with Quartam Reports and I'm looking forward to seeing what v1.1 brings.

Thanks,

Karen

_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to