Printing reports from an external form

I follow the tutorial from Chapter 9 Macros. What im trying to do is to make button function to execute the printing reports.

oDocument = StarDesktop.loadComponentFromURL(sURL, "_blank", 0, Arg() )

And I got this error

Message: Unsupported URL <>: “from LoadEnv::startLoading”


The error is because you are using a registered DB name in the standalone form Data Source (Data tab of Form Properties). If you use a URL instead (locate via ellipsis ...) then it will work - just retested without an error.

There are other macros which do work when using a registered DB name. See:


YOU ARE RIGHT!!! why i never think about that. THANKS ALOT