Skip to Content
avatar image
Former Member

Reading environment varaibles within Crystal

Is it possible to read the values of environment variables within a Crystal report?

In other words, if I set an environment variable on a PC where I am running a Crystal report, is it possible for Crystal to read the value of that variable?

Regards,

Douglas

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Sep 25, 2008 at 02:50 PM

    Hi Douglas,

    The only way to do this would be to create your own function that would be able to retrieve your changes and pass them back to a formula in the report.

    Thanks,

    Brian

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Douglas,

      Fuskie is correct. For you to do what you want, I would recommend creating a User Function Library (UFL) which will drop that function into Crystal's Formula Editor.

      The UFL is a Windows DLL you would create in VB, C++ or whatever programming language. Compile it to a DLL and Crystal will load it and you will see your new function in the Formula Editor under Additional Functions.

      There is documentation somewhere on this Business Objects support site and samples but I've been having a hard time navigating around it recently.

      Good luck,

      Brian

  • avatar image
    Former Member
    Oct 01, 2008 at 11:21 AM

    Thanks. That kind of programming is beyond me, but we have developers who can do it.

    Add comment
    10|10000 characters needed characters exceeded