Focal Point
[CLOSED] Schedule Not Working to Email and XLSX

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8757013986

February 15, 2018, 07:56 AM
LeonW
[CLOSED] Schedule Not Working to Email and XLSX
Hi,

I have build a compound report from the same table and when I run it from APPSTUDIO, I get the report with the 2 tabs/sheets on. But when I try schedule it, I get no report. If I then remove the second report (to get the second sheet), I get the report. I have used the ON TABLE PCHOLD FORMAT XLSX OPEN and ON TABLE PCHOLD FORMAT XLSX CLOSE method and have tried the SET COMPOUND = OPEN and SET COMPOUND = CLOSE method but none are working.

Currently on 8105m and Linux install

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


WebFOCUS 8105 - APPSTUDIO,
Windows, All Outputs
February 15, 2018, 08:20 AM
LeonW
So, I found the below and it worked .. but a)why and second I now get the schedule twice ?

jcannavo
Platinum Member

posted Apr 5, 6:01 PM Hide Post

Hello,

One thing you could try is to override the format within the caster schedule. Open the schedule and edit your task (which should be calling your FEX). Within there you should find Report Properties, try checking the box that says "Override the Format Specified in the Procedure" and choose EXL07.

For some reason I think once upon a time I had to do that for a report to work. Just something to try.

JC
WebFOCUS Dev Studio / App Studio
8.1.05M
Windows 7


WebFOCUS 8105 - APPSTUDIO,
Windows, All Outputs
February 15, 2018, 09:02 AM
Tony A
Hi Leon,

When you override the output format within your task, you are overriding the COMPOUND component as well. As your task is then, essentially, two reports .....

Scheduling compound reports and trying to burst them will not work because the burst occurs on the first BY field of the report and you are compounding your output - no one BY field to burst upon!

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
February 15, 2018, 09:09 AM
LeonW
Thanks, challenge is if I dont do this, I get no output or mail or report when the schedule runs.


WebFOCUS 8105 - APPSTUDIO,
Windows, All Outputs
February 15, 2018, 09:36 AM
Tony A
Very true, and this is something that many schedules might encounter.

The issue, of course, is the requirement to burst. Add compound into the mix and things start to become challenging.

One method is to call a schedule with the burst value and add the distribution to the relevant recipient. You could do this by reading through your distribution file and calling DSTRUN for each burst value encountered whilst adding the email recipient into a transcient distribution list.

The problem then is that if you fire off lots of DSTRUN calls, each one has the potential of using the wrong distribution list when it eventually runs. So what do you do?

You could delay the call of the next DSTRUN until the previous one has finished - a couple of methods of doing this - each with its own pitfall(s).

A better method would be to harness the WF8.1 ability to use &variables within controls of the Report Caster GUI.

For instance, how about changing the distribution from Distribution List/File to Email Recipient? Change the recipient email address to &EMAILADDR.

Now when you read through your Distribution File, you can pass both the Burst value and the email address as the value for &EMAILADDR. This will result in each DSTRUN call containing the recipient email address specific to the Burst value.

Not only that but you could add the Burst &variable to the subject line making for a more meaningful subject line of the resultant email.


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
February 16, 2018, 04:37 PM
jcannavo
I still don't understand why doing the override works when it doesn't without overriding.

One of the reports I have scheduled using the override method is indeed a compound report. I have 3 sheets, and it works just fine sending out as one file. My schedule's were created and are ran via DEV Studio though. Not sure if that makes a difference or not. Nor does that really offer much help if you're already on App Studio.


JC
WebFOCUS Dev Studio / App Studio
8.2.01
Windows 7
February 16, 2018, 05:04 PM
jcannavo
Just to test again, I created a quick and dirty three-sheet XLSX using the CAR file:

TABLE FILE CAR
PRINT
     CAR.COMP.CAR
     CAR.CARREC.MODEL
     CAR.BODY.BODYTYPE
     CAR.SPECS.LENGTH
     CAR.SPECS.WIDTH
     CAR.SPECS.HEIGHT
     CAR.SPECS.WEIGHT
     CAR.SPECS.WHEELBASE
WHERE CAR.ORIGIN.COUNTRY EQ 'ENGLAND';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT XLSX OPEN
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
     TITLETEXT='Dimensions',
$
ENDSTYLE
END

TABLE FILE CAR
PRINT
     CAR.COMP.CAR
     CAR.CARREC.MODEL
     CAR.BODY.BODYTYPE
     CAR.SPECS.FUEL_CAP
     CAR.SPECS.MPG
WHERE CAR.ORIGIN.COUNTRY EQ 'ENGLAND';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT XLSX
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
     TITLETEXT='Fuel_Efficiency',
$
ENDSTYLE
END

TABLE FILE CAR
PRINT
     CAR.COMP.CAR
     CAR.CARREC.MODEL
     CAR.BODY.BODYTYPE
     CAR.SPECS.BHP
     CAR.SPECS.RPM
WHERE CAR.ORIGIN.COUNTRY EQ 'ENGLAND';
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT XLSX CLOSE
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
     TITLETEXT='Power',
$
ENDSTYLE
END


When I scheduled and DID NOT override the format just like you mentioned I didn't receive a report. However, when I updated the schedule and did the override:



I ran the schedule and received one email with the proper file attached. Other than DEV/APP Studio difference not sure what else could be the issue.


JC
WebFOCUS Dev Studio / App Studio
8.2.01
Windows 7
February 19, 2018, 12:01 PM
LeonW
Thanks for the feedback.


WebFOCUS 8105 - APPSTUDIO,
Windows, All Outputs