Gloabl Variable

  • Hi

    Can I declare user defined global variables within a report to be used in the dataset queries ?

    Cheers

    Arg


    Best Regards,

    Frik Venter

  • You can simulate global variables by declaring a global cursor that will be visible to all processes under the purview of your report.  You can then test the existence of a cursor using the CURSOR_STATUS function.  I honestly don't know how badly that will impact performance.  Cursors are supposed to be bad juju with regard to performance, but I think they're a problem mainly when you're processing lots of records.  To use it to pass one row containing "global" variable values wouldn't seem like an awful lot to ask, but maybe one of the heavy hitters that lurk on these boards could venture an opinion.

    You can also create a table (either a permanent or a '##' temp) to pass values into.

    Maybe all you need to do is pass parameters?  Don't know your architecture, so can't really say.

    (Oracle's PL/SQL has nifty little 'package' declarations that are visible to the executables; very convenient.)

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply