Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Global Datawindow Function Help

Status
Not open for further replies.

blktoptrvl

Programmer
Jul 12, 2003
18
0
0
US
Hello All,

I have a global function:

f_row_color(li_colors, ll_row)

Inside this function, I determine if the current row is evenly divisible by zero, if it is, then I set the background color of the row to one of the predefined colors.

Then inside my datawindow, I call this function from the font background value dialog.

This works fine when I run the application from the development environment - the rows display in alternate colors. However, when compiled and run, the colors no longer display. It is as if the function is no longer being called.

I also do not see the colors being set when in the preview tab of the datawindow editor. Does anyone have any idea why this might be happening?

Any help would be appreciated.
 
A much easier way to achieve this is to put an expression in the detail band, color property on the datawindow. Try:
if(mod( getrow(), 2 )=0, RGB(255,255,255), RGB(225,225,225) )

or something similar
 
Thank you, but ease is not the point. I am doing it this way so that I can have the user choose and control the colors from the preferences window.

As I said, this works fine from the development environment and in an older version of my program... Just in a recent compile has it failed to work and I have no idea why.
 
make sure that the pbl that contains f_row_color() is included in the library list when you build ur app as exe.
 
For any following this link. I have found that when I compile the application as one exe I have this problem. When I compile separate pbd's there is not problem.

If I find more I will post.
 
Try adding the function to your application .pbr file.
 
Thank you, but functions are not resource items. The resource file should only contain datawindows and graphic items.

Placing a global function into the pbr only produces 'not found' errors.
 
wat i suppose is... the function f_row_color() could exist in 2 or more libraries....
so when u compile as an exe.... it takes up another reference of f_row_color()


u need to include the pbl in which u intend to use f_row_color() on top of other pbls...
i guess that could be the problem

Anjali
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top