on 2010 Jul 19 7:45 AM
I want to build a report.
I found a reference to building a report but cant find any simple examples to work through.
I know how to setup a grid but how do i setup labels, Headers etc so that they are sourced from a query?
Basically I want to have a report that looks like this (all items in <> are from the database)
<RepotName> - <ReportDate>
<RepotNotes>
Table Header Row
<LineItems>
Table Foooter Row
Request clarification before answering.
Hi Chris,
Please refer to the 11.5 help for more information about creating reports using a servlet call
http://help.sap.com/saphelp_xmii115/helpdata/en/index.htm
Do a search on Report Generation. The help explains the process. For an example stylesheet, you can enter this in the browser:
http://[servername]:[port]/XMII/Stylesheets/IllumRowsetTable.xsl
This directory contains a number of stylesheets you can use a reference to build your own You can find the paths to via the Navigation Editor (pretend you are adding a new link, browse, and on the Web Root tab of the File Browser you will see the Stylesheets directory). Then, you can builld the url as above and when it opens in the browser, do a File -> Save As, save to your desktop and then import into your MII Project.
I believe these same stylesheets are also available in the MII Sample Project
http://www.sdn.sap.com/irj/scn/downloads?rid=/library/uuid/801e9072-ae80-2a10-5e90-8ee2e4f703ca
Kind Regards,
Diana Hoppe
Edited by: Diana Hoppe on Jul 20, 2010 10:44 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chris,
You can also use a servlet call, which uses a query template and a xsl stylesheet in lieu of a display template to build your report. I'm not sure what version of MII you are using, but the Wizards in the 12.1 Workbench (or a separate download from the SDN for 12.0) have a Report tool to assist you in generating the proper code for the servlet.
This was a little intimidating for me at first, but I used one of the stylesheets included in the product as a model for creating my own stylesheet, and it worked beautifully. Please let me know if you would like a bit more information on doing this.
Kind Regards,
Diana Hoppe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Chris,
you can download the Productivity Wizards for MII 12.0 from the following link:
[http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/c0f1fdb7-b080-2a10-3ba4-ac0bd069ce41 [original link is broken]].
After installing, open the Content Generation Wizard. There you can use the Create HTML for your needs. For more info see the [SAP Help on Wizards|http://help.sap.com/saphelp_xmii120/helpdata/en/45/90abe2f82140bfe10000000a1553f7/frameset.htm].
Michael
Chris,
If your report is going to be printed, you may want to investigate the [PDF actions |http://help.sap.com/saphelp_xmii120/helpdata/en/45/1d996b0f515352e10000000a114a6b/content.htm]that are available. Just a thought....
Kevin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Chris,
if you want to get the Report header content from a database, you may use a query that fetches all contents values in one query, and then use Javascript to get the values into the fields where you need them. E.g. use the function
document.applet.getGridObject().getCellValue(rownum,colnum); (see also [iGrid Component Methods|http://help.sap.com/saphelp_xmii120/helpdata/en/44/d1e7a599f3409fe10000000a11466f/frameset.htm])
to get a specific value from the grid. You can hide the grid by setting the width attribute in the applet to zero.
If the header values of your report do not change, you may also use the [MII Localization|http://help.sap.com/saphelp_xmii120/helpdata/en/44/21f2bb76691c9de10000000a11466f/frameset.htm] for those values.
Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.