As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at firstname.lastname@example.org and provide your corporate email address, company, and name.
I am trying to build a report to replace a manual process - currently, the team runs bunch of queries and pastes the results in a spreadsheet. They have a set of queries looking for oldest 100 rows and newest 100 rows from a table, looks like this: Select * from table_name where rownum < 101 order by date_column asc (and separate sql with order by as desc for latest 100 rows)
They are going to build a new table with all the table_names and corresponding date_column_names so that I can use that table to populate a dropdown list - I am thinking of building an HTML launch page where they will be prompted for table_name (I will also design a hidden date_column_name parameter so that I can pass that value to the queries. Based on the table they select, I need to run that query and populate results in a spreadsheet.
I tried doing this by creating a SQL pass thru report and using 2 parameters which I can pass: &table_name and &date_column. How would I control all the columns which need to be printed as output? I am stuck! Please help with any ideas.
Thanks in advance!
P.S.: I am using WF 7.7.03This message has been edited. Last edited by: Tamra,
What you seem to be asking about is what some call an "adhoc" or "self-serve" report.
Try this fex file to see how WebFOCUS can handle dynamic field names being passed in for processing:
-DEFAULT &PRINT_OR_SUM_FIELDS='''COUNTRY'' AND ''CAR''';
-DEFAULT &BY_FIELDS='''BODYTYPE'' NOPRINT BY ''MODEL''';
-DEFAULT &ACROSS_FIELDS='''SEATS'' ACROSS ''BODYTYPE''';
-DEFAULT &WHERE_FIELDS='''ENGLAND'' OR ''JAPAN''';
TABLE FILE ibisamp/car
COUNTRY EQ &WHERE_FIELDS.(OR()).WHERE_FIELDS:. ;
ON TABLE SUBFOOT
"Field names and filter criteria used in this report:"
"PRINT or SUM fields: &PRINT_OR_SUM_FIELDS "
"BY fields: &BY_FIELDS "
"ACROSS fields: &ACROSS_FIELDS "
"WHERE filter criteria: &WHERE_FIELDS "
I am using App Studio and WebFOCUS 8.1.05M, so I cannot say if this will help you or not.This message has been edited. Last edited by: Squatch,
App Studio WebFOCUS 8.1.05M Windows, All Outputs
Posts: 594 | Location: Michigan | Registered: September 04, 2015