Jump to content

David Beagan

Members
  • Posts

    260
  • Joined

  • Last visited

  • Days Won

    8

Community Answers

  1. David Beagan's post in '%' in an 'AS' Phrase Does Not Display in EXL2K and Dynamic Formatting. was marked as the answer   
  2. David Beagan's post in How to add "Back" button for Drilling down option . was marked as the answer   
    Can you right-click the report window and choose <-- Back ?
  3. David Beagan's post in Set a default value in a reporting object was marked as the answer   
    In WebFOCUS 9.10, I created a reporting object, and then a report in the reporting object with a parameter &REGION.

    In the reporting object's Preprocessing Other I put in a default for the parameter variable.

    When I run it I get the Prompt with Northeast filled in. And then can run the report from there.
    Or if I change the Proprocessing to -DEFAULTH and run the reporting object then it runs and filter for Northeast.
    I wonder if it could be a bug with your release of WebFOCUS or maybe you are using it in a different way.
     
     
     
     
  4. David Beagan's post in hide scroll bar of a basic container was marked as the answer   
    I tried your CSS in Designer and it worked. I created a fex like this:
    -HTMLFORM BEGIN <!DOCTYPE html> <html> <head> <style> .mainkpi {   border-radius: 25px;   align-content: center;   justify-content: center;   height: 100%;   overflow: hidden; } </style> </head> <body class=mainkpi> <h1>Semicritics</h1> <p>3</p> <h1>Semicritics</h1> <p>3</p> <h1>Semicritics</h1> <p>3</p> <h1>Semicritics</h1> <p>3</p> <h1>Semicritics</h1> <p>3</p> <h1>Semicritics</h1> <p>3</p> <h1>Semicritics</h1> <p>3</p> <h1>Semicritics</h1> <p>3</p> <h1>Semicritics</h1> <p>3</p> </body> </html> In Designer (Assemble Visualizations) it looks like this (no scrollbars even though content extends beyond the height of the container) :

    Initially I didn't use the:
     -ms-overflow-style: none;
    part of your CSS because it was causing problems. Then I saw it was causing an error because the fex was trying to interpret it as a dialogue manager command.
    Then I rearranged the code so that the dash was not the first non-blank character in the line and it was ok.
     
     
  5. David Beagan's post in Possible to create a running distinct count report? was marked as the answer   
    In importing this answer over from the TIBCO Community all of the line breaks got stripped off the code that was posted. Here is the code with the line breaks.
    -* Step 0. Make the sample data file. SQL CREATE TABLE DATA ( DATE DATE, CUSTOMER CHAR(1) ) ; END MODIFY FILE DATA MATCH DATE CUSTOMER ON NOMATCH INCLUDE ON MATCH INCLUDE DATA 20241201,A,$ 20241201,B,$ 20241201,A,$ 20241201,A,$ 20241201,A,$ 20241202,C,$ 20241202,C,$ 20241202,A,$ 20241202,A,$ 20241202,A,$ 20241203,B,$ 20241203,B,$ 20241203,B,$ 20241203,B,$ 20241203,B,$ END -* Step 1. Hold distinct counts for date, customer. SET ASNAMES=ON, HOLDLIST=PRINTONLY TABLE FILE DATA COUNT DST.CUSTOMER AS 'DISTCOUNTER' BY DATE BY CUSTOMER ON TABLE HOLD AS DATADIST END -* Step 2. Create a hold file of every combination of date and customer. TABLE FILE DATADIST BY DATE ON TABLE HOLD AS DATECUST END TABLE FILE DATADIST BY CUSTOMER ON TABLE HOLD AS DATACUST END JOIN FILE DATECUST AT DATE TO ALL FILE DATACUST AT CUSTOMER AS J1 END -* Step 3. Left outer join file with every combination to file of distince counts. JOIN LEFT_OUTER DATE AND CUSTOMER IN DATECUST TO ALL DATE AND CUSTOMER IN DATADIST AS J2 END -* Step 4. Calculate the running distinct count for each customer and date. TABLE FILE DATECUST SUM COMPUTE RUNDC/I9 = IF LAST CUSTOMER EQ CUSTOMER THEN MAX(DISTCOUNTER, LAST RUNDC) ELSE DISTCOUNTER; BY CUSTOMER BY DATE ON TABLE HOLD AS DATACNT END -* Step 5. Sum up the running distinct counts for each date. TABLE FILE DATACNT SUM RUNDC BY DATE END  
  6. David Beagan's post in Copy and Paste in to .htm textarea? was marked as the answer   
    Here's an example dug up from the archives. 
    I have values in Excel and have run the page. I copy-and-past a list from Excel into the textarea:

    then when I click Go, an onblur event triggers reformats the textarea and passes the value to WebFOCUS. I just have a simple fex that does a -TYPE of the variable that was passed.
     
    Here is what I did in HTML Canvas. I created on onblur event on the textarea

    The following shows the JavaScript code I put in the event. The id of the textarea is just the default name that HTML Canvas gave it. Yours may be different.

    Here's the code for your copy-and-paste convenience: 
    document.getElementById('textarea1').value = document.getElementById('textarea1').value.replace(/\r\n/g,',');  document.getElementById('textarea1').value = document.getElementById('textarea1').value.replace(/\r/g,',');  document.getElementById('textarea1').value = document.getElementById('textarea1').value.replace(/\n/g,','); The \n and \r represent carriage return and linefeed characters. The code is simplistic, for example, it puts a trailing comma at the end of the values. You could certainly do a lot more.

  7. David Beagan's post in Pass parameters to a Visualization from a different report page was marked as the answer   
    Coincidentally, I was just starting to do something very similar to this. My solution works in my WebFOCUS 9.1.0. Essentially it passes the parameter as part of the calling URL, just like you tried. However, I did it indirectly with a fex that has an -HTMLFORM with an HTML <form>. 
    The URL was something like this:
    http://servername:8080/ibi_apps/run.bip?BIP_REQUEST_TYPE=BIP_RUN&BIP_folder=IBFS:/WFC/Repository/workspace_01/&BIP_item=vizual_01&SUBDIVISION=1  Maybe this doesn't work in WebFOCUS 8.2.07, or maybe you formed your URL differently.
  8. David Beagan's post in How to use Date Filters in Select Editor of Data flow? - was marked as the answer   
    Could you put the following -SET statment in your server profile (edasprof.prf) to calculate a global variable with the value of the date for 3 weeks ago?
    -SET &&3WeeksBack = AYMD(&DATEH8,-21,'I8YYMD');And then use the global variable where you were using the date?
  9. David Beagan's post in what is the best way to display 2 charts next to each other where comparing the values for different date ranges. was marked as the answer   
    A simpler approach could be accomplished with a single with the code for both charts. There is a basic feature for displaying side by side reports or charts as documented in How to Control Multiple Reports From a Procedure, page 265. With both reports being coded in a single fex, when the fex is run, the two chart outputs will appear side by side. Autoprompt can be used to promopt for all the date parameters. Here's an example after the fex is run, parameters selected and Submit pressed.
    Here is the code for you to try it:
    -TYPE WEBFOCUS CGIVAR IBIWF_mreports=FRAME -TYPE WEBFOCUS CGIVAR IBIWF_mrcolumns=2  DEFINE FILE ggsales AMP_YYMD/YYMD = &YYMD; DATE_YYMD/YYMD = AMP_YYMD - SEQ_NO + 1; DATE_YYMt/YYBMt = DATE_YYMD; DATE_D/D = DATE_YYMD; END GRAPH FILE ggsales SUM UNITS AS '' BY DATE_YYMt AS '' BY DATE_D AS '' WHERE DATE_YYMD GE '&STR_DATE1.(|FORMAT=YYMD).' WHERE DATE_YYMD LE '&END_DATE1.(|FORMAT=YYMD).' ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET LOOKGRAPH BAR ON GRAPH SET AUTOFIT ON ON GRAPH SET STYLE *TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $TYPE=DATA, COLUMN=N2, BUCKET=x-axis, $TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$*GRAPH_JS_FINAL"xaxis": { "labels": { "nestingConcatSymbol": undefined } }*ENDENDSTYLEEND  GRAPH FILE ggsales SUM UNITS AS '' BY DATE_YYMt AS '' BY DATE_D AS '' WHERE DATE_YYMD GE '&STR_DATE2.(|FORMAT=YYMD).' WHERE DATE_YYMD LE '&END_DATE2.(|FORMAT=YYMD).' ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET LOOKGRAPH BAR ON GRAPH SET AUTOFIT ON ON GRAPH SET STYLE *TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $TYPE=DATA, COLUMN=N2, BUCKET=x-axis, $TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$*GRAPH_JS_FINAL"xaxis": { "labels": { "nestingConcatSymbol": undefined } }*ENDENDSTYLEEND
  10. David Beagan's post in Is it possible to add an additional row underneath the 'day' on X axis that further defines the Month & Year was marked as the answer   
    Merin, this is more up-to-date coding, similar to how InfoAssist would do it. Does it work for you?
    DEFINE FILE ggsales AMP_YYMD/YYMD = &YYMD; DATE_YYMD/YYMD = AMP_YYMD - SEQ_NO + 1; DATE_YYMt/YYBMt = DATE_YYMD; DATE_D/D = DATE_YYMD; END GRAPH FILE ggsalesSUM UNITSBY DATE_YYMtBY DATE_DWHERE WHERE SEQ_NO FROM 50 TO 70ON GRAPH PCHOLD FORMAT JSCHARTON GRAPH SET VZERO OFFON GRAPH SET LOOKGRAPH BARON GRAPH SET AUTOFIT ONON GRAPH SET STYLE *TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $TYPE=DATA, COLUMN=N2, BUCKET=x-axis, $TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $*GRAPH_SCRIPTsetFillColor(getSeries(0),new Color(#5388be));setLabelStagger(getO1Label(),true);*GRAPH_JS_FINAL"xaxis": {"labels": {"nestingConcatSymbol": undefined}}*ENDENDSTYLEEND
  11. David Beagan's post in How can i get a MAX, MIN and a Avg line in a bar chart was marked as the answer   
    It is very useful that the text of the reference line handles HTML code. Based on the example I previously provided, I was able to do a tooltip:
     By using this code for a refernce line.
    "referenceLines": [ {"value": &MIN, "axis": "y", "line": {"color": "red", "width": 3, "dash": "dash"}, "label": {"text": "<a title=' Min=&MIN' href='' style=color:orange;font-size:15pt;><br>&|#9632;</a>", "color":"black", "font": "bold 10pt Sans-Serif"}, "anchor": "start", "showValue": false },
  12. David Beagan's post in How to combine two charts with different BY field into one graphic? was marked as the answer   
    Hi Emily, the code below would be one way to get the worldwide average as a reference line.
    -SET &SALES=0; TABLE FILE CAR SUM AVE.SALES ON TABLE HOLD AS AVERAGE END-RUN-READFILE AVERAGE GRAPH FILE carSUM AVE.SALESBY COUNTRYON GRAPH PCHOLD FORMAT JSCHARTON GRAPH SET LOOKGRAPH BARON GRAPH SET AUTOFIT ONON GRAPH SET STYLE *INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $*GRAPH_JS"referenceLines": [ {"value": &SALES, "axis": "y", "line": {"color": "green", "width": 3, "dash": ""}, "label": {"text": "Average:", "color":"green", "font": "bold 10pt Sans-Serif"}, "anchor": "start", "showValue": true },]*ENDENDSTYLEEND
  13. David Beagan's post in I'm relatively new to WF, so any help would be appreciated. How do you create a selectable parameter that determines what will be shown on a report? was marked as the answer   
    Then you could do this:
    &MEASURE.(<Sales,Sales1 Sales2>,<Cases,Cases1 Cases2>,<Weight,Weight1 Weight2>).Select Measure.
  14. David Beagan's post in How to query synonym info? was marked as the answer   
    You can use
    TABLE FILE systablePRINT *END
  15. David Beagan's post in Does someone know a better way to add values in the legend? so here I'm holding that values as a variable and then used it. was marked as the answer   
    An alternative would be to turn off the legend and create an annotaion that looks like a legend. It can be placed on the graph to save space.
    GRAPH FILE systableSUM OBID COLCOUNTBY TBTYPEWHERE READLIMIT IS 50ON GRAPH PCHOLD FORMAT JSCHARTON GRAPH SET LOOKGRAPH LINEON GRAPH SET AUTOFIT ONON GRAPH SET STYLE *INCLUDE=Warm.sty,$TYPE=DATA, COLUMN=N1, BUCKET=x-axis, $TYPE=DATA, COLUMN=N2, BUCKET=y-axis, $TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $*GRAPH_SCRIPTsetDisplay(getLegendArea(),false);*GRAPH_JS "annotations": [{ "position": { "x":"5%", "y": "0%" , "parent":"chart"}, "label": { "visible":true, "text": "<span style=color:RoyalBlue;font-size:20pt;>&|#9632;</span> Category one <span style=color:MediumAquaMarine;font-size:20pt;><br>&|#9632;</span> Category two", "font":"11pt arial", "color":"gray", "style":"bold" } }] *ENDENDSTYLEEND
  16. David Beagan's post in Can someone please help me to convert this SQL to Webfocus code? GETDATE() - COALESCE(tl.FUTURE_SHIP_DATE,GETDATE()) >= 0 was marked as the answer   
    Looks like you are wanting to get FUTURE_SHIP_DATE values that are earlier than the current date-time — as well as the FUTURE_SHIP_DATE values that are NULL. Assuming that FUTURE_SHIP_DATE is of data type HYYMDS
    (FUTURE_SHIP_DATE LE '&DATEHYYMDS' OR FUTURE_SHIP_DATE IS MISSING)
  17. David Beagan's post in How to pass/share &variable values across tabs in a Portal created using AppStudio in 8207.28 was marked as the answer   
    The JavaScript you have posted looks like what was done in the early 8.x releases before the Refresh BI Portal feature was built in to HTML Canvas. I put together something that seems to work without custom JavaScript.
    I create a Collaborative Portal with a Banner the left side containing the common parameter Region. The HTML page in this banner was built with App Studio HTML Canvas with the REGION parameter having Target Type Refresh BI Portal (All pages of portal). When a different REGION is chosen, the page triggers a Refresh BI Portal.
    When the portal is run, the chosen Region is sent to the HTMLs of both tabs, which in turn passes the Region to the report.
     
    I have a change management package I can email to you that contains all of this. It is all built off of ggsales data in WF 8.2.07, so you should be able to run it and examine it on your end.
  18. David Beagan's post in setRiserWidth, setRiserBarGroupSpacing is not working. was marked as the answer   
    There doesn't seem to be anything specifically documented for that in Creating HTML5 Charts manual.
    The best I could come up with was to place a thick white border around each bar.Here's the code:
    GRAPH FILE carSUM SEATSBY MODELBY CARWHERE CAR EQ 'BMW'ON GRAPH PCHOLD FORMAT JSCHARTON GRAPH SET VZERO OFFON GRAPH SET GRWIDTH 1ON GRAPH SET LOOKGRAPH BARON GRAPH SET AUTOFIT ONON GRAPH SET STYLE *INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$TYPE=DATA, COLUMN=N1, BUCKET=color, $TYPE=DATA, COLUMN=N2, BUCKET=x-axis, $TYPE=DATA, COLUMN=N3, BUCKET=y-axis, $*GRAPH_SCRIPTsetReportParsingErrors(false);setSelectionEnableMove(false);*GRAPH_JS_FINAL"series": [ {"series": 0, "border": {"width": 6, "color": "white", "solid": ""}}, {"series": 1, "border": {"width": 6, "color": "white", "solid": ""}}, {"series": 2, "border": {"width": 6, "color": "white", "solid": ""}}, {"series": 3, "border": {"width": 6, "color": "white", "solid": ""}}, {"series": 4, "border": {"width": 6, "color": "white", "solid": ""}}, {"series": 5, "border": {"width": 6, "color": "white", "solid": ""}},],"blaProperties": {"orientation": "horizontal"},*ENDENDSTYLEEND
  19. David Beagan's post in Hi guys, Using workbench template, when i select the page from the side panel, its opening in new window instead of opening in the canvas. Can someone please help me on this? Thank you. was marked as the answer   
    I was able to get it to run in the collaborative portal without opening a new window. I created a fex that runs the designer page. Then from the colaborative portal run the fex. The trick is the fex to run the desinger page:
    -HTMLFORM BEGIN <!DOCTYPE html> <body onload="document.f1.submit();"> <form name="f1" action="/ibi_apps/run.bip" target="if1"> <input type="hidden" name="BIP_REQUEST_TYPE" value="BIP_RUN"> <input type="hidden" name="BIP_folder" value="IBFS:/WFC/Repository/wspace"> <input type="hidden" name="BIP_item" value="selects"> <iframe name="if1" src="" style="position:absolute;height:100%;width:100%;top:0;left:0;border:none"> </iframe></form> </body></html>-HTMLFORM ENDYou will fill in the BIP_folder value and BIP_item value for your designer page.
  20. David Beagan's post in In a Multiselect OR parameter, how can it be set up that none are selected by default rather than all values selected? was marked as the answer   
    The only way I can see to make this select all happen automatically is by the following setting in the Adminisration Console, "Preselect all values for static list controls" is checkmarked.I can override this behavior by using a default. For example:
    -DEFAULT &YEAR = 'FOC_NONE';
  21. David Beagan's post in Using variable to affect later tables was marked as the answer   
    DEFINE and -SET don't work together like that. You want to use -READFILE to get the value into a variable. Like this:
    TABLE FILE mini1 SUM FNum AS 'CID' WHERE RECORDLIMIT IS 1 ON TABLE SET ASNAME ON ON TABLE HOLD AS FNUMHOLD END-RUN-SET &CID = 'Tacos';-READFILE FNUMHOLDThen you can continue on with your TABLE FILE MINI2.
    The line ON TABLE SET ASNAME ON causes the -READFILE to read into a variable called &CID instead of the default of using the fieldname which would read into a variable called &FNum.
  22. David Beagan's post in Trying to read just one row of an Excel file, ignoring earlier and later rows was marked as the answer   
    Does this get it for you?
    TABLE FILE CompanyName
    PRINT UniqueID
    WHERE RECORDLIMIT IS 1
    ON TABLE SET BYDISPLAY ON
    END
  23. David Beagan's post in What is the format to use to display large numbers ? was marked as the answer   
    With the newer field formats, fields can be displayed in millions or billions and many other formats. This example from the Describing Data With WebFOCUS® Language, Page 127 shows how:
    DEFINE FILE GGSALESNEWDOLL/D12.2 = DOLLARS * 100;ENDTABLE FILE GGSALESSUM DOLLARSNEWDOLL/D12.2nM AS 'Millions'NEWDOLL/D12.2nG AS 'Billions'BY CATEGORYON TABLE SET PAGE NOLEADON TABLE SET STYLE *GRID=OFF,$ENDSTYLEEND
  24. David Beagan's post in Where I can find the TIBCO DataMigrator Error Code Reference Document? was marked as the answer   
    Try it with https
×
  • Create New...