Pass parameter to BI report through link in IC webclient
HI
I need to call a BI report through a link in Icwebclient search view.
I need to capture the input field values entered by user in IC webclient search view
by clicking a link or button in the view.How can I call a BI report with these values
without navigating away from the page.?BI report should open in Explorer in new window.
I have writen a code.it is calling BW report.but parametes are not captured in the url.
<htmlb:button id = "Show" text = "Cal " tooltip = "Call"
onClientClick = "window.open('<%=b5%><%=SearchCustomer-GET_CHEQUENO( ATTRIBUTE_PATH = '//SearchCustomer/test' )%><%=b8%>' ,'Invoice','resizable=yes,height=850,width=700,dependent=yes,status=1');"
design = "small"
width = "100" />
</crmic:gridLayoutCell>
please help
john
Hi,
I'm not familiar with the BI reports, But, if your BI report is a BSP component, you can surely navigate to it. One possible way is listed in this wiki.
[http://wiki.sdn.sap.com/wiki/display/CRM/CRM-NavigatingtoyourcustomBSP+component]
The UI object and target IDs may already be available. If that is the case, you can skip that part.
When you fire the outbound plug to trigger a navigation, you can pass a collection consisting of
1. The navigation descriptior object
2. The data you may want to pass to the called component. This may be a value node or a model BO.
The "firing" should be done from the "top level" component or you should delegate the outbound plug to parent windows and the final window should trigger the navigation.
Regards,
Arun Prakash
Similar Messages
-
Passing parameter from interactive report column link to new page
I'm very simply trying to pass the value of the column link to the where clause on the next page.
Interactive Report on P2 has column link fid alias in sql query.
I read somewhere to refer prefix the interactive report column with IR ??
So I have item name P2_FID, value #FID#. Anyway, I've tried a kazillion things.
Created a hidden item with same source value... sigh.
Is there a syntax to refer to a report column link, rather than an item_id in a region where clause?
Is there a simple direct way to do this?
Thanks,
Pamela
-----pls/apex/f?p=163:1:2746459963336955::NO::P2_FID:119Thank you Varad...
Unfortunately, I am still getting no data found. (and there IS data).
a) Do you mean in the link column section of the report attributes? that is done: item 1 name= IR_P2_FID, value = #FID#
b) Do you mean my changing my hidden page item to ir_p2_fid with its source value as #FID# ? also done.
Do I need this hidden item?, and if not how do I refer to link in the where clause of the called page's sql region?
3) Where Fishery_id = :IR_P2_FID
Where Fishery_id = &IR_P2_FID
Thanks again!
Pamela -
Pass parameter to ssrs report in performance point webpart from textbox text
How to pass parameter to ssrs report in performance point webpart from textbox text
Please help me to solve this ...
Bikky KumarEdit your SharePoint page and add new text filter web part.
Then pass the text filter value to your performance point report using connections. Your report should include at least one parameter to get the value. More over you can set default value in text filter. -
Determining the parameters passed in a Discoverer Report through SQL query
Hi,
I want to know the parameters passed in a Discoverer Report through a SQL query.
i.e if we pass the Report name (Workbook Name) then we get the paramaters used .
Is there any way we can do this.
Any help will be really appreciated.
Thanx in advance
AnkurHi
You can indeed get the parameters from the EUL5_QPP_STATS table, although they are extremely difficult to get at.
Look at this script:
SELECT
QS.QS_DOC_OWNER USER_NAME,
QS.QS_DOC_NAME WORKBOOK,
QS.QS_DOC_DETAILS WORKSHEET,
TRUNC(QS.QS_CREATED_DATE) DOC_DATE,
*(LENGTH(TO_CHAR(EUL5_GET_ITEM_NAME(QS.QS_ID)))+1)/9 ITEMS,*
EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),1, 6)) ITEM1,
EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),10, 6)) ITEM2,
EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),19, 6)) ITEM3,
EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),28, 6)) ITEM4,
EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),37, 6)) ITEM5,
EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),46, 6)) ITEM6,
EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),55, 6)) ITEM7,
EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),64, 6)) ITEM8,
EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),73, 6)) ITEM9,
EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),82, 6)) ITEM10,
EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),91, 6)) ITEM11,
EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),100,6)) ITEM12,
EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),109,6)) ITEM13,
EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),118,6)) ITEM14,
EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),127,6)) ITEM15,
EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),136,6)) ITEM16,
EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),145,6)) ITEM17,
EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),154,6)) ITEM18,
EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),163,6)) ITEM19,
EUL5_GET_ITEM(SUBSTR(EUL5_GET_ITEM_NAME(QS.QS_ID),172,6)) ITEM20
FROM
EUL5_QPP_STATS QS--,
-- APPS.FND_USER USR
WHERE
-- QS.QS_DOC_OWNER = '#' || USR.USER_ID AND
*(LENGTH(TO_CHAR(EUL5_GET_ITEM_NAME(QS.QS_ID)))+1)/9 < 21*
AND QS.QS_CREATED_DATE > '01-JAN-2007'
What this does is return the first 20 items used in a worksheet. It does this by passing 6 characters at a time out of a cusror made up by concatenating QS_DBMP0 to QS_DBMP7 to get the Dimensions and then again by concatenating QS_MBMP0 to QS_MBMP7 to get the Measures. Having got that cursor it then takes each 6 characters and passes them to a nibble algorithm to decode the actual item. The code is extremely difficult to follow.
I mention this because other fields in the same table are QS_JBMP0 to QS_JBMP7 which I believe are Joins, and QS_FBMP0 to QS_FBMP7 which look like Filters (aka parameters) being used. I think the QS stands for Query Statistics and BMP for bitmap. Somewhere in the EUL5.SQL script is the key to unlocking this.
Good luck. The reason I say this will become apparent when you look inside EUL5.SQL.
Best wsihes
Mcihael -
Pass parameter to a report link
HI,
This is what I am trying to do:
I want to create a report with 2 parameters - FromDate and ToDate.
The report link will be something like this - http://xyx.com/report1FromDate=1jan2012&ToDate=31jan2012
What I want is the users to change the date range in this URL and the report should automatically filter out the date selected. Is this possible? Has anyone does this before?
So when the user runs this report and wants to run for some other date, they will just modify the URL and the report will run for Feb as an example shown below:
http://xyx.com/report1FromDate=1feb2012&ToDate=29Feb2012
Edited by: 920645 on Mar 21, 2012 11:21 AMIt's not what you're doing wrong, but there is more right you can do.
In the Report, on the Customization Form Display Options Tab, make sure "Make Public" is checked for your Bind Parameter (:CNTRYLOC).
In the Page Properties, on the Parameters Tab, Add a Page parameter for CNTRYLOC. (I usually use the same name for the Page Parameter as the Report's Bind Parm. Warning: These parameters are CASE-SENSITIVE in places.)
Still on the Page Properties Parameters Tab, Expand the list of Portlets at the bottom and map your Portlet Parameter to the Page parameter you just made.
Hope that helps! -
Passing Parameter to Crystal Report
Hi Experts,
I have created and designed a Report in Crystal Report 2005. I am displaying the report in SAP B1 using Win Form . Here I want to pass 2 parameters to Report ---@FromDate and @ToDate . I have coded to pass these two parameters this way :
Dim RptDoc As New ReportDocument
Dim ParamValue As String = String.Empty
Dim crtableLogoninfos As New CrystalDecisions.Shared.TableLogOnInfos
Dim crtableLogoninfo As New CrystalDecisions.Shared.TableLogOnInfo
Dim crConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo
Dim CrTables As CrystalDecisions.CrystalReports.Engine.Tables
Dim CrTable As CrystalDecisions.CrystalReports.Engine.Table
Try
RptDoc.Load(Application.StartupPath() & "\" & ReportName & ".rpt")
RptDoc.SetParameterValue("@FromDate", "01/01/2008")
RptDoc.SetParameterValue("@ToDate", "12/31/2008")
Dim oForm_ReportViewer As Frm_ReportViewer = New Frm_ReportViewer()
oForm_ReportViewer.CRViewer.ReportSource = RptDoc
With crConnectionInfo
.ServerName = oCompany.Server '"(local)"
.DatabaseName = oCompany.CompanyDB '"SBODemoIn"
.UserID = oCompany.DbUserName
.Password = "manager@123" 'oCompany.DbPassword
End With
CrTables = RptDoc.Database.Tables
'Loop through each table in the report and apply the
'LogonInfo information
For Each CrTable In CrTables
crtableLogoninfo = CrTable.LogOnInfo
crtableLogoninfo.ConnectionInfo = crConnectionInfo
CrTable.ApplyLogOnInfo(crtableLogoninfo)
Next
oForm_ReportViewer.Text = frmTitle
oForm_ReportViewer.WindowState = FormWindowState.Maximized
oForm_ReportViewer.ShowDialog()
Catch Ex As Exception
MessageBox.Show(Ex.ToString)
End Try
But When I view the report in B1 , it throws an Exception "Report or Procedure expects parameter @FromDate which is not supplied. "
Please help me where I am making mistake , what could be the cause of this exception..
Thanks and Regards,
Pooja Singh.Hi Pooja Singh,
You have only set Dim ParamValue As String = String.Empty. Where are two parameter @FromDate and @ToDate?
SetParameterValue will only work if you have defined the parameters already and the parameters have the right format.
You may check this thread:
Re: Crystal report open instead of PLD with same form reference.
Thanks,
Gordon -
Passing Parameter from Main report to SQL command-based subreport
I am trying to cut down the run time of my reports and have recently figured out how to write SQL commands to limit the data by filtering prior to being pulled into the reports. However, many of my reports rely on multiple sub reports, which can cause a dramatic 'drag' on the report.
I am trying to filter the SQL command used in my sub report by passing the group parameter, which is selected by the user in the main report, to the sub report's SQL command. Without this parameter, the sub report has to sort through a lot more data than it would with this parameter, making the run time extremely slow.
Any suggestions on how I can accomplish this?
Thanks for any help you can provide,
Marlene Allen
Crystal Reports Developer
Crystal Reports Professional;
Product Type: Full;
Product Version 11.5Hi Marlene,
I don't believe you can pass a CR parameter to a Command object.
I suggest replacing all of the Command Objects with a Stored Procedure so all of the data filtering is done server side. DB servers are much more proficient at collecting the data and filtering than CR will ever be. It will also allow you to replace subreports to also speed up your report processing. All depends on your layout of course but something to look at.
Thank you
Don -
How to pass parameter to DestinationURI of a link?
Hi All,
I have a requirement to generate report by clicking of a link and the report should open in a separate window.
I am facing problem with passing parameter to destinationURI of link.
Using MessageChoice event I am getting parameter value in PFR of controller.
I need to get this parameter in PR of same controller and pass it to destnationUri of link.
Please let me know how to achieve this and suggest me if there is some other approach to meet the requirement.
The code is given below.
public class TestTPCO extends PerfMtCO {
public void processRequest(OAPageContext pageContext, OAWebBean webBean) {
super.processRequest(pageContext, webBean);
String planId = "25463";
if (planId != null) {
OALinkBean oalinkbean =
(OALinkBean)webBean.findChildRecursive("SWC_Report_Link");
oalinkbean.setTargetFrame("_blank");
oalinkbean.setDestination("OA.jsp?OAFunc=SWC_HR_OBJ_REPORT&plan_id=" +
planId );
* Procedure to handle form submissions for form elements in
* a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
public void processFormRequest(OAPageContext pageContext,
OAWebBean webBean) {
super.processFormRequest(pageContext, webBean);
if ("planNameChange".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM))) {
OAApplicationModule am = pageContext.getApplicationModule(webBean);
TMContext tmcontext =
TMContext.getInstance(am.getOADBTransaction());
String planId = pageContext.getParameter("SWC_Plan_Name");
Thanks & Regards,
SunitaHi Prince,
I am not doing form submit.
Handling poplist event in PFR and getting some value and that value I need to pass to link to generate a report.
I am using the following code in CO,
public class TestTPCO extends PerfMtCO {
public void processRequest(OAPageContext pageContext, OAWebBean webBean) {
super.processRequest(pageContext, webBean);
String planId = "25463";
if (planId != null) {
OALinkBean oalinkbean =
(OALinkBean)webBean.findChildRecursive("SWC_Report_Link");
oalinkbean.setTargetFrame("_blank");
oalinkbean.setDestination("OA.jsp?OAFunc=SWC_HR_OBJ_REPORT&plan_id=" +
planId );
* Procedure to handle form submissions for form elements in
* a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
public void processFormRequest(OAPageContext pageContext,
OAWebBean webBean) {
super.processFormRequest(pageContext, webBean);
if ("planNameChange".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM))) {
OAApplicationModule am = pageContext.getApplicationModule(webBean);
TMContext tmcontext =
TMContext.getInstance(am.getOADBTransaction());
String planId = pageContext.getParameter("SWC_Plan_Name");
Thanks & Regards,
Sunita -
Help Needed in passing parameter to cryst report
Hello everyone, I am trying to create a report for a single record and as such am trying to pass parameters to a crystal report but I am not sure exactly how to do this. This is my own method that I am employeeing. I do not want to create a data table and put all the info I need in there and then base a report off of it. I do not want to deal with loops and arrays right now. I just want to pass for example parameter JuvenileID = 1 to my crystal report, then create a command under the database expert and set the parameter for my command to the parameter I passed my crystal report. How would I go about in doing this? I am using VS 2010 C#. This is a windows application. I have a dataentry form that is already populated with the info needed for the report. I just need to pass all the controls.text values to the report and populate it that way.
I'm not sure if I fully understand the issue, but since you have all the data you need in a data entry form that is already populated, why don't you simple create an ADO .NET Dataset and pass that to the report? Much easier to implement, faster execution with the small amount of data you have and less code.
Dataset sample app is here:
https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
More info on datasets is here:
[1511438 - How to use datasets to pass data to crystal reports|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533313331333433333338%7D.do].
- Ludek -
Passing parameter from WEBI report to xcelsius
hi
i transfered the parameter from WEBI report (3.1 sp2) table using a link to a gauhe from xcelsius
i can see the parameter the right number in the gauge value but the problem is that the pin does not moveHow are you connecting your report to Xcelsius? Live Office or QAAWS?
-
How to pass parameter to a report for Operator 'LIKE'
I need to pass a parameter to a report for "LIKE" operator. the parameter for "equal to or is in" operator is 'eq':
'https://secure-ausomxfts.crmondemand.com/OnDemand/user/analytics/saw.dll?Go&Path=/shared/Company_AFTA-D78SR_Shared_Folder/Work Order Asset Lookup&Options=r&Action=Navigate&P0=2&P1=eq&P2=Account.TEXT_61&P3=&p4=
What would 'p1' value for 'LIKE' operator?
ThanksHi, Hope the below helps
neq - Not equal to or not in
lt - Less than
gt - Greater than
ge - Greater than or equal to
le - Less than or equal to
bwith - Begins with
ewith - Ends with
cany - Contains any (of the values in &P3)
call - Contains all (of the values in &P3)
like - Is like (Type %25 rather than the % wildcard)
top - In the top n (&P3 contains 1+n, where n is the number of top items)
bottom - In the bottom n (&P3 contains 1+n, where n is the number of bottom
items)
bet - Between (&P3 must have two values)
null - Is null (&P3 must be 0 or omitted)
nnul - Is not null (&P3 must be 0 or omitted)
Venky CRMIT -
Unable to pass parameter in oracle procedure through unix shell script
Hi Experts,
I have oracle procedure where in I have to pass the value of procedure parameter through unix script.
Follwoing is the sample procedure which i tried to exceute from the unix.
Procedure:
create or replace procedure OWNER.PRC_TESTING_OWNER(OWNER IN VARCHAR2) AS
sql_stmt varchar2(1000) := NULL;
v_count number := 0;
v_owner varchar2(100) := owner;
begin
sql_stmt:='select count(1) from '||v_owner||'.EMP@infodb where rownum<=10';
execute immediate sql_stmt into v_count;
DBMS_OUTPUT.PUT_LINE(sql_stmt);
DBMS_OUTPUT.PUT_LINE(v_count);
END;The script which I used is:
Unix
#!/bin/ksh
parm=$1
echo start
sqlplus -s scott@DEV/tiger <<EOF >>result_1.txt
set serveroutput on;
select '$parm' from dual;
exec owner.PRC_TESTING_OWNER('$parm');
EOFThe script is working fine that is i am able to pass to parameter value through unix shell script. :)
But if I want to pass the value of the owner in cursor , I am unable to pass this value through unix.
Following the procedure which i am trying to implement.
create or replace procedure OWNER.PRC_TESTING_OWNER(OWNER IN VARCHAR2) IS
v_owner varchar2(100) := owner;
CURSOR main_cur IS
select
i.ROWID rid ,
emp_name,
deptid
from v_owner.employee;
CURSOR subset_cur(c_deptid NUMBER ) IS
SELECT *
FROM v_owner.DEPT d
where d.dept_id=c_deptid;
--##main loop
FOR i IN main_cur LOOP
FOR j IN subset_cur(i.deptid) LOOP
BEGIN
insert into v_owner.RESULT_TABLE
END;
END LOOP;
END LOOP;How can i pass parameter value of the stored procedure through unix script(that is "owner" in this case), when these parameter value is
used in cursor? :(
Can anybody help me regarding the same?
Thanks in Advance !! :DIt's not the parameter in the cursor that is the problem, it's that you are trying to use static SQL for something that won't be known until run time (the owner of the table).
You would need to use something like ...
declare
l_owner varchar2(30) := 'SCOTT';
l_ref_cursor sys_refcursor;
type l_ename_tab is table of scott.emp.ename%type;
l_ename_array l_ename_tab;
begin
open l_ref_cursor for
'select ename
from ' || l_owner || '.emp';
loop
fetch l_ref_cursor bulk collect into l_ename_array limit 10;
exit when l_ename_array.COUNT = 0;
for x in 1 .. l_ename_array.count
loop
dbms_output.put_line(l_ename_array(x));
end loop;
end loop;
close l_ref_cursor;
end;
SMITH
ALLEN
WARD
JONES
MARTIN
BLAKE
CLARK
SCOTT
KING
TURNER
ADAMS
JAMES
FORD
MILLER
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.01 -
Pass query to the report through form
Hello everybody...
I m using forms and reports 6i.
I create query through form depends on user selection.
Means user select specified columns from specific table. And finally i create complete query.
Now i wanna pass that query to report builder and wants to generate automatic report depends on that query.
Can anybody have idea how to do this?
How to pass query from form and generate report.
If any1 knows then please help meYou should pass all columns but with separator character i.e.:
supl_cd||';'|| supl_name ||';' city ||';'|| add1 ||';'|| add2 ||';'|| pincode ||';'|| country my_column
You should also pass column names if you want and get them back using the same procedure.
Procedure for retrieving should use instr,loop and srw.do_sql, if you don't know what is SRW built in package, then take a look in report's help. That's a pity that there is nothing similar in forms. You can use dynamic select to pass values exactly to the report's variables:
for i in 1..10 loop
srw.do_sql('select '||i||' into :cp_'||i||' from dual');
end loop;
Jakub Flejmer -
Most urgent:::: passing parameter list to reports containing record groups
hi
can any one help me , i am getting frm-41214 when i pass a paramter list containing record group as data parameter to run_report_object as parameter, calling report from forms 10g, but when i dont pass the parameter list the report runs displaying no data(as it should do), otherwise it dont run and display the frm-41214
zulfiqarHi!
To suppress Oracle Reports native Parameter Form just add:
add_parameter( pl_id, 'pARAMform', text_parameter, 'NO' );
Andrew Velichko
Brainbench MVP for Oracle Developer 2000 http://www.brainbench.com
null -
Passing multiple paremeters from report through WESubmitLink or WEOpenInTargetLink
<p>Hello,</p><p>I am trying to pass multiple parameters from one report to another through the WEOpenInTargetLink and WESubmitLink formulas without having the user prompted.</p><p>I can do this using conventional CR methods with change subreport links by simply passing a static value with the same name as the parameter. This passes the parameters to the subreport without prompting. I would like to do the same with the aforementioned formulas.</p><p>is this possible? if so, how? I cannot find any method for doing this in the docs or online.</p><p>Thanks. </p><p> </p>
<p>hello, this is indeed possible and one of the main uses of webelements.</p><p>in your case you do not want to use WEOpenInTargetLink as this function is specifically designed for a named browser window or iframe. </p><p>when you are targeting another report, use the WETargetPath function that is in the main webelements folder...placed there as it is a key function to pass values back and forth.</p><p>have a look at the Simple Example report that is in the webelements download. the one thing you would change is the target report though so that the formula containing the submit button would look something like</p><p>stringvar path:= WETargetPath ("rpt", "Name", "insert your target report name", "");<br />WESubmitButton ("Update", path, "");</p><p>jamie</p>
Maybe you are looking for
-
Who else has been lied to??
Does verizon even remotely understand customer service?? I say NO!! I have had nothing but problems since changing plans to the everything(should be called nothing) plan. I was told my bill would be a certain amount.. nope. Due to a verizon store
-
Message Mapping UDF for lookuping of a value inside field's list of values
Hey everyone, For a FI mapping I'm working on, I was wondering if somebody has some Java UDF which lookups for a value inside the whole list of values which the mapping gathered for a specific field? Thanks, Ben
-
Taking a screenshot of StageWebView for websites running a plugin?
I've been trying to take a screenshot of an instance of StageWebView for websites with embedded SWF and PDF content on the Android. The method drawViewPortToBitmapData works fine for regular websites after enabling hardware acceleration in the manife
-
Overflow Map has received an inexplicable event from the front map
Hello, I am posting this to ask if someone can shed additional light on this error. Is it due to incorrect usage of the SafeNamedCache or an internal error? 2006-12-07 20:33:59.190 Tangosol Coherence 3.1/339 <Warning> (thread=RMI TCP Connection(3)-12
-
Probable bug in Kodo class handling code (Beta 2.2)
I have a test class "Widget" that has two attributes, name and mark. I am encountering a curious error in the no-args constructor under some circumstances that looks like a bug. public class Widget private static Random random = new Random(); private