tips and tricks for customizing portal reports portlet modules peter koletzke technical director...
TRANSCRIPT
![Page 1: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/1.jpg)
Tips and Tricks for Customizing Portal Reports Portlet Modules
Peter KoletzkeTechnical Director & Principal Instructor
Visit the Quovera table for more info.
![Page 2: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/2.jpg)
2
If you wish to make an improved product, you
must already be engaged in making an inferior one.
Second Law of Serendipity
![Page 3: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/3.jpg)
3
Survey
• Oracle Portal work– Portal reports?– Dynamic pages?– Portal forms?– Calling Oracle Developer
forms (FMBs)?– Calling Oracle Developer
reports (RDF)?– Calling J2EE apps?
![Page 4: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/4.jpg)
4
Agenda
• Reports Portlet overview
• Creating the definition - annotated
• Tips, gotchas, workarounds
• Alternatives to Reports Portlet
Note: Sample code files available in the presentation zip file on the Quovera and
NoCOUG website.
Releases: 9i (9.0.2),
10g R1 (9.0.4),10g R2 (10.1.2)
![Page 5: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/5.jpg)
5
Portal Reports Portlet Basics• Call RDF files from a Portal link
– “Report Definition File Access” • The Portal name
– Validates security of user– Presents a parameter form
• Text fields• LOVs (poplists)
• Report definition created in Portal development screens– Generates PL/SQL package to display
parameter form and to call Reports Server
![Page 6: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/6.jpg)
6
BusinessDatabase
Portal Reports RuntimeiAS
Database
mod_plsql
Browser
ReportsServlet
Portal link Report
package
Procedure call URL
Parameter Form
Reports RDF file
cgicmd.datscottcgi: userid= "scott/tiger@orcl" %*
ReportsRuntime
Run
Report results (HTML, PDF)
Tables and
views
App Server
![Page 7: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/7.jpg)
7
Creating the Definition• Create custom template first
– Use your logos and design elements– This is not used at runtime by default
• Also create LOVs in Portal– Use them on the report Parameters page
• Two methods for creating the definition– Copy an existing report definition
• Use the Manage tab of the Manage page• Parameter values are not copied
– Reset the values on the Customize page
– Create one from scratch • Screens follow
![Page 8: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/8.jpg)
8
Agenda
• Reports Portlet overview
• Creating the definition - annotated
• Tips, gotchas, workarounds
• Alternatives to Reports Portlet
![Page 9: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/9.jpg)
9
Creating a Definition• Find Reports Definition portlet
– In Builder (Reports Security) or in the Portlet list
• Click Create Reports Definition File Access
![Page 10: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/10.jpg)
10
Creating the Definition – Page 1
![Page 11: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/11.jpg)
11
Creating the Definition – Page 2
![Page 12: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/12.jpg)
12
Creating the Definition – Page 3
Create this beforehand
Desformat
![Page 13: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/13.jpg)
13
Creating the Definition – Page 4
Create this beforehand
![Page 14: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/14.jpg)
14
Tips for Creating the LOV
This is ignoredfor reports. Only
poplists are available
Must be “No”for reports
Use this for a “blank” item. Needs a value. NULL won’t
work for reports (will work for Portal reports and forms).
Do this before starting the Reports definition wizard
![Page 15: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/15.jpg)
15
Creating the Definition – Page 5
Interesting idea
![Page 16: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/16.jpg)
16
Creating the Definition – Page 6
This is ignored
Finish generatesthe report PL/SQL
package.
Note: Every time you save a report definition, Portal
rewrites the PL/SQL package.
![Page 17: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/17.jpg)
17
Creating a Link – Page 1 • Click Add Item in a page group page
![Page 18: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/18.jpg)
18
Creating a Link – Page 2
At Runtime
![Page 19: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/19.jpg)
19
Agenda
• Reports Portlet overview
• Creating the definition - annotated
• Tips, gotchas, workarounds
• Alternatives to Reports Portlet
![Page 20: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/20.jpg)
20
Visit the Customize Page
![Page 21: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/21.jpg)
21
Check the parameters to
display. Click Save Parameters (this also saves the values you
place here).
Be careful of values in non-displayed
parameters.
LOV
Database connection
token stored inoracle_ home/
reports/ conf/
cgicmd.dat
Desformat?
Customize PageNotice the template
![Page 22: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/22.jpg)
22
Click the New Link
• Where’s my template?
• How do I get rid of Builder and Navigator links?
• Can I show the report name?
• How do I remove the Schedule tab?
• Can I add a prompt hint?
• How do I change the buttons?
• Desformat?
![Page 23: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/23.jpg)
23
Builder
![Page 24: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/24.jpg)
24
Navigator
![Page 25: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/25.jpg)
25
As a Review: The Customize Page
![Page 26: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/26.jpg)
26
Layout Gotchas• Layout is very basic
– Fields are laid out in a single column– Fields can only be text items or pulldown lists (poplists)– No popup LOV windows or shuttle controls– Field prompts are very basic
• The template you define will not be used at runtime (only on the Customize page)– Oracle template used (Oracle logos and copyright)– Builder and Navigator links displayed
• Users can see development areas
• No declarative way to change the button labels that a user sees– Portlet defaults are Apply, OK, Cancel– Huh?
• Desformat prompt cannot be defined
Still true as of 10g R2
![Page 27: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/27.jpg)
27
Changing The DESFORMAT Prompt
• Prompt is stored in internal Portal table– WWNLS_STRINGS$– Protected by a policy (you can’t update it)
• Technique to make the change– Identify the subscriber ID and ID– Run a procedure that disables policies,
updates the table, and enables policies
• Sample: – desformat_prompt.sql
• Global to all reports
Documentedon MetaLink.
![Page 28: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/28.jpg)
28
New Prompt
![Page 29: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/29.jpg)
29
For Other Changes, Modify the Reports Definition Package Code
• Back up the package code first– If you edit the report definition later, you will need to
reapply the modifications
• Changing code in various procedures– show_tabpage and show_parms_internal– Samples in report_package_edits.txt
• Also, adding buttons to the template– Sample in industrial_template_buttons.txt
• Set the access method (item or parent) before starting– This changes the package code
![Page 30: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/30.jpg)
30
New Parameter Form• Report title
• Modified buttons
• No schedule tab
• Hints on prompts
• No Builder and Navigator links
• Your template
• No Desformat
![Page 31: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/31.jpg)
31
Validating Parameters
• Validation Trigger page 6 does not do anything
• Post-generation change– In the report database package body, find the
show procedure– After calls to validity_check(), add a validation
block that adds error messages– You need to do your own date format checking– Sample in validity_check.sql
• If you edit and save a change to the report definition, this is overwritten
![Page 32: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/32.jpg)
32
Tip: Releasing Edit Mode• Click Edit from the Manage page
• Click Back– Report definition is now in Edit mode– No one else
can edit it– To fix, click
Edit, thenclick Close
– ReleasesEdit mode
![Page 33: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/33.jpg)
33
Other Methods – JavaScript Self-reducing
poplist
Auto-selected poplist value. Usethis to default aparameter value
or to remove a value.
Use the same embedded HTML technique for
separator lines.
Hide and displayfields dynamically
![Page 34: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/34.jpg)
34
JavaScript Code Required
• onLoad() function on the BODY tag in the template– JavaScript added to report package code– Default poplist selection– Disable or hide items
• Poplist selection changes the display– Self-reducing poplists (country/state-province) –
add code to report package– Hide fields and display fields based on
poplist value
• Sample in magic_providers.html
![Page 35: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/35.jpg)
35
Limiting the Query Based on User
• Database user for Reports connection defined by the cgicmd.dat servlet key
• To associate a user with the session, get the Portal user – wwctx_api.get_user
• Pass the user as a Reports parameter• Add that parameter to the query
– Or set the user name into a context and read the context in a database VPD policy function
• Sample for setting the parameter in validity_check.sql
![Page 36: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/36.jpg)
36
Agenda
• Reports Portlet overview
• Creating the definition - annotated
• Tips, gotchas, workarounds
• Alternatives to Reports Portlet
![Page 37: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/37.jpg)
37
Dynamic Page
Shuttle control.Same technique used for multi-
selectcontrol.
![Page 38: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/38.jpg)
38
Code Required• Portal dynamic page – not Reports portlet
– Calls a package that builds the page a line at a time• Layout capabilities are unlimited
– Multi-column– Any stylesheet style– Unlimited JavaScript capabilities
• All code is up to you– Code it in HTML first– Run WebAlchemy for starting code
• http://www.users.bigpond.com/ahobbs/
• Samples– demo_shuttle.html – demo_dyn_form.txt
![Page 39: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/39.jpg)
39
UIX Form• UIX parameter form calling reports server
– View object for parameter fields
• The trick is working out the URL– Examine the URL from other working reports
• SSO will protect the content– Report package not needed for that
• Create Struts action to interpret the Run button click– Retrieve elements from binding to get
parameter values– Build up the URL with parameter values– Sample URL in sample_url.txt
![Page 40: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/40.jpg)
40
HTML DB
• Hot new kid on the block
• You can develop reports with it– PL/SQL based as is Portal reports
• Same for forms
• Can call Reports RDF files– No native feature yet– Apparently documented on OTN
• Anyone done this?
![Page 41: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/41.jpg)
41
Whatever it is that hits the fan will not be evenly
distributed.
—Anonymous
Law of Probable Dispersal
![Page 42: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/42.jpg)
42
Summary• The Portal Reports Portlet works but its
user interface is very basic• If you use it, you need to apply
workarounds to the portlet bugs• Some customizations require some low-
level code modifications– Keep backups of the packages– Don’t tell Oracle Support
• Consider dynamic pages instead– Or UIX pages or Portal forms or
HTML DB
![Page 43: Tips and Tricks for Customizing Portal Reports Portlet Modules Peter Koletzke Technical Director & Principal Instructor Visit the Quovera table for more](https://reader036.vdocuments.us/reader036/viewer/2022062515/56649cc25503460f9498980d/html5/thumbnails/43.jpg)
43
DesignerHandbook
DesignerHandbook
DeveloperAdvancedForms & Reports
DeveloperAdvancedForms & Reports
JDeveloper 3HandbookJDeveloper 3Handbook
ORACLE9iJDeveloperHandbook
• Founded in 1995 as Millennia Vision Corp.
• Profitable for 7+ years without outside funding
• Consultants each have 10+ years industry experience
• Strong High-Tech industry background• 200+ clients/300+ projects• JDeveloper Partner• More technical white papers and
presentations on the web site
http://www.quovera.com
Books co-authored with Dr. Paul Dorsey Personal web site:
http://ourworld.compuserve.com/ homepages/Peter_Koletzke
ORACLEJDeveloper 10gHandbook
Also co-authoredwith Avrom Roy-Faderman
Please fill out the evals