[SOLVED] Trouble with field name that has 'include' in the name in Managed Reporting
Hopefully someone can at least explain why this is happening if you can't tell me how to fix it.
I have fields coming in from one of our Oracle database tables using SQL Pass-through. One of the fields name is called 'include_in_report'. For some reason, when I try to run the fex from Managed Reporting, I get this error:
Error occurred. ERROR: ERROR_MR_FEX_NOT_FOUND Can't create item object based on provided item key e_in_report.sty.
When I run the exact same code from an Application Folder, it works fine. For some reason, Webfocus doesn't like the field name that includes the word 'include' even if its part of a larger field name. To see if it was my SQL pass-through that was causing the problem, I put together a quick CAR file example using a define that has 'include' part of the defined file name. Here is the fex:
DEFINE FILE CAR INCLUDE_IN_REPORT/I1=IF COUNTRY EQ 'ITALY' THEN 1 ELSE 0; END
TABLE FILE CAR PRINT * INCLUDE_IN_REPORT END
Again, if I run this fex from an Application Folder, the report is rendered to the screen with the defined field at the end. If I run the exact same fex from Managed Reporting, it never renders anything to the screen. If I drop the letter 'e' at the end of include in the field name, it works fine in Managed Reporting.
If the word 'include' is reserved in Webfocus, why would it work from the Application folder but not Managed Reporting?
I'm sure there is a reasonable explanation, I just can't find any in the documentation or Focal Point. Since the field is from our Oracle Database, I can't change the field name just because Webfocus doesn't like it. Any help would be appreciated!
Thanks,
KeithThis message has been edited. Last edited by: <Kathryn Henning>,
WebFOCUS 8.104 Windows, All Outputs
September 26, 2013, 11:38 AM
Tom Flynn
INCLUDE is a key word, change the name of the column...
I wish I could but it's part of our Oracle Database structure and that's not an option for me.
Keith
WebFOCUS 8.104 Windows, All Outputs
September 26, 2013, 12:20 PM
Francis Mariani
This is a new one!
Try adding -MRNOEDIT on the line that has the column name:
DEFINE FILE CAR
-MRNOEDIT INCLUDE_IN_REPORT/I1=IF COUNTRY EQ 'ITALY' THEN 1 ELSE 0;
END
TABLE FILE CAR
PRINT
CAR
MODEL
-MRNOEDIT INCLUDE_IN_REPORT
BY COUNTRY
END
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
September 26, 2013, 12:53 PM
kfreers
Francis,
That worked! Thanks for the fast response! I'm still not sure why it's happening but at least there is a work-around!
My co-worker Josh also suggested that I just press the tab key at the very left of both instances of the column name and that seemed to work as well. It really is a strange one!
Keith
WebFOCUS 8.104 Windows, All Outputs
September 26, 2013, 01:22 PM
Francis Mariani
Prefixing the column name with the table name will also work.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
September 26, 2013, 02:10 PM
Doug
quote:
INCLUDE is a key word, change the name of the column...
Interesting "INCLUDE" is a key word in MAINTAIN, -INCLUDE is a key word in DM. So, is it parsing code for MAINTAIN even if MAINTAIN isn't being used or installed?
September 26, 2013, 02:14 PM
Tom Flynn
Doug, INCLUDE has always been a keyword, AND, when started in byte 1, it calls the common stylesheet that comes with WebFOCUS, OR, INCLUDE folder/whatever.fex/dat/htm/css, etc; intoduced in 7.7.1, if I recall correctly...
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET SQUEEZE ON
ON TABLE SET HTMLCSS ON
ON TABLE SET HTMLENCODE ON
ON TABLE SET EMPTYREPORT ON
ON TABLE SET STYLE *
INCLUDE=IBFS:/CFG/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$
TYPE=REPORT, ORIENTATION=PORTRAIT, $
ENDSTYLE
END