Focal Point
[SOLVED] Compound Report

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

July 29, 2015, 03:18 PM
Michellelp
[SOLVED] Compound Report
I have three reports that I want to put in to one report. Each report uses the parameter/variable &&TimeFrame; which is used so I can run to get weekly, MTD, and YTD numbers. I have each of my reports set for one of the timeframes. I want to run all three of these reports at once in one report. Is this possible? I tried to put it in a compound report, but each report would run using the same timeframe. Such as all three reports would run as YTD instead of one Weekly, one MTD, and one YTD. Each report on its own has a set &&TimeFrame = value, so when I run the report on its own I don't have to change the parameter because it's already set. I even tried setting this parameter in the text editor code of the compound report before each of the corresponding includes of the reports and it didn't work. Any suggestions??

This message has been edited. Last edited by: Michellelp,


WebFOCUS 8.1.05
Windows, All Outputs
July 30, 2015, 04:12 PM
susannah
michelle, why a && var? why not a & var?
a && is system-wide
a & lasts for the duration of a fex.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
July 31, 2015, 02:50 PM
sh98110
Michellep, when you say … “each report would run using the same timeframe,” what exactly does this mean?

It sounds like you are getting only one amper variable to work- try running the code with –SET &ECHO=ALL; to see how the dialog manager variables are being parsed out.

Just to clarify, your code looks like the following:

  
TABLE FILE one
…
ON TABLE HOLD AS PDFREPORT FORMAT PDF  OPEN
WHERE FIELD EQ &variable1
END

TABLE FILE two
…
ON TABLE HOLD AS PDFREPORT FORMAT PDF  NOBREAK
WHERE FIELD EQ &variable2
END

TABLE FILE three
…
ON TABLE HOLD AS PDFREPORT FORMAT PDF  CLOSE
WHERE FIELD EQ &variable3
END




WebFOCUS 8
Windows, All Outputs
July 31, 2015, 04:19 PM
Michellelp
I think I have found a work around to get all three reports to work in a compound document, now I just have some formatting issues.

Susannah - Anytime I switch it to the local variable I don't get the results I am needing. This may be something that is getting overridden in our MFD, I'm not sure and will have to look at that closer.

SH98110 - These are three separate reports (all independent of each other) set up as follows:

-SET &&TimeFrame = '7DAY'
TABLE FILE one
...
ON TABLE PCHOLD FORMAT HTML
END

-SET &&TimeFrame = 'MTD'
TABLE FILE two
...
ON TABLE PCHOLD FORMAT HTML
END

-SET &&TimeFrame = 'YTD'
TABLE FILE three
...
ON TABLE PCHOLD FORMAT HTML

I then create a compound report using all three reports. I don't want to have to enter parameters, I just want the report to run with the correct parameter set and display all three reports with the correct data.


WebFOCUS 8.1.05
Windows, All Outputs
July 31, 2015, 05:09 PM
Dan Satchell
The first thing FOCUS does when running a program is to resolve any Dialogue Manager statements and variables. It does so until it encounters a -RUN, -QUIT, -EXIT, or end of program. Then it runs the table/graph/modify logic up to the point where it stopped. So if you set the same DM variable in three places in a compound program without any -RUN statements, the variable will be set to the last assigned value before running ALL of the compound report logic. Place a -RUN after each table request to force FOCUS to run the report logic using DM variable values that have been set up to that point. BTW, -SET statements must end with a semi-colon.


WebFOCUS 7.7.05
August 04, 2015, 11:41 AM
Jim Morrow
The three reports could use -DEFAULT to provide value for &&TimeFrame. This would have no affect if the value was established with a -SET.


Jim Morrow
Web Focus 7.6.10 under Windows 2003
MVS 7.3.3



August 07, 2015, 10:38 AM
Michellelp
I was able to add the -RUN after my reports and I messed with the global and local variables a bit for TimeFrame and it seems to be working. I am now just having formatting issues on my compound reports not keeping the HTML format.


WebFOCUS 8.1.05
Windows, All Outputs