cancel
Showing results for 
Search instead for 
Did you mean: 

Reading environment varaibles within Crystal

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

former_member292966
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Could you give some more detail on what you mean by create a function?

In my particular case, I am working with Crystal and Business One with a SQL Server database. I could create a function within SQL Server that could read an environment variable, but that would return the value of the variable on the server. I need to read the value on a client PC.

Can you create a function that Crystal can use to read client evironment variables?

Former Member
0 Kudos

I think what Brian means is that you write your own function library DLL. I know there are technical specs out there for how to do this but it is beyond my programming expertise.

Fuskie

Who imagines there would be a market out there for someone who could develop custom function libraries for Crystal Reports...

former_member292966
Active Contributor
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

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