Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Schedule Duplicating Records

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Schedule Duplicating Records
 Login/Join
 
Member
posted
I'm receiving a scheduled report that I made just fine. However, the report window displays a copy of the report for some reason. It doesn't do this when I run the report in AppStudio, just when I receive the schedule through email. Code is below.

-SET &ECHO=ON;
SET EMPTYREPORT=ON
SET ASNAMES=ON
SET LINES=99999


TABLE FILE CUSTOMERS
SUM
CNT.CUSTOMERS.CUSTOMERS.FIELD1 AS 'COUNTS'
BY CUSTOMERS.CUSTOMERS.FIELD1
WHERE TOTAL CNT.CUSTOMERS.CUSTOMERS.FIELD1 GT 1;
WHERE CUSTOMERS.CUSTOMERS.FIELD1 IS NOT '';
WHERE CUSTOMERS.CUSTOMERS.CUSTOMERID IS NOT '';
ON TABLE HOLD AS MASTER
END
-RUN


JOIN
CUSTOMERS.CUSTOMERS.FIELD1 IN CUSTOMERS TO MULTIPLE
MASTER.MASTER.FIELD1
IN MASTER TAG J1 AS J1
END


TABLE FILE CUSTOMERS
PRINT
J1.MASTER.FIELD1 AS 'LEGACYID'
CUSTOMERS.CUSTOMERS.CUSTOMERID
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE PCHOLD FORMAT HTML
END
-RUN
-EXIT

This message has been edited. Last edited by: FP Mod Chuck,
 
Posts: 13 | Registered: August 28, 2019Report This Post
Master
posted Hide Post
Are you wanting to see the report as an attachment in the email rather than embedded in the email?

If so, then go to the scheduled job and open it up. Go to the Distributions tab and open the method. Then in the email information about halfway down, change the radio button to 'Send all reports as attachments'



Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Member
posted Hide Post
Hi Hallway,

Actually, I am receiving the report as an attachment, which is good. But the values within that report are duplicated. For example, when I review the results window, I should see;


LEGACYID CUSTOMERID
GSX010259 2552723
GSX010259 2696311

But what I'm getting instead is;

LEGACYID CUSTOMERID
GSX010259 2552723
GSX010259 2696311
LEGACYID CUSTOMERID
GSX010259 2552723
GSX010259 2696311
 
Posts: 13 | Registered: August 28, 2019Report This Post
Master
posted Hide Post
Can you replicate the error using a master file from the ibisamp library? Like the car file? That way we can run it locally and better troubleshoot.


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Master
posted Hide Post
quote:
IS NOT ''

Also, maybe try using NE '' instead.
WHERE CUSTOMERS.CUSTOMERS.CUSTOMERID NE '';
  


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Virtuoso
posted Hide Post
Since MASTER file become your main selection table : it's the file that contain only the key field that you want, try with the below JOIN instead (also have included Hallway suggestion).
I would not be surprise that the problem is the JOIN … MULTIPLE

Another point is that in your original JOIN the child file (MASTER) is a none indexed alpha file. This may also cause issue in a JOIN

TABLE FILE CUSTOMERS
SUM CNT.CUSTOMERS.CUSTOMERS.FIELD1 AS 'COUNTS'
BY CUSTOMERS.CUSTOMERS.FIELD1 
WHERE TOTAL CNT.CUSTOMERS.CUSTOMERS.FIELD1 GT 1;
WHERE CUSTOMERS.CUSTOMERS.FIELD1 NE '';
WHERE CUSTOMERS.CUSTOMERS.CUSTOMERID NE '';
ON TABLE HOLD AS MASTER
END
-RUN

JOIN MASTER.MASTER.FIELD1 IN MASTER TAG T1
  TO CUSTOMERS.CUSTOMERS.FIELD1 IN CUSTOMERS TAG T2 AS J1
END

TABLE FILE CUSTOMERS
PRINT T1.FIELD1 AS 'LEGACYID'
      T2.CUSTOMERID
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE SET HTMLCSS ON
ON TABLE PCHOLD FORMAT HTML
END
-RUN


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Guru
posted Hide Post
or only adjust the join:
JOIN
CUSTOMERS.CUSTOMERS.FIELD1 IN CUSTOMERS TO UNIQUE
MASTER.MASTER.FIELD1
IN MASTER TAG J1 AS J1
END  


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 454 | Location: Europe | Registered: February 05, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Schedule Duplicating Records

Copyright © 1996-2020 Information Builders