Focal Point
HTML page output (3 fexfiles) to Single PDF/Excel
March 26, 2007, 06:33 AM
PrasannaHTML page output (3 fexfiles) to Single PDF/Excel
All,
I had generated 3 reports (fex), and using HTML page option i had shown all the 3 reports in the single page, using !IBI.FIL.
.
Now the user wants to see this 3 reports on excel or PDF.I had seen couple of results in the forum using javascript or focus.But they are making only one report, i mean specific to fex file.Since my report output is displayed in single page as HTML, i need to export this entire page to excel or pdf(all 3 reports' output in singel excel/pdf)
It seems i need to do some work on the HTML page using script.Can any one suggest some good solution for the same.
Regards
R.Prasanna
Dev:
Dev Studio 7.1.6,Report Caster 7.1.1,Servlet
Local:
Dev Studio 7.1.6,Report Caster 7.1.1,Apache 5.0.2,
Win XP
March 26, 2007, 07:01 AM
<JJI>Prasanna,
Why not using compound technique for pdf and Excel. I don't know which version of WF you have but the following example is certainly working in 7.x.
TABLE FILE CAR
SUM SALES
BY COUNTRY
ON TABLE PCHOLD FORMAT EXL2K OPEN
ON TABLE SET STYLE *
TYPE=REPORT, TITLETEXT='Country sales', $
END
TABLE FILE CAR
SUM SALES
BY CAR
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
TYPE=REPORT, TITLETEXT='Car sales', $
END
TABLE FILE CAR
SUM SALES
BY MODEL
ON TABLE PCHOLD FORMAT EXL2K FORMULA CLOSE
ON TABLE SET STYLE *
TYPE=REPORT, TITLETEXT='Model sales', $
END
Now to make it work for both PDF AND EXL2K you could make the format varialble like this:
ON TABLE PCHOLD FORMAT &WFFMT CLOSE
.
This way the user can choose his own format.
The Example will produce an Excel with 3 sheets, each sheet containing the result of 1 report. You can also replace the TABLE FILE code by a -INCLUDE or even a EX (depending on the WF version) The EX will not work in 7.1.1 but works fine in 7.1.3 and higher.
Is this what you were looking for?
March 26, 2007, 07:15 AM
FrankDutchDirk
I tested your example, but it does not work here.
what happens is that I get an excel sheet with the whole html coding in it but no report.
I have tried this before and got the same problem.
Has this something to do with excel versions?
Frank
|
Frank |
| prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7 |
March 26, 2007, 08:16 AM
Danny-SRLJJI, Frank,
No problem here. You should add NOBREAK to your PCHOLD statements for all the output to be on a single worksheet.
Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
March 26, 2007, 09:41 AM
PrasannaDanny
The requirement is once the 3 reports are displayed in the html page, user should be given option to choose for excel/pdf.When i pasted the given code in the procedure and run it, i got the error as
No Query Information to Decode in the html Web browser.Let me know what is the error and also
let me know how the following code works
"ON TABLE PCHOLD FORMAT &WFFMT CLOSE ".Where we set the &WFFMT variable?
Regards
R.Prasanna
Dev:
Dev Studio 7.1.6,Report Caster 7.1.1,Servlet
Local:
Dev Studio 7.1.6,Report Caster 7.1.1,Apache 5.0.2,
Win XP
March 26, 2007, 10:03 AM
LeahDoes the user have to have the html output first? I've found in our environment trying to get a compound report to work was causing headaches until on the last step instead of using the PCHOLD FORMAT &WFFMT, I used the SET ONLINE-FMT &WFFMT which allowed proper display.
Leah
March 26, 2007, 05:18 PM
Danny-SRLPrasanna,
If the TABLE is not too heavy, I would put a drill down in the HTML which is around your IBI.FIL statements. It would rerun the procedure with output to PDF or EXCEL.
Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
March 27, 2007, 04:49 AM
<JJI>Frank, Danny,
Sorry for the late reply. The code as I posted it works perfectly well for me.
If have tested it in Dev. Studio 7.1.3 and also in MRE 7.1.3 both in Excel and PDF. This works like a charme. I need to say that I'm using Excel 2003. I've never tested this with a lower version of MS Excel.
Jan, I don't know if this works in a 5.X version of WF. Need to test that.
Danny, the NOBREAK will not make a difference. It will only put the result in one sheet for Excel and on one page for PDF.
March 27, 2007, 07:16 AM
Tony APrasanna,
I guess, like many of your countrymen, you have been asked to code in a language for which you have had no formal training. This is unfair on you as you will have a very steep learning curve.
Ask your managers for FORMAL training, as then any response you get from this Forum will be more meaningful to you and not just a throw away response that you do not understand.
As you have seen, we try to help as much as we can BUT the responses you get here are best served with a rudimentary knowledge of the language and that will be gained as a result of structured training.
Good luck
T
March 27, 2007, 09:13 AM
PrasannaAll,
I had tried the approach.It is working if i give EXL97, but not working if i give EXL2K.But i am having Excel 2003 in my system.Also if i give EXL97,i am able to see only 1 report and not the 3 reports in the excel format.Any idea why its happening.Any Configuration issues?
Tony:Thanks for your comments.
Regards
R.Prasanna
Dev:
Dev Studio 7.1.6,Report Caster 7.1.1,Servlet
Local:
Dev Studio 7.1.6,Report Caster 7.1.1,Apache 5.0.2,
Win XP
March 27, 2007, 11:33 AM
N.SelphCompound Excel only works with EXL2K, not EXL97. If you have Excel 2002 and above, you should be able to use EXL2K.
(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)