Jump to content

Martin Yergeau

Members
  • Posts

    524
  • Joined

  • Last visited

  • Days Won

    5

Community Answers

  1. Martin Yergeau's post in (FOC419) FIXFORM SUBCOMMAND ELEMENT OR FIELDNAME NOT RECOGNIZED was marked as the answer   
    Nerver mind
    I found the error : there was another master file definition stored elsewhere that has the old format.
    Once deleted, all good
  2. Martin Yergeau's post in Automate Manual Process of Combining Several Excel Worksheets into a Single Workbook. was marked as the answer   
    Hi David,
    Having the same label names within several distinct fex has no impact since each has its own "logical reference".
    I have that all the time in my fexs and I don't have any issue.
    In all my fexs I have a label named "-XEND" that I reference after each step to stop processing when an error occurs using :
    -IF &FOCERRNUM NE 0 THEN GOTO XEND;
    I think that in WF7 it was causing an issue but since WF8 it's not anymore a problem to have the same label names.
  3. Martin Yergeau's post in Is there a way to see which of the reports in a folder have been run in the last 3 months? means how many times a reports have been executed over the past 3 months. This is very urgent , can someone please help me on this? was marked as the answer   
    It probably could have several ways but the one that I use is as below.
    Be aware that I can use SQL table and manage them as I want (create/read/update/delete), which is not possible in all organization
    1- Create a table having the information that you want to keep
    2- Create a master on that table
    e.g.
    FILENAME=BI_RPT_EXEC, SUFFIX=SQLMSS , $ SEGMENT=BI_RPT_EXEC, SEGTYPE=S0, $ FIELDNAME=FEX_RUN_DATETIME, ALIAS=FEX_RUN_DATETIME, USAGE=HYYMDs, ACTUAL=HYYMDs, $ FIELDNAME=FEX_RUN_DATE, ALIAS=FEX_RUN_DATE, USAGE=YYMD, ACTUAL=DATE, $ FIELDNAME=FEX_RUN_TIME, ALIAS=FEX_RUN_TIME, USAGE=A8V, ACTUAL=A8V, $ FIELDNAME=FEX_DOMAIN, ALIAS=FEX_DOMAIN, USAGE=A50V, ACTUAL=A50V, $ FIELDNAME=FEX_NAME, ALIAS=FEX_NAME, USAGE=A100V, ACTUAL=A100V, $ FIELDNAME=FEX_USER, ALIAS=FEX_USER, USAGE=A50V, ACTUAL=A50V, $ FIELDNAME=FEX_VERSION, ALIAS=FEX_VERSION, USAGE=P7.2, ACTUAL=P3, $3- Create a generic fex that will insert the "trace". Located in EDASERVE
    e.g.
    -* File: IBFS:/EDA/EDASERVE/APPPATH/shared_modules/add_rpt_exec_trace.fex-*-* This is to create an entry in SQL table BI_RPT_EXEC when a report is launched.-*-* Parameters: Selection Condition: Test Condition:-* - Fex Domain - mandatory-* - Fex Name - mandatory-* - Fex Version - mandatory-* - User ID - mandatory-*-* REPORT VERSION-SET &RUNDATE = EDIT(&YYMD,'9999-99-99');-SET &RUNTIME = EDIT(&TOD,'99$:99$:99');-DEFAULTH &FEXNAME = 'ADD_RPT_EXEC_TRACE'-DEFAULTH &FEXDOM = 'SHARED_MODULES'-DEFAULTH &VERSION = '1.00'-DEFAULTH &IBIMR_user = 'admin'-DEFAULTH &FEX_RUN_DATETIME = ''-DEFAULTH &FEX_RUN_DATE = &RUNDATE-DEFAULTH &FEX_RUN_TIME = &RUNTIME-DEFAULTH &FEX_DOMAIN = ''-DEFAULTH &FEX_NAME = ''-DEFAULTH &FEX_VERSION = &VERSION-DEFAULTH &FEX_USER = '' -IF &FOCFOCEXEC EQ 'RCASTER' THEN GOTO NOTRACE;-IF &IBIMR_user EQ 'wt1' THEN GOTO NOTRACE;-IF &IBIMR_user CONTAINS 'admin' THEN GOTO NOTRACE; DEFINE FILE CARFEX_RUN_DATETIME /HYYMDs = HGETC(10, FEX_RUN_DATETIME);FEX_RUN_DATE /YYMD = '&RUNDATE.EVAL';FEX_RUN_TIME /A8 = '&RUNTIME.EVAL';FEX_DOMAIN /A50V = UPCASE(50, '&FEXDOM.EVAL', FEX_DOMAIN);FEX_NAME /A100V = UPCASE(100, '&FEXNAME.EVAL', FEX_NAME);FEX_USER /A50V = LOCASE(50, '&IBIMR_user.EVAL', FEX_USER);FEX_VERSION /D5.2 = &VERSION;ENDTABLE FILE CARSUM CAR NOPRINTBY FEX_RUN_DATETIMEBY FEX_RUN_DATEBY FEX_RUN_TIMEBY FEX_DOMAINBY FEX_NAMEBY FEX_VERSIONBY FEX_USERWHERE READLIMIT EQ 1;WHERE RECORDLIMIT EQ 1;ON TABLE HOLD AS WRK FORMAT BINARYEND-RUN-READFILE WRK-RUN -SET &FEX_DOMAIN = TRUNCATE(&FEX_DOMAIN);-SET &FEX_NAME = TRUNCATE(&FEX_NAME);-SET &FEX_USER = TRUNCATE(&FEX_USER); ENGINE SQLMSS SET DEFAULT_CONNECTION Con_WFWorkSQL SQLMSSINSERT INTO [dbo].[bI_RPT_EXEC] ( [FEX_RUN_DATETIME], [FEX_RUN_DATE], [FEX_RUN_TIME], [FEX_DOMAIN], [FEX_NAME], [FEX_VERSION], [FEX_USER]) VALUES ('&FEX_RUN_DATETIME', CAST('&FEX_RUN_DATE' AS DATE), '&FEX_RUN_TIME', '&FEX_DOMAIN', '&FEX_NAME', '&FEX_VERSION', '&FEX_USER');SQL COMMIT;END-RUN-NOTRACE-* ---------------------------------------------------* End add_rpt_exec_trace-* --------------------------------------------------4- Call above fex in those from where you want to keep a trace providing proper parameters
    -IF &COMMPGM_CALL IN ('Y', 'P') THEN GOTO SKIPTHISTRACE;-* REPORT VERSION-SET &VERSION = '3.06';-SET &RUNDATE = EDIT(&YYMD,'9999-99-99');-SET &RUNTIME = EDIT(&TOD,'99$:99');-SET &FEXDOM = 'SALES';-SET &FEXNAME = 'CUSTOMER INVOICING'; -MRNOEDIT -INCLUDE shared_modules/add_rpt_exec_trace.fex-SKIPTHISTRACE 
  4. Martin Yergeau's post in [SOLVED] How do you grant access to designer portal in 9.1.1 was marked as the answer   
    Do you have profile that may restrict app path or define a different app path than yours ?
    How does the Hold file created ?
    Where are they stored ? In memory or physical path (folder) ?
    File access is related to Reporting Server.
    So if several profile or app path exist, the problem may be there
  5. Martin Yergeau's post in Displaying columns on multiple lines was marked as the answer   
    OMG !!!!!
    I never thought that i will be able to do that, but I DID !!!!
    Another proof that we can do almost anything with WF !!! ✨
    However, not sure that it's going to be possible without doing all in the code....
    TABLE FILE GGSALESPRINT COMPUTE FLD1 /A50V = RJUST(50, TRIM_(BOTH, ' ', REGION), 'A50V'); COMPUTE FLD2 /A50V = RJUST(50, TRIM_(BOTH, ' ', ST), 'A50V'); COMPUTE FLD3 /A50V = RJUST(50, TRIM_(BOTH, ' ', CITY), 'A50V'); COMPUTE FLD4 /A50V = RJUST(50, TRIM_(BOTH, ' ', CATEGORY), 'A50V'); COMPUTE FLD5 /A50V = RJUST(50, TRIM_(BOTH, ' ', PCD), 'A50V'); COMPUTE FLD6 /A50V = RJUST(50, TRIM_(BOTH, ' ', PRODUCT), 'A50V');BY SEQ_NOBY TOTAL COMPUTE ROWID /I1 = 1;ON TABLE HOLD AS PART1END-RUN TABLE FILE GGSALESPRINT COMPUTE FLD1 /A50V = RJUST(50, TRIM_(BOTH, ' ', FPRINT(DATE, 'I8YYMD', 'A12')), 'A50V'); COMPUTE FLD1 /A50V = RJUST(50, TRIM_(BOTH, ' ', STCD), 'A50V'); COMPUTE FLD1 /A50V = RJUST(50, TRIM_(BOTH, ' ', FPRINT(UNITS, 'I9C', 'A12')), 'A50V'); COMPUTE FLD1 /A50V = RJUST(50, TRIM_(BOTH, ' ', FPRINT(BUDUNITS, 'I9C', 'A12')), 'A50V'); COMPUTE FLD1 /A50V = RJUST(50, TRIM_(BOTH, ' ', FPRINT(DOLLARS, 'I9M', 'A12')), 'A50V'); COMPUTE FLD1 /A50V = RJUST(50, TRIM_(BOTH, ' ', FPRINT(BUDDOLLARS, 'I9M', 'A12')), 'A50V');BY SEQ_NOBY TOTAL COMPUTE ROWID /I1 = 2;ON TABLE HOLD AS PART2END-RUN TABLE FILE PART1PRINT FLD1 FLD2 FLD3 FLD4 FLD5 FLD6BY SEQ_NOBY ROWIDON TABLE HOLD AS FINALDATAMOREFILE PART2END-RUN TABLE FILE FINALDATAPRINT FLD1 AS '' FLD2 AS '' FLD3 AS '' FLD4 AS ''COMPUTE DUMMY /A1 = ''; AS '' FLD5 AS '' FLD6 AS ''BY SEQ_NO AS ''BY ROWID NOPRINTON ROWID SUBHEAD"Seq.<+0>Region<+0>Sate<+0>City<+0>Category<+0> <+0>PCD<+0>Product"WHEN ROWID EQ 1 ON ROWID SUBHEAD" <+0>Date<+0>STCD<+0>Units<+0>Bud. Units<+0> <+0>Dollars<+0>Bud. Dollars"WHEN ROWID EQ 2 ON ROWID SUBFOOT""WHEN ROWID EQ 2 ON TABLE SET SQUEEZE ONON TABLE SET PAGE-NUM NOLEADON TABLE PCHOLD FORMAT PDFON TABLE SET STYLE *TYPE=REPORT, ORIENTATION=LANDSCAPE, FONT=ARIAL, SIZE=10, HEADALIGN=BODY, JUSTIFY=RIGHT,$TYPE=SUBHEAD, BORDER=LIGHT, BORDER-COLOR=SILVER, BACKCOLOR=RGB(245 245 245),$ENDSTYLEEND-RUNNote that the report formating does work for this data set ONLY.
    As you can see, I have played a lot with field and report format to have the data properly aligned.
  6. Martin Yergeau's post in Compound Excel for BYTOC plus a couple other worksheets was marked as the answer   
    Using OPEN & CLOSE feature
    And also pay attention that I use BYTOC and not 'BYTOC 1'
    DEFINE FILE CARCOUNTRYN /A10 = LCWORD(10, COUNTRY, 'A10');ENDTABLE FILE CARSUM SEATS AS 'Nb,Seats'BY COUNTRYN AS 'Country'BY CAR AS 'Car'BY MODEL AS 'Model'ON TABLE PCHOLD FORMAT XLSX OPENON TABLE SET COMPOUND BYTOCON TABLE SET BYDISPLAY ONON TABLE SET LINES 999999ON TABLE SET PAGE-NUM NOLEADON TABLE SET HTMLEMBEDIMG ONON TABLE SET HTMLCSS ONON TABLE SET STYLE * INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,$ENDSTYLEEND-RUN TABLE FILE CARSUM DEALER_COST AS 'Dealer,Cost'BY COUNTRYN AS 'Country'BY CAR AS 'Car'BY MODEL AS 'Model'ON TABLE PCHOLD FORMAT XLSXON TABLE SET BYDISPLAY ONON TABLE SET LINES 999999ON TABLE SET PAGE-NUM NOLEADON TABLE SET HTMLEMBEDIMG ONON TABLE SET HTMLCSS ONON TABLE SET STYLE * INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,$TYPE=REPORT, TITLETEXT='Dealer Cost',$ENDSTYLEEND-RUN TABLE FILE CARSUM RETAIL_COST AS 'Retail,Cost'BY COUNTRYN AS 'Country'BY CAR AS 'Car'BY MODEL AS 'Model'ON TABLE PCHOLD FORMAT XLSX CLOSEON TABLE SET BYDISPLAY ONON TABLE SET LINES 999999ON TABLE SET PAGE-NUM NOLEADON TABLE SET HTMLEMBEDIMG ONON TABLE SET HTMLCSS ONON TABLE SET STYLE * INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,$TYPE=REPORT, TITLETEXT='Retail Cost',$ENDSTYLEEND-RUN
×
  • Create New...