Can you create multiple defines for a single report? When I try to create a where/if statement, I can only see the last define in the "Fields List". I check each individual define (no errors), but report ony sees the very last (#5 of 5).This message has been edited. Last edited by: Kerry,
WebFOCUS 7.702 Windows, All Outputs
December 19, 2011, 01:47 PM
dburton
Yes, you can create multiple defines in one report. If you have some joined tables in your report, check in the field listings of the other tables. Depending on the data you use to create your DEFINE, will depend on where your defined field is placed in the "Field List".
Also, if there is an element that is wrong in the DEFINE that didn't get caught by the GUI, it will not show up at all. I have run across both scenarios before.
Thanks,
Dave
WebFOCUS 7.7.03 Windows Web Server 2008 MS SQL Server 2000 Excel,CSV,PDF,HTML
December 19, 2011, 03:29 PM
Waz
Can you post an example ?
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
December 19, 2011, 04:57 PM
DG
I've listed all my Defines and the related Where/If statements. All my fields are coming from one table, so join not required. Also, the OR statements are Include/Exclude....somehow the copy/paste changed it ot (OR(,))
thanks, DG
SET EMPTYREPORT = ON
DEFINE FILE TABLE_A LAWA/A100=IF TABLE_A.TABLE_A.LAW_ALUMNI = 'Y' THEN 'LAWA' ELSE 'N'; END
DEFINE FILE TABLE_A LAWDCIRCAN/A100=IF TABLE_A.TABLE_A.LAW_DEANS_CIR_CAN = 'Y' THEN 'LAWDCIRCAN' ELSE 'N'; END
DEFINE FILE TABLE_A LAWDCIR11/A100=IF TABLE_A.TABLE_A.LAW_DEANS_CIR_2011 = 'Y' THEN 'LAWDCIR11' ELSE 'N'; END
DEFINE FILE TABLE_A LAWDCIR12/A100=IF TABLE_A.TABLE_A.LAW_DEANS_CIR_2012 = 'Y' THEN 'LAWDCIR12' ELSE 'N'; END
DEFINE FILE TABLE_A LAW300/A100=IF TABLE_A.TABLE_A.LAW_TOP_300 NE MISSING THEN 'LAW300' ELSE 'N'; END
DEFINE FILE TABLE_A LAWHPC/A100=IF TABLE_A.TABLE_A.LAW_HIGH_PERSONAL_CONT NE MISSING THEN 'LAWHPC' ELSE 'N'; END
TABLE FILE TABLE_A
PRINT....
WHERE TABLE_A.TABLE_A.LAW_ALUMNI EQ &LAW_ALUMNI.(OR(,)).Law Alumni.; WHERE TABLE_A.TABLE_A.LAW_DEANS_CIR_CAN EQ &LAW_DEANS_CIR_CAN.(OR(,)).Law Deans Circle Candidate.; WHERE TABLE_A.TABLE_A.LAW_DEANS_CIR_2011 EQ &LAW_DEANS_CIR_2011.(OR(,)).Law Deans Circle 2011.; WHERE TABLE_A.TABLE_A.LAW_DEANS_CIR_2012 EQ &LAW_DEANS_CIR_2012.(OR(,)).Law Deans Circle 2012.; WHERE TABLE_A.TABLE_A.LAW_TOP_300 EQ &LAW_TOP_300.(OR(,)).Law Top 300.; WHERE TABLE_A_TABLE_A.LAW_HIGH_PERSONAL_CONT EQ &LAW_HIGH_PERSONAL_CONT.(OR(,)).Law High Personal Contact.;This message has been edited. Last edited by: DG,
WebFOCUS 7.702 Windows, All Outputs
December 19, 2011, 05:03 PM
Dan Satchell
Each DEFINE FILE clears all previous DEFINEs for the same table. Either combine all of your DEFINEs into one DEFINE statement, or use the DEFINE FILE....ADD syntax for each DEFINE statement.
WebFOCUS 7.7.05
December 19, 2011, 05:05 PM
Waz
Beat me to it Dan.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
December 19, 2011, 05:06 PM
Dan Satchell
That seldom happens Waz. You must have been dozing.
WebFOCUS 7.7.05
December 19, 2011, 05:30 PM
Waz
What ?.....
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
December 19, 2011, 06:09 PM
DG
Originally, I tried to group the define as "Population". The output reflects 1st line of "IF" statements and ignores any of the "IF" statements when using Multi-Select.
SET EMPTYREPORT = ON DEFINE FILE TABLE_A Population/A100=
IF TABLE_A.TABLE_A.LAW_ALUMNI = 'Y' THEN 'LAWA' ELSE IF TABLE_A.TABLE_A.LAW_DEANS_CIR_CAN = 'Y' THEN 'LAWDCIRCAN' ELSE IF TABLE_A.TABLE_A.LAW_DEANS_CIR_2011 = 'Y' THEN 'LAWDCIR11' ELSE IF TABLE_A.TABLE_A.LAW_DEANS_CIR_2012 = 'Y' THEN 'LAWDCIR12' ELSE IF TABLE_A.TABLE_A.LAW_TOP_300 NE MISSING THEN 'LAW300' ELSE IF TABLE_A.TABLE_A.LAW_HIGH_PERSONAL_CONT NE MISSING THEN 'LAWHPC' ELSE 'N'; END
TABLE FILE TABLE_A ....
WHERE TABLE_A.TABLE_A.Population EQ &Population.(OR(,,,,,,)).Population.;
WebFOCUS 7.702 Windows, All Outputs
December 19, 2011, 06:37 PM
Dan Satchell
Try this:
SET EMPTYREPORT = ON
DEFINE FILE TABLE_A
LAWA/A100=IF TABLE_A.TABLE_A.LAW_ALUMNI = 'Y' THEN 'LAWA' ELSE 'N';
LAWDCIRCAN/A100=IF TABLE_A.TABLE_A.LAW_DEANS_CIR_CAN = 'Y' THEN 'LAWDCIRCAN' ELSE 'N';
LAWDCIR11/A100=IF TABLE_A.TABLE_A.LAW_DEANS_CIR_2011 = 'Y' THEN 'LAWDCIR11' ELSE 'N';
LAWDCIR12/A100=IF TABLE_A.TABLE_A.LAW_DEANS_CIR_2012 = 'Y' THEN 'LAWDCIR12' ELSE 'N';
LAW300/A100=IF TABLE_A.TABLE_A.LAW_TOP_300 NE MISSING THEN 'LAW300' ELSE 'N';
LAWHPC/A100=IF TABLE_A.TABLE_A.LAW_HIGH_PERSONAL_CONT NE MISSING THEN 'LAWHPC' ELSE 'N';
END
TABLE FILE TABLE_A
PRINT....
WHERE TABLE_A.TABLE_A.LAW_ALUMNI EQ &LAW_ALUMNI.(OR(,)).Law Alumni.;
WHERE TABLE_A.TABLE_A.LAW_DEANS_CIR_CAN EQ &LAW_DEANS_CIR_CAN.(OR(,)).Law Deans Circle Candidate.;
WHERE TABLE_A.TABLE_A.LAW_DEANS_CIR_2011 EQ &LAW_DEANS_CIR_2011.(OR(,)).Law Deans Circle 2011.;
WHERE TABLE_A.TABLE_A.LAW_DEANS_CIR_2012 EQ &LAW_DEANS_CIR_2012.(OR(,)).Law Deans Circle 2012.;
WHERE TABLE_A.TABLE_A.LAW_TOP_300 EQ &LAW_TOP_300.(OR(,)).Law Top 300.;
WHERE TABLE_A_TABLE_A.LAW_HIGH_PERSONAL_CONT EQ &LAW_HIGH_PERSONAL_CONT.(OR(,)).Law High Personal Contact.;