Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Map layer refresh issue for ESRI map.
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Map layer refresh issue for ESRI map.
 Login/Join
 
Platinum Member
posted
Hi,

I wrote the below code.
I am trying to get answer to the issue i have and i replicated the scenario with CAR file as shown below.
I am generating a report with READMIT and RECORDLIMIT of 50 in XML output format.
I want to check for no of lines and if &LINES GT 0 THEN generate an XML output report(with 5 as limit) ELSE generate an XML output report with 10 as limit.

Here is the code.

  
TABLE FILE CAR
SUM SALES 
BY CAR
BY COUNTRY
WHERE RECORDLIMIT EQ 50
WHERE READLIMIT EQ 50
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT XML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/warm.sty,
$
ENDSTYLE
END

-IF &LINES GT 0 THEN GOTO :LBL1
-:LBL2
TABLE FILE CAR
PRINT
*
ON TABLE PCHOLD FORMAT XML
WHERE RECORDLIMIT EQ 5
WHERE READLIMIT EQ 5
END

-:LBL1
TABLE FILE CAR
PRINT
*
ON TABLE PCHOLD FORMAT XML
WHERE RECORDLIMIT EQ 10
WHERE READLIMIT EQ 10
END


This is what i want in ideal case,but &LINES wont work with XML format i think(tested and not working for me).

The XML output goes to an ESRI map and for some reason map is not refreshing when it has to branch.
So map layer always gets stuck on the initial XML output.

If HOLD first,i can use &LINES ,but the map layer gets stuck with whatever the xml it generates first.


I have posted similar post,but to make it more clear i post this question again.

This message has been edited. Last edited by: FP Mod Chuck,


WF8202M,Windows 7,8,10
HTM,PDF,EXCEL
 
Posts: 207 | Location: MI | Registered: September 13, 2017Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Better open a case on this one...


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1569 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Virtuoso
posted Hide Post
What you need to do is to test the result of your first TABLE FILE first, then branch to proper step.
But except if your input file (CAR) is empty, since you don't have any WHERE clause in the first TABLE FILE, you will always have &LINES GT 0
Is it possible that you had simplified too much your need in the sample code ?

The problem is that if you try to test &LINES of a PCHOLD FORMAT XML output, you will already have that XML returned. So, none of the labeled steps result will be returned.
See below sample
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
BY MODEL
WHERE COUNTRY EQ 'ENGLAND';
ON TABLE PCHOLD FORMAT XML
END
-RUN

-IF &LINES GT 0 THEN GOTO :LBL1;
-:LBL2
TABLE FILE CAR
PRINT *
WHERE RECORDLIMIT EQ 5
WHERE READLIMIT EQ 5
ON TABLE PCHOLD FORMAT XML
END
-RUN
-GOTO XEND

-:LBL1
TABLE FILE CAR
PRINT *
WHERE RECORDLIMIT EQ 10
WHERE READLIMIT EQ 10
ON TABLE PCHOLD FORMAT XML
END
-RUN
-XEND


Your option to be able to branch to step is the below
TABLE FILE CAR
SUM SALES
BY COUNTRY
BY CAR
BY MODEL
-*WHERE COUNTRY EQ 'ENGLAND';
WHERE COUNTRY EQ 'W GERMANY';
ON TABLE HOLD
END
-RUN

-IF &LINES GT 4 THEN GOTO :LBL1;
-:LBL2
TABLE FILE CAR
PRINT *
WHERE RECORDLIMIT EQ 5
WHERE READLIMIT EQ 5
ON TABLE PCHOLD FORMAT XML
END
-RUN
-GOTO XEND

-:LBL1
TABLE FILE CAR
PRINT *
WHERE RECORDLIMIT EQ 10
WHERE READLIMIT EQ 10
ON TABLE PCHOLD FORMAT XML
END
-RUN
-XEND


Or
TABLE FILE CAR
SUM SALES 
BY CAR
BY COUNTRY
-*WHERE COUNTRY EQ 'ENGLAND';
WHERE COUNTRY EQ 'W GERMANY';
ON TABLE HOLD FORMAT XML
END
-RUN

-IF &LINES GT 4 THEN GOTO :LBL1;
-:LBL2
TABLE FILE CAR
PRINT *
WHERE RECORDLIMIT EQ 5
WHERE READLIMIT EQ 5
ON TABLE PCHOLD FORMAT XML
END
-RUN
-GOTO XEND

-:LBL1
TABLE FILE CAR
PRINT *
WHERE RECORDLIMIT EQ 10
WHERE READLIMIT EQ 10
ON TABLE PCHOLD FORMAT XML
END
-RUN
-XEND


Note that you are missing a semicolon at end of the IF statement and GOTO XEND after LBL2

But I don't understand why you need to test an XML file at first step or generates an XML file that you don't care


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2165 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Map layer refresh issue for ESRI map.

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.