Styling report rows using the query result
Hello, is it possible to style a row in a report using the values returned by the underlying sql query?
For example, if my query returns a column called ROW_CLASS I would like to use the placeholder #ROW_CLASS# to style the row, e.g. specifying the row class.
Apparently such row attributes are not available to the apex developer. For each single column value I can set the "Tabular Form Attributes" and "Column Formatting", but I cannot set anything on the whole row.
In other words I can style the TDs but not the TRs.
I think this is clearly a "missing feature" that should be there, single the APEX engine that turns the query result into the HTML that displays the table can already access the column values via their placeholders. It would be sufficient to add some "row attributes" or "row class" field in the report.
It could be used for lots of useful things, in my particular case, highlighting rows that contain errors.
Also there is no way to perform that operation in CSS (e.g. get the TRs which contain at least one TD of class "ROWERROR"). I know it could be done in JS, but that's very messy for such a simple declarative problem.
GChierico wrote:
Hello, is it possible to style a row in a report using the values returned by the underlying sql query? Yes, for standard reports, using custom report templates: +{thread:id=2493917}+
Interactive reports require the use of Dynamic Actions/jQuery.
Similar Messages
-
Need to hide rows in the Query results with blank values
Hi All,
We have a requirement like this for Stock Report, we need to display both movements and balance in that report. We display the movement data directly from the Standard cube with input as Fiscal period/year. When we do like this, we are not able to get the opening balance as fiscal period was in char restrictions pane.
We have created a dummy keyfigure restricted to Fiscal period ( so that the global filter is not applied and get the inventory data irrespective of fiscal period input ). We have created 3 variables of processing type customer exit and acheived calculating opening balance, current movement and closing balance.
If FP input is 009.2010 to 010.2010, it will get whatever Qty moved before 009.2010 ( 001.1990 - 009.2010 in exit ) as opening balance and closing balance ( 001.1990 - 010.2010 ) and the Qty KF restricted with another exit varibale ( 009.2010 to 010.2010 ).
Hope everyone understood the scenario and issue here is, though I give the input 009.2010 - 010.2010 , I get the rows displayed for different periods ( this is because I am retreiving data for all the fiscal periods but restricting it based on input ). How to restrict/hide these rows.
Your inputs and suggestions are valued.
Thanks,
Chandra.Hi,
Try creating a query level field which would populate as "X" (with the IF condition ) if the record falls in the period which you have given for input variable (009.2010 - 010.2010). Then place a query level filter for this field where only records with value "1" for this field is displayed.
Hope this helps.
Happy to help further.
Regards
Venky -
How to get the query result of improvement (Before and After ) using sql de
how to get the query result of improvement (Before and After ) using sql developer.
Check
http://www.oracle.com/technetwork/articles/sql/exploring-sql-developer-1637307.html -
Using CTRL + F not working to find any text within the query result
Hi friends,
I am trying to use find option to find any text within the result section of a query but when I do CTRL+F the find window appears and I can input the text that I wanted. But when I press Enter it is not giving me any result though the entered text
is in the query result. I am using Sql Server 2012 Management studio. Any Body please help me. There is a job that I have to search certain things after running a script and now I am doing copy paste to excel and doing searching from there.Prashant,
Looks like you are trying to do in SSMS, and it is because the result set is in Grid view , if you want to use CTL + F then your result should be in Text format, try to do using CTL + T ( To get result in Text) and then use CTL + F to find any
text.
Thanks
Manish
Please click Mark as Answer if my post solved your problem and click
Vote as Helpful if this post was useful. -
Using the client result cache without the query result cache
I have constructed a client in C# using ODP.NET to connect to an Oracle database and want to perform client result caching for some of my queries.
This is done using a result_cache hint in the query.
select /*+ result_cache */ * from table
As far as I can tell query result caching on the server is done using the same hint, so I was wondering if there was any way to differentiate between the two? I want the query results to be cached on the client, but not on the server.
The only way I have found to do this is to disable all caching on the server, but I don't want to do this as I want to use the server cache for PL/SQL function results.
Thanks.e3a934c9-c4c2-4c80-b032-d61d415efd4f wrote:
I have constructed a client in C# using ODP.NET to connect to an Oracle database and want to perform client result caching for some of my queries.
This is done using a result_cache hint in the query.
select /*+ result_cache */ * from table
As far as I can tell query result caching on the server is done using the same hint, so I was wondering if there was any way to differentiate between the two? I want the query results to be cached on the client, but not on the server.
The only way I have found to do this is to disable all caching on the server, but I don't want to do this as I want to use the server cache for PL/SQL function results.
Thanks.
You haven't provided ANY information about how you configured the result cache. Different parameters are used for configuring the client versus the server result cache so you need to post what, if anything, you configured.
Post the code you executed when you set the 'client_result_cache_lag' and 'client_result_cache_size' parameters so we can see what values you used. Also post the results of querying those parameters after you set them that show that they really are set.
You also need to post your app code that shows that you are using the OCI statements are used when you want to use client side result cacheing.
See the OCI dev guide
http://docs.oracle.com/cd/B28359_01/appdev.111/b28395/oci10new.htm#sthref1491
Statement Caching in OCI
Statement caching refers to the feature that provides and manages a cache of statements for each session. In the server, it means that cursors are ready to be used without the need to parse the statement again. Statement caching can be used with connection pooling and with session pooling, and will improve performance and scalability. It can be used without session pooling as well. The OCI calls that implement statement caching are:
OCIStmtPrepare2()
OCIStmtRelease() -
Result Row in the query output
Hi,
If I restrict a characteristic by hierarchy then I cant have the result row displayed. If the hierarchy active is removed then the result row gets displayed. All characteristics are marked to show the result row.
This characteristic is Account Number. If in the query definition I remove the restriction on account numbers and just select hierarchy active and the required hierarchy in the properties then I get the result row in the output. But now it also displays all the unassigned account numbers in a separate node Not Assigned Account Number (s).
I cant even restrict it in the output with hierarchy active selected. When I do select filter value in the output the options Include in Selection and exclude from Selection are grayed out and hence cant select it.
Please advice on this issue
Thank you,
samHi Jaya,
I think you misunderstood my issue.
My problem is not that i do not want to see the field. But instead, i do not want to see only the results row in the query output.
I need to have the results to populate a calculation via sumct formula.
My question is, can sumct be populated if i hide/supress RESULT row ?
Regards,
Maili -
Using the Query Partitioning Technique for calling reports from forms.
Hello everyone,
I am having problems using the Query partitioning technique which does not work (??) on the web environment. It seems like you are currently using it. However, I'm not sure whether you have tried this on the web environment. Anyway, see if you can help me please.
I am populating a record group using data from a form and then pass it as a data parameter to report.
I use the following codes:
Add_Parameter(list_id,'Q_1',DATA_PARAMETER,rg_name); /* rg_name is my record group */
repid := find_report_object('myrep');
v_rep := RUN_REPORT_OBJECT(repid, list_id); /* list_id is my parameter list */
In client-server mode, I set the report destination type to preview and it works fine. Data from the record group are displayed in the report.
To run it on the web environment, I use the following properties:
Report destination type: cache
Report server: repserver
I get no output and the Reports Queue Manager shows the following:
Description:
Name: /test/pfs/kn/rep/kn211rp0.rdf
Owner: dev6
Destination: Cache Only
Destination Name:
Status:
Current status: [Repserver] Terminated with Error
REP-0076: Internal failure in product integration.
Thank you again for a reply
Kind Regards
Yogeeraj Degambur
PS. I am working on the HP-UX environment. Versions: Dev6i patch 5a, Oracle 8.0.5hello,
check the whitepaper "Oracle9iAS Forms Services 6i and Reports Integration" which can be found on otn.oracle.com/products/forms
regards,
the oracle reports team -
How to ensure that the query results are fetched from the BW acclerator.
Hi Experts,
Suppose if i want to execute the query with BIA option, I can achieve it in RSRT .
1)But is there some query settings or properties where we can make sure that whenever a query(say Q1) is executed, always the data should be fetched from the BIA index.
2)Suppose the BIA indexing has failed due to some reasons, will the data be fetched from the previously updated BIA index??
regards
akshayHi man,
1)But is there some query settings or properties where we can make sure that whenever a query(say Q1) is executed, always the data should be fetched from the BIA index.
If you have built up BIA index on a cube, then every query on the cube or MultiProvider will automatically use BIA index. No additional settings required. You can use the following way to test whether a query is using BIA or not:
Go to RSRT, input query name, click 'execute and debug' and check 'Display Statistics Data' and 'Do Not Use Cache'. Execute. After the query result press F3, now you should be able to see statistics. There's a tab 'BIA Access'. If you see something there then it means BIA index is used.
2)Suppose the BIA indexing has failed due to some reasons, will the data be fetched from the previously updated BIA index??
If BIA rollup is failed, then the last request(s) would not available in reporting and query will use BIA index for earlier requests. You can consider it like aggregate. But if initial fill of BIA failed then you would not be able to use BIA index.
Regards,
Frank
Edited by: Frank Lee on Jul 14, 2009 2:22 PM -
How to use one query results in another query
hi,
in help.sap I have founded that using variable type replacement path I can use one query results in another query. It is wrote there that I have to choose query name results I want to get in variable definition but I do not know where.
How I can do this?
Result I want to get is:
In one query I have material prices in another material quantities. I want to calculate inventory value (price * quantity). Moreover prices are on plant level, quantities on storage type level. Plant is atribute of storage type.
Can I do this?
Regards,
AndrzejHi Andrzej,
please check out this thread: Set parameters values depending on other parameters
I had a discussion about query results as input for another query in there.
For creating a workbook, just click on the save button after you ran your query in the bex.
Siggi
Message was edited by: Siegfried Szameitat -
Get selected rows using the fm REUSE_ALV_GRID_DISPLAY_LVC
FYI ... for all those developers trying to select multiple rows in an ALV report, and get the selected rows - without using the OO approach to display to ALV, and without using checkboxes in the function module approach. First off, you need to use the function module REUSE_ALV_GRID_DISPLAY_LVC instead of the standard REUSE_ALV_GRID_DISPLAY. This allows you to select multiple rows using the toggle, line selection buttons, at the start of each row (with 'select all' button). See the sample code below. If you are converting from the one fm to the other, you will have to change the type of 2 of the structures to the 'LVC' structures and make minor code changes. The example code below was initially using the REUSE_ALV_GRID_DISPLAY fm, and was converted to use REUSE_ALV_GRID_DISPLAY_LVC to allow for multiple row selection. The next step is to create a custom status, with a new custom button, that will start the processing of the selected rows. Go to tcode SE41, press Copy Status, and copy program SAPLKKBL, status STANDARD, to your custom program (same name as the custom ALV rpt) and a new status name (ie STANDARD1). In the new STANDARD1 status for the custom ALV program/rpt (tcode SE41), add a new button ('&EXE') at the end of the std buttons (items 29-35). Assign the new button a Text, Icon and a Function Key. Thats it!
Here's the code:
FORM display_data.
DATA:
wa_callback_program LIKE sy-repid,
wa_layout TYPE lvc_s_layo, "was slis_layout_alv, "D01K913690
t_fieldcat TYPE lvc_t_fcat, "was slis_t_fieldcat_alv, "D01K913690
wa_fieldcat TYPE lvc_s_fcat, "was slis_fieldcat_alv, "D01K913690
t_excluding TYPE slis_t_extab,
wa_excluding TYPE slis_extab,
wa_variant LIKE disvariant.
* Setup Field Catalog
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'ZBUKR'.
wa_fieldcat-ref_field = 'ZBUKR'.
wa_fieldcat-ref_table = 'REGUT'.
APPEND wa_fieldcat TO t_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'BANKS'.
wa_fieldcat-ref_field = 'BANKS'.
wa_fieldcat-ref_table = 'REGUT'.
APPEND wa_fieldcat TO t_fieldcat.
* Setup other ALV fm parameters
CLEAR wa_excluding.
wa_excluding-fcode = '&F12'.
APPEND wa_excluding TO t_excluding.
CLEAR wa_excluding.
wa_excluding-fcode = '&F15'.
APPEND wa_excluding TO t_excluding.
* Callback program
wa_callback_program = sy-repid.
* List layout
wa_layout-zebra = 'X'.
wa_layout-sel_mode = 'A'.
* variant
wa_variant-variant = p_var.
* Display the ALV report
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC' "D01K913690
EXPORTING
i_callback_program = wa_callback_program
i_callback_pf_status_set = 'SET_PF_STATUS' "D01K913690
i_callback_user_command = 'USER_COMMAND'
is_layout_lvc = wa_layout "D01K913690
it_fieldcat_lvc = t_fieldcat "D01K913690
it_excluding = t_excluding
i_save = 'A'
is_variant = wa_variant
TABLES
t_outtab = t_regut
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2
ENDFORM. " DISPLAY_DATA
FORM user_command
USING
r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
DATA: wa_text(80) TYPE c.
CASE r_ucomm.
WHEN '&EXE'. "User pressed custom Execute button
DATA ref1 TYPE REF TO cl_gui_alv_grid.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref1.
DATA: lt_index_rows TYPE lvc_t_row,
lt_row_no TYPE lvc_t_roid,
lw_row_no TYPE lvc_s_roid.
CALL METHOD ref1->get_selected_rows
IMPORTING
et_index_rows = lt_index_rows
et_row_no = lt_row_no.
LOOP AT lt_row_no
INTO lw_row_no.
*** CODE TO PROCESS EACH RECORD FROM MULTIPLE SELECTED***
ENDLOOP. "loop at lt_row_no
WHEN '&IC1'. "User double-clicked on row
*** CODE TO PROCESS SINGLE RECORD SELECTED ***
WHEN '&F03' . " back
SET SCREEN 0. LEAVE SCREEN.
WHEN '&F15' . " exit
SET SCREEN 0. LEAVE SCREEN.
WHEN '&F12' . " cancel
SET SCREEN 0. LEAVE SCREEN.
ENDCASE.
ENDFORM. " USER_COMMAND
FORM set_pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'STANDARD1'.
ENDFORM. " set_pf_status
Hope this helps ...
Regards,
Kevin
Moderator message - Welcome to SCN.
However, as you can see, the forum software was unable to format this because of the 2,500 character posting limit. since this looks interesting, would you please try to edit to conform to that limitation? You may try to split it into an initial post and a response.
Edited by: Rob Burbank on Jul 8, 2009 1:39 PMHi ,
Make it use in your code and let me know if u have any concerns...
Use "Subtotal_text" in events table.
here GTOTAL is field in itab on which we sortindf data, and use your own field on which field u want to sort...
refresh gt_event.
clear gw_event.
call function 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = gt_event.
Subtotal
read table gt_event with key name = slis_ev_subtotal_text into gw_event.
if sy-subrc = 0.
move 'SUBTOTAL_TEXT' to gw_event-form.
append gw_event to gt_event.
endif.
form subtotal_text using uw_subtot_line type ty_main
uv_subtottxt type slis_subtot_text. "#EC CALLED
if uv_subtottxt-criteria = 'GTOTAL'.
uv_subtottxt-display_text_for_subtotal = 'TOTAL'.
endif.
*FORM build_sort .
refresh gt_sort.
gw_sort-spos = 1.
gw_sort-fieldname = 'GTOTAL'.
gw_sort-tabname = 'GT_MAIN'.
gw_sort-up = 'X'.
gw_sort-subtot = 'X'.
APPEND gw_sort TO gt_sort.
CLEAR gw_sort.
Reward points once its useful.. -
How to display the query results in several pages?.
Hi,
i want to display the query results in several pages. for example my query result found 50 matches, now i want to print 20 per pages next 20 will be in next pages. iam using only jsp & mysql.
Regards
ChinnaHi, what you are trying accomplish is known as pagination.
You could use JSTL tags with Custom Tags to perform pagination in your JSP pages.
evnafets showed me DisplayTags , you could use those as well http://displaytag.sourceforge.net/11/tut_externalSortAndPage.html
Here is one article on paging:
http://www.javaworld.com/javaworld/jw-07-2004/jw-0726-pagination.html -
Finding minimum value in each row using dynamic query
need to find the minimum and maximum value from each row using dynamic query
[from curr] will be given as input
TukyDECLARE @t TABLE(a INT,b INT,c INT);
INSERT @t VALUES(1,2,3),(9,8,7),(4,6,5);
SELECT *
, ( SELECT MAX(val)
FROM (VALUES (a)
, (b)
, (c)
) AS value(val)
) AS MaxVal
, ( SELECT MIN(val)
FROM (VALUES (a)
, (b)
, (c)
) AS value(val)
) AS MinVal
FROM @t;
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Display the query result in an Excel file??
hi there..
am writing one script file that queries my DB and display the query result in an Excel file??
i.e: if my query is :
select col1, col2
from table;
and i want the results to dispalys in 2 col. in an Excel spreadsheet..
Appreaciating ur cooperation..
Mouradset colsep to a delimiter that is not normally part of your data like |
also setup the environment with these other setup commands
Set Echo Off;
Set Concat Off;
Set Pagesize 9999;
Set Feedback Off;
Set Verify Off;
Set Term Off;
Set Space 0;
Set Colsep '|'
Set Underline Off;
If you wanted to use a comma delimiter the setup would be same but the set colsep='","'
with the addition of concatenating a " on the first col and last col of the query
eg.
-- if first col and last_col are character types then
SELECT '"'||col1,....,last_col||'"'
FROM table;
Otherwise if either is a number they would have to be converted with a TO_CHAR -
Restricting the query result.
Hello Experts ,
Senario :
I have Keyfigures 1)PO Line Item Count and 2) PO Value
I want the number of PO Line Item having PO Value between 0 to 2,500$.
I cant restrict a key figure with another keyfigure.
Also in the query result i dont have any characteristic drilled, only key figure count is present.
Please help.
Thanks,
VinayHi,
Use RRI QUERY, Pass the query result of the first query to Second one and in the second query Use condition to display only "Ito display the number of PO Line Item having PO Value between 0 to 2,500$."
And Use "Count" function to display the number of Purchase Order Line items.
Hope it helps...
Regards. -
How can I export the query result into access(*.mdb) file?
Dear all:
I want to export the query result displayed in jsp into excel file
and access file. And I have exported the result into excel format successfully, only one line should be added in the head of Jsp:
<%@ page contentType="application/vnd.ms-excel; charset=gb2312" %>
But how can I export it in access(*.mdb) file? I have replaced "excel"
with "access". But it can't achive my goal.
What should I do to achieve my goal?
Thanks!The only reason your Excel export works is that Excel knows how to interpret comma separated values as an input file format. Access has no such beast.
If you absolutely must provide info in an mdb, one solution would be to create an ODBC datasource pointing to an empty mdb, then push data into it using the jdbc:odbc bridge, then make a copy of the file and stream it down to the browser. You may run into some ugly file locking items here - set the ODBC connection so it is not shared, and that might help.
This one is going to be ugly.
I suppose another approach would be to write a simple VB applicatin that uses automation to create an MDB, then stream that file down to the browser from your servlet. That would almost certainly be faster than the ODBC approach.
- K
Maybe you are looking for
-
How do I install a Adobe pdf printer?
Upgrade from Acrobat Pro X to Pro XI destroyed my prior Adobe pdf printer. How do I reinstall the printer instance without reinstalling Acrobat XI? I found a reply for an earlier version of Acrobat, but I have no interest in installing the PDF printe
-
I want to be able to create a folder and file structure for each accoun subscriber to my site that will allow them to edit their "web-space" on my site. So basically when they register for an account they'll have a webpage, a folder structre, a page
-
I have a weird problem that I find hard to diagnose. We have 6 iOS based devices: 2x iPhone 3 (iOS 4.2.1), 2x iPhone 4 (iOS 5.1.1) and 2x iPad 3 (iOS 5.1.1). Our Apple Wifi network has 2 APs: 1 Time Capsule (TC) and 1 Airport Extreme (AE). Both AP ar
-
FCP HD 4.5, easy set-up (DV-NTSC) I'm trying to batch capture 10 clips. Each clips starts to capture for about 3 seconds and then it stops and says "error". I try pressing "continue" but it keeps trying to capture the same clip and I get the same mes
-
i am trying to copy my itunes music library and download it into my adroid phone. How do I get my library into a file that I can dump into my H disk?