Hi, all -
I'm very new to this WebFOCUS business and I'm trying to do something that may not even make sense. Maybe somebody can clue me in.
I'm using the report painter. In my project I have a define for a field in one table. This is followed by a four-way join based on the same table. In the join view I can see the defined field, however when I open a report the defined field is not in the list.
Should I be creating a HOLD file before I make my join? Where am I going wrong?
Thanks for your help!
What you're trying to do makes total sense! Did you run your join before opening the Report Painter? That's the only thing I can think of, especially since you see the defined field in the Join view.
JOIN clears DEFINEs so you need to make sure that the DEFINE is executed AFTER the JOIN (which always seemed strange to me... particularly with DEFINE-based JOINs). Run the JOIN first, then the DEFINE and then you should see the defined field in the painter
You can also place the DEFINE in the Master File Description to avoid this problem.
Hope that helps...
The JOIN command clears all defined fields.
To preserve the virtual fields after join, you need to set the KEEPDEFINES SET command on.
Place it before you define virtual fields.
SET KEEPDEFINES = ON
Thanks for your help, guys! At least now I know how the defines work with joins.
Thanks, kj. I put in the SET as you suggested and it allows the defined field to stay in the list. Unfortunately there's another problem now which breaks my report, but I don't think it has anything to do with the join. My defined field references two fields from two different tables but after the join the defined field is not listed at the bottom of the join but inside one of the tables. What could I do to fix that?
My issue is something like this one only I need to create a "reporting object" joining two tables on a field that is a different size in each table.
How do you create a defined base join for a reporting object in MRE ..... I'm not using Report Painter...... Is it possible...?
When you're creating a Reporting Object, the JOIN component is created before the DEFINE component, so you can't use an inline DEFINE. It sounds like you're better off using a DEFINE in the Master. You need to put the DEFINE in the Master file you're JOINing FROM (the first Master in the JOIN statement, and the one you specified when you created the Reporting Object).
Hope this helps.
|Powered by Social Strata|