Focal Point
populate drop down with a procedure?

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

September 28, 2007, 09:49 AM
Jason K.
populate drop down with a procedure?
I've got a drop down list I'm trying to alphabetize by using a procedure with a by field to sort the data.

The problem is that the values from the procedure aren't coming back to the list box. they just bring up a new html window with the report.

I'm really confused on how this works and I'm very new to the html layout tool.

here's what the doc says...
From the HTML Layout Painter, use form controls to supply parameter values for a report.
Click the Parameters tab in the Properties window.
Select Use values from procedure from the Static values drop-down list.
Run the HTML page and select the parameter values from the procedure.

any ideas?


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
September 28, 2007, 10:06 AM
FrankDutch
Jason

Do you use the GUI (Developer Studio?)
If so, it will help you to develop your report.

The alphabetizing must IMO be done in the basic report where you create the records you need in the drop-down list.

I remember to have seen this issue here before.

If the list is very long I would create a drop down before this one that only shows the first letters (a-z) and let users select that one first.




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

September 28, 2007, 10:29 AM
Jason K.
thanks for the reply FrankDutch.
I'm using the gui, that's the problem. I've told it to use values from a .fex, then it runs the fex and brings up the report in a seperate window rather than putting the values in my listbox.

All of your points are good, however. Thanks for the tips.

Any ideas on why this report comes up in a new window rather htan populating my drop down?


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
September 28, 2007, 10:32 AM
Prarie
When I do this...I save the values from the Fex into a hold file and then reference that for the dropdown.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
yes

If you right click on the button that is created to run the dropdown, you will see some settingfields, one of them is the place where the output needs to be presented, you can select an iframe or window, that should be it. (I have the software not available jet, so this is done by head)




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

What Prarie does is what I do too, but according to the manual you should not have to.




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

Make sure that your procedure is returning two values and the hold format is XML.

TABLE FILE CAR
PRINT DST.COUNTRY
BY COUNTRY
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE PCHOLD FORMAT XML
END

The BY field would represent the value for the list and the print field would represent the display value.



Windows: WF 7.6.2: SQL Server 2008 R2
Is the output format in the fex you are using to populate the dropdown box XML? If not, that may be why you are getting a new window.

The syntax should be something like this:

TABLE FILE GGSALES
SUM FST.PRODUCT
BY PRODUCT
ON TABLE PCHOLD FORMAT XML
END

Please check the Developing Reporting Applications Manual, the section on 'Customizing Dynamic Parameters' for details on this.

This technique works very well and it is very effiecient as you can also put WHERE clauses in the code. We use it a lot.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
Thanks for the help!
it's working better now, as I'm created a focus database file and building the dropdown list from that. Unfortunately it's not in alphabetical order!

How do I make it show up in alpha-order?

here's the fex that builds the foc file. When I change it to html, it shows it alphabetical!

APP HOLD ~metadata
FILEDEF LKP_SALESMAN DISK G:\IBI\APPS\~metadata\lkp_salesman.FTM
TABLE FILE LKP_SALESPERSON_MQT
PRINT
SALESPERSON_NUM
BY LOWEST SALESPERSON_NAME
HEADING
""
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
-*ON TABLE PCHOLD FORMAT HTML
ON TABLE HOLD AS LKP_SALESMAN FORMAT FOCUS
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
ENDSTYLE
END


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
Nevermind, it's perfect using Gizmo's example.
Thanks everyone!

I hope IBI puts Gizmo's example in their documents somewhere, that's perfect!


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
Actually, IBI already has this in the documentation and would be very close to what I have. The one exception is that I think they use SUM like Ginny did. I usually use PRINT DST.fieldname since this will translate to distinct in a SQL request which can improve performance.



Windows: WF 7.6.2: SQL Server 2008 R2
I agree, Gizmo. I just copied the code out of the manual. I would use DST. as well, especially against a relational data source.

And, Jason, the example is the the manual, only with an FST. instead of a DST.

Please check the Developing Reporting Applications Manual, the section on 'Customizing Dynamic Parameters' for details on this. You will see the example. Also how to do chained boxes using procedures.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google