P2 report SQL using P1 report columns

Hi,
I have a page1 (P1) report table with 3 columns COL1, COL2 and COL3.
COL1 has 3 rows with values 'A', 'B' and 'C'
I'd like to produce a report table on P2 from a SQL query using the values (not the column name) from P1 COL1 like:
select * from TABLE where (COL1='A', COL1='B, COL1='C');
but get the values for A, B and C from the P1 report.
Any ideas? Is it even possible?
Cheers,
Dave

Hi,
You can edit your previous post - there's an icon top-right above the post - just make sure you leave the blurb that says you've edited it.
The only way to get the values from an entire column would be to use an IN clause in your P2's query but you would have to the WHERE clause of P1's sql to get this.
For example, assuming P1's statement is:
SELECT COL1, COL2, COL3
FROM MYTABLE1
WHERE X = :P1_FILTER
Your P2 statement would be:
SELECT COLX, COLY, COLZ
FROM MYTABLE2
WHERE COLX IN (SELECT COL1 FROM MYTABLE1 WHERE X = :P1_FILTER)
AND COLY IN (SELECT COL2 FROM MYTABLE1 WHERE X = :P1_FILTER)
AND COLZ IN (SELECT COL3 FROM MYTABLE1 WHERE X = :P1_FILTER)
There are other possible WHERE clause but the principle would be the same
Andy

Similar Messages

  • Report To Show SQL Used In A Report

    I am creating a set of quality reports using the apex views.
    I would like to create a report to check the sql used in classic reports, but can't seem to find the right view to use.
    If it was a interactive report I would use the SQL_QUERY column in the APEX_APPLICATION_PAGE_IR view, but this does not seem to exist for classic reports
    Help appreciated.
    Gus

    Gus C wrote:
    I am creating a set of quality reports using the apex views.
    I would like to create a report to check the sql used in classic reports, but can't seem to find the right view to use.
    If it was a interactive report I would use the SQL_QUERY column in the APEX_APPLICATION_PAGE_IR view, but this does not seem to exist for classic reports
    You can use the Data dictionary view APEX_APPLICATION_PAGE_REGIONS. There's a field called "REGION_SOURCE" - just filter for the appropriate region type.
    Help appreciated.Really? What about Re: Validate Date and Time? If you want to show genuine appreciation for help given, why not award "correct/helpful" points to posts which helped you solve your problem, as per the forum introduction post:
    >
    * It is considered good etiquette to reward answers with points (as "helpful" - 5 pts - or "correct" - 10pts).
    >
    Having a brief look through your list of recently answered questions, you don't seem to award helpful points, even when you've explicitly saying (paraphrasing) "Thanks for your help". Maybe it's a tipping thing - perhaps you subscribe to the doctrine of Mr. Pink but, hey if it helps you get your question answered and it literally costs you nothing but a few seconds of effort, why not throw us a bone by awarding a point now and then?

  • Sorting report columns for PL/SQL report

    I have created a report of type "Pl/Sql function body returning Sql query" in which I am generating the column names within the query. I would now like to make the first three of these columns sortable. But when I click on the "sort" box for the first three columns, all my column names suddenly switch to "Col 1", "Col 2" etc.
    As you can see by the following snippet from the PL/SQL that generates the query, the column names are data driven, so I'm not in a position to declaratively rename each column. As it happens, the first three columns names are fixed, but all the subsequent column names are data driven.
    Suggestions on how to make the first three columns sortable while preserving the generated column names of the remaining columns?
    thanks
    susan weber
    declare
    query varchar2(4000); -- query
    begin
    query := 'select first_name "First Name", last_name "Last Name", encounter_date "Encounter Date" ';
    for c1 in (select distinct attr_src, attr_code, attr_text, sequence_number from finding_vt)
    loop
    query := query || ', (select val_text from finding_vt vt where vt.encounter_id = e.encounter_id and vt.attr_src = ''' || c1.attr_src || ''' and vt.attr_code = ''' || c1.attr_code || ''' and sequence_number = ' || c1.sequence_number || ') "' || substr(c1.attr_text,0,30) || '"';
    END LOOP;
    query := query || ' from patient pat, encounter e where pat.patient_id = e.patient_id';
    return query;
    end;

    This turns out to be related to the choice of "use generic column names" v. "use query specific column names".
    I had chosen "use generic column names" just to get past the initial creation page. I then debugged the query creation sql, but never changed that setting back to "use query specific column names". The fix is to choose "use query specific column names".

  • Run a report in PL/SQL using utl_http.request

    Hi
    I need to run a report in PL/SQL using utl_http.request
    How that can be done ??
    Thank you!

    Okay, backtrack.
    A web server can deliver all kinds of content. From static HTML pages, to XML files and videos and dynamic content. Including reports.
    The communication language (protocol) used to talk to a web server is HTTP.
    UTL_HTTP is an Oracle PL/SQL library that implements the client side of this communication. It allows the developer to write code that acts like a web browser and communicates with a web server.
    Now what do you not understand and cannot use?
    HTTP is not simple and easy. You need to understand the basics of this communication language in order to communicate successfully with the web server. Like knowing the difference between GET and PUT and POST commands, how the URL query string works and so on.
    Once you know that, you can look at how the web server provides reports. How do you authenticate as a web browser with the web reporting system? What URLs do you use to access which reports? How do you pass name-values to the web server as report parameters? What HTTP response formats (MIME types) does the web report server provide? Which one do you plan to use and how do you parse that response into a meaning structured data format?
    If you're thinking it is "easy", think again. Sure, someone here can provide sample code that for example grabs a CSV report file from a web server and (using a pipeline table function), turn that into rows and columns. But that will not teach you the fundamentals you need to know and not equip you with dealing with the problem with your own brains, hands and keyboard.
    PS. In other words, learn to crawl and walk before trying to run. Get to grips with how HTTP works before diving into the deep end of web report integration.

  • SQL Report columns formatting

    Hi Everyone,
    I've got a basic report with a column that is a concatenation of other columns (used for break formatting), and I want to give the effect that there are still separate 'columns' in the concatenation. I've tried using CHR(9) and RPAD in the SQL query to add the 'whitespace' but as soon as Apex gets hold of it, the extra spaces are removed and I'm left with only a single space.
    It does the same thing when the "Display As" value is changed to either "standard report column", or any of the "Display as text" types.
    Any ideas? This is apex 4.0.0
    Thanks!

    I've got a basic report with a column that is a concatenation of other columns (used for break formatting), and I want to give the effect that there are still separate 'columns' in the concatenation. I've tried using CHR(9) and RPAD in the SQL query to add the 'whitespace' but as soon as Apex gets hold of it, when the browser renders the output in accordance with the HTML spec the extra spaces are removed and I'm left with only a single space.The HTML specification instructs user agents to collapse white space characters, so spaces and ASCII tabs in options will be treated as a single space.
    In a standard report use
    <li><tt>white-space: pre</tt> in the CSS Style property for a CSS approach
    or
    <li>The HTML Expression property for a <tt>&lt;pre&gt;</tt> HTML wrapper (ensuring the Display Text As column attribute is Standard Report Column rather than the default Display as Text (escape special characters) ):
    <pre>#COLUMN_NAME#</pre>Better still, create a custom report template using suitable mark-up so that there are "separate columns" in the report.

  • SQL Report column headings

    How to make the column heading bold / apply color to the column heading when Heading type used is PL/SQL ?
    Sanjay

    Lavanya,
    The report column attributes page has a radiogroup of column heading types. One lets you specify a PL/SQL function that returns the headings.
    Scott

  • How to use one report column into the another report in obiee

    How to use one report column into the another report in obiee

    i dont want to use column as a filter for another report it should be report column for another report
    Thanks,
    Vivek

  • Substitution string used in custom Report column name does not display in PDF version of report

    I am using Apex 4.2.6.00.03, Apex Listener 2 via Glassfish4 and have set up all my applications and reports on this system.  We previously used Oracle 10.2, with Apache with a custom fopping document.
    My issue is that I have a report that has custom column headings using a substitution string to pull in the begin or end date for the report.  When the report is run and displayed, the column headings appropriately display the date.  However, when I try to set up the Print to PDF option, the column headings are not displaying correctly.
    Is it possible to use a substitution string in the column heading?  I am able to use the substitution string in the Page Header and Page Footer and those display correctly.
    In the Report Attributes setup I have set the "Strip HTML" to Yes and I have four columns that are using the &"ITEM NAME". string.  See below for actual display:
    The report column headings in APEX displays correctly (bold is the substitution detail): 
    Fund    Account Description          Balance 07/01/2014     Budget/Goal FY 14-15     YTD Actual 02/28/2015         Ending Balance 02/28/2015
    In the Print Attributes setup, when I get to the Report Columns section, the Heading column displays the headings as set up in the Report Attributes custom and I am not able to edit these names.  See below:
    In the version of the report that is Printed to PDF I get the following for display:
    Fund           Account Description           Balance %26amp;P347_BEGIN_DATE.     Budget/Goal %26amp;P347_FY.     YTD Actual %26amp;P347_END_DATE.     Ending Balance %26amp;P347_END_DATE.
    Any assistance would be greatly appreciated.
    Thanks,
    Pat

    First, the misspelled word is a test object and not data.
    Second, all data display correctly.
    Third, text object is displaying the old misspelled word.
    Fourth, I have eliminated the possibility that problems in of my pdf export routine cause this issue by exporting directly from Crystal Reports Viewer. I print the report to the crystal report viewer. The report looks good. The text object is spelled correctly. Then I click the Crystal Reports viewer's export button in the left upper corner and I export to both EXCEL and PDF. The excel export looks good. The pdf export is misspelled. All the export occurs internally in Crystal reports.
    Fifth, I found outthat all users who have this problem have the ADOBE PDF writer installed. I am just suspicious that ADOBE writer is interferring with Crystal export
    Sixth, I cannot recreate this problem on any of our development and test machines. It only happens on end-user laptops.
    Seventh, I changed the name of the report that had this problem and created a new version and installed on end-user laptop. The behaviour still persists. User saved the report as both RPT and PDF. RPT export looks good. PDF version has the spelling problem. Data on both reports is up-to-date and good. I copied the same RPT export to my PC and exported it to PDF, the pdf looks good. That is why I think something on the end-users laptops is causing the export to use some cached template.
    One more thing I did was to change the report name in VB.NET project, recreated a new package and installed on end-user's laptop. The same exact problem is still there.
    I have worked with Crystal Reports more than 15 years and I have never such a weird behaviour before. I know this sounds very weird. We are all baffled by what is happening.

  • Automated Solution for Exporting SQL used in Crystal Reports

    My company has created over 400 reports that are running on Crystal Reports XI. Due to proposed changes in our database, we occasionally need to review the SQL statements of all 400+ reports to determine if any of them would be impacted by the proposed changes. In order to review the SQL used in these 400+ reports, we have had to open each report manually. We would like to know how we can review the SQL used in the reports without having to manually look at each report. I suspect there is a way to either write a program or use a tool that will export the SQL that is used in all reports. In a similar vain, we would be interested in knowing if there is an automated way to identify table names and fields that are used in each SQL statement.

    I see two directions to go:
    1. Review functionalities of .rpt Inspector
    [http://www.softwareforces.com/Product/ri/pro/3/rptInspector.htm]
    - it allows rpt mass analyses
    2. Post your question to ".Net Development - Crystal Reports" forum to see if it is possible to access required information through custom application

  • Report Column Headings based on SQL Query

    Hi ,
    I am working on creating a SQL query based report. However, my column headers for this report are stored in a table and hence, I need the column headers to be based on a sql query also.
    Can you give me some pointers on how to do this ?
    Thanks!
    Lavanya

    Lavanya,
    The report column attributes page has a radiogroup of column heading types. One lets you specify a PL/SQL function that returns the headings.
    Scott

  • Using presentation variables in report columns

    Hi.
    I need to create a report column evaluating the difference in days between a field containing a date and a presentation variable.
    My field is defined as:
    TIMESTAMPDIFF(SQL_TSI_DAY, "Data Scadenza"."Data Scadenza Fattura", @{DataAnalisiScaduto})
    Where DataAnalisiScaduto is a presentation variable passed to the report and it's generated on a date field.
    Executing the report I get an error and looking at the session manager in the generated query I can see:
    TRUNC( (31 / nullif( 12, 0)) / nullif( 2010, 0) ) - TRUNC( T4292.DATA )
    Why ? How can I do ?
    Thanks,
    Andrea

    Erro again ...
    the value passed is 03/02/2011 (picked from the calendar) and the default suggested is 2010-01-10
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46047] Datetime value 03/02/2011 from 03/02/2011 does not match the specified format. (HY000)
    SQL Issued: {call NQSGetQueryColumnInfo('SELECT "Data Incasso"."Data Incasso", "Data Scadenza"."Data Scadenza Fattura", "Dettagli Pagamento"."Cd Fattura", "Dettagli Pagamento"."Cd Tipo Riga Pag", CASE WHEN TIMESTAMPDIFF(SQL_TSI_DAY, "Data Scadenza"."Data Scadenza Fattura", date ''03/02/2011'') <= 0 THEN ''Fino 0 gg'' WHEN TIMESTAMPDIFF(SQL_TSI_DAY, "Data Scadenza"."Data Scadenza Fattura", date ''03/02/2011'') > 0 And TIMESTAMPDIFF(SQL_TSI_DAY, "Data Scadenza"."Data Scadenza Fattura", date ''03/02/2011'') <= 30 THEN ''Fino 30 gg'' WHEN TIMESTAMPDIFF(SQL_TSI_DAY, "Data Scadenza"."Data Scadenza Fattura", date ''03/02/2011'') > 30 And TIMESTAMPDIFF(SQL_TSI_DAY, "Data Scadenza"."Data Scadenza Fattura", date ''03/02/2011'') <= 60 THEN ''Fino 60 gg'' WHEN TIMESTAMPDIFF(SQL_TSI_DAY, "Data Scadenza"."Data Scadenza Fattura", date ''03/02/2011'') > 60 And TIMESTAMPDIFF(SQL_TSI_DAY, "Data Scadenza"."Data Scadenza Fattura", date ''03/02/2011'') <= 90 THEN ''Fino 90 gg'' ELSE ''Oltre 90 gg'' END, Misure.Dovuto, Misure.Pagato, Misure.Scoperto FROM "Vendita - Pagamenti"')}
    SQL Issued: SELECT "Data Incasso"."Data Incasso", "Data Scadenza"."Data Scadenza Fattura", "Dettagli Pagamento"."Cd Fattura", "Dettagli Pagamento"."Cd Tipo Riga Pag", CASE WHEN TIMESTAMPDIFF(SQL_TSI_DAY, "Data Scadenza"."Data Scadenza Fattura", date '03/02/2011') <= 0 THEN 'Fino 0 gg' WHEN TIMESTAMPDIFF(SQL_TSI_DAY, "Data Scadenza"."Data Scadenza Fattura", date '03/02/2011') > 0 And TIMESTAMPDIFF(SQL_TSI_DAY, "Data Scadenza"."Data Scadenza Fattura", date '03/02/2011') <= 30 THEN 'Fino 30 gg' WHEN TIMESTAMPDIFF(SQL_TSI_DAY, "Data Scadenza"."Data Scadenza Fattura", date '03/02/2011') > 30 And TIMESTAMPDIFF(SQL_TSI_DAY, "Data Scadenza"."Data Scadenza Fattura", date '03/02/2011') <= 60 THEN 'Fino 60 gg' WHEN TIMESTAMPDIFF(SQL_TSI_DAY, "Data Scadenza"."Data Scadenza Fattura", date '03/02/2011') > 60 And TIMESTAMPDIFF(SQL_TSI_DAY, "Data Scadenza"."Data Scadenza Fattura", date '03/02/2011') <= 90 THEN 'Fino 90 gg' ELSE 'Oltre 90 gg' END, Misure.Dovuto, Misure.Pagato, Misure.Scoperto FROM "Vendita - Pagamenti"

  • How to use the prompt value in the report column

    Hi
    I have a report prompt column which is 'Adj Type' which holds values 10,20,30 and when user selects Adj Type = 10 then this value should be passed to report column.
    For Eg. Column 1 value is 10 and this should multiple with prompt value and the output should be 10* 10.
    Any thoughts how to capture the prompt values in report column for calculation.

    hi hsekar,
    1) Declare a presentation variable in prompt under the Set Variable section -->Presentation Variable -->P_var
    2) In Fx Table_name.Your_column * @{P_Var}
    @{P_var}{20} ( 20 is default value it will override when a user selects value in prompt
    Thanks,
    Saichand.v

  • Display an alert message through javascript when report column item is null

    Hello,
    I have a report column item which is an select list item and now i want to display an alert message when value is null, I mean no value is selected, this alert message should be fired when update button is clicked.
    Can anyone please help me with this issue.
    Thanks,
    Orton

    You could try something like this:
    declare
      x        INTEGER;
      err_ct  INTEGER   := 0;
    begin
      x  := 5;  -- number of rows displayed
      for i in 1 ... x (
        IF wwv_flow.g_f08(i)) IS NULL THEN err_ct  := err_ct + 1;
        END IF;
      end loop;
      IF err_ct = 0 THEN
         RETURN NULL;
      ELSE
        RETURN 'Nice error message: you must supply a value.';
      END IF;This would be used with a PL/SQL validation: Function Returning Error Text.

  • How to display data in interactive report column without colons (:)

    Dear Apex gurus,
    I'm a newbie and have just created an Apex application from a spreadsheet. I've created a named list of values and used it in a checkbox against a field in the default page 3 Create form.
    When I've selected multiple values in my check box in the form, the data in the interactive report appears as one line with colons separating the selected values like this: Dog:Cat:Bird
    What I would like is to have the data appear in the interactive report column as a multi-line list like this:
    Dog
    Cat
    Bird
    I can work around this by modifying the SQL code in the Region Source of the Region Definition of the report (Default Page 1 interactive report) to replace the colons with <br>
    SELECT replace("PETS_CHOSEN",':','<br>') "PETS_CHOSEN", FROM "MYAPP" Note: this doesn't format properly in the posting. I replace the colon with a html br
    This works, but seems to be a hack to me. I am guessing that I've missed a simple option setting somewhere, but I can't find it.
    The other problem with this solution is that when I export the report to Excel, what is exported is Dog<br>Cat<br>Bird, which is seems worse than colons.
    Thanks,
    - Morgan
    Edited by: mnrussel on 16-Feb-2009 04:13

    Hi Morgan,
    I think you have at least two choices:
    1 - Replace the colons with ', ' (comma and space) - sort of reasonable on screen and in an export
    2 - Create a second page that has the same report but uses the "export: csv" template. Create a manual link to this page to replace the standard Export link. When such report pages are requested, they download immediately instead of displaying. You can, therefore, use commas in this one and &lt;br&gt; tags in the on-screen report version
    Andy
    ps - To display tags in a post, use &amp;lt; for &lt; and &amp;gt; for &gt;

  • Interactive Report column visible but cannot filter

    I have a complex interactive report running on Oracle 10gR1 using Apex 3.1
    When I display the report, all the desired columns are visible. However, when I try to do a filter on a particular column it does not appear in the column filter list even though it is visible in the Select Column list. All the other report columns are available in the filter list.
    The specific column is the result of a join and a substitution within the SQL select. The problem column is 'file_nm'. I've bolded the line in the script below.
    Any suggestions?
    Thanks,
    George
    Here's the IR sql:
    WITH joined_data AS
    ( SELECT a.fdno fdno
    , a.site_abbrv_cd site
    , a.season
    , a.find_id
    , a.dig_ctgy_cd dig_ctgy
    , a.find_ctgy_cd find_ctgy
    , a.materials_qstnbl_ind matl_qstnbl
    , a.color
    , a.field_obj_type_nbr field_type_nbr
    , a.is_inscribed_ind is_inscribed
    , a.display_seq_nbr seq_nbr
    , n.img_file_nm file_nm
    , h.material_descr
    , g.general_matl_ind primary
    , g.specific_matl_ind secondary
    , i.keyword
    , i.kw_cls
    , i.lvl_nbr
    , j.kw_descr
    , b.site_subdiv_type_cd AS type
    , b.site_subdiv_nm AS nm
    , CONCAT(b.sq_h_coord, CONCAT(b.sq_v_coord,
    CONCAT(':', b.locus_nbr))) AS locus
    FROM find a
    LEFT OUTER JOIN ref_item_assoc m ON a.find_id = m.obj_id
    AND m.deflt_dsply_img_ind = 'Y'
    LEFT OUTER JOIN digital_img n ON m.ref_item_id = n.ref_item_id
    LEFT OUTER JOIN find_site_subdiv ab ON a.find_id = ab.find_id
    LEFT OUTER JOIN site_subdiv b ON ab.site_subdiv_id = b.site_subdiv_id
    LEFT OUTER JOIN keyword_assocn i ON a.find_id = i.obj_id
    LEFT OUTER JOIN keyword j ON i.keyword = j.keyword
    AND i.kw_cls = j.kw_cls
    LEFT OUTER JOIN material_find g ON a.find_id = g.find_id
    LEFT OUTER JOIN material h ON g.material_cd = h.material_cd
    SELECT site
    , find_id
    , season
    , fdno
    , matl_qstnbl
    , CASE WHEN color IS NOT NULL THEN color ELSE 'No entry' END AS color
    , CASE WHEN field_type_nbr IS NOT NULL THEN field_type_nbr ELSE 'No entry' END As Field_type_nbr
    , is_inscribed
    , seq_nbr
    *, MAX (CASE WHEN file_nm IS NOT NULL THEN 'Y' ELSE 'N' END) AS file_nm*
    , MAX (CASE WHEN type = 'AR' THEN nm ELSE 'No entry' END) AS Area
    , MAX (CASE WHEN type = 'AL' THEN nm ELSE 'No entry' END) AS A_Level
    , MAX (CASE WHEN type = 'LO' THEN locus ELSE 'No entry' END) AS Locus
    , MAX (CASE WHEN kw_cls = 'FI_CTGY' THEN kw_descr ELSE 'No entry' END) AS find_ctgy
    , MAX (CASE WHEN kw_cls = 'FI_DIGCTGY' THEN kw_descr ELSE 'No entry' END) AS dig_ctgy
    , MAX (CASE WHEN primary = 'Y' THEN material_descr END) AS Primary
    , MAX (CASE WHEN secondary = 'Y' THEN material_descr END) AS Secondary
    , MAX (CASE WHEN (kw_cls = 'FI_DESCR' AND lvl_nbr = 1) THEN keyword ELSE 'No entry' END) AS descr1
    , MAX (CASE WHEN (kw_cls = 'FI_DESCR' AND lvl_nbr = 2) THEN keyword ELSE 'No entry' END) AS descr2
    , MAX (CASE WHEN (kw_cls = 'FI_DESCR' AND lvl_nbr = 3) THEN keyword ELSE 'No entry' END) AS descr3
    , MAX (CASE WHEN (kw_cls = 'FI_DESCRN' AND lvl_nbr = 1) THEN keyword ELSE 'No entry' END) AS DescrN_1
    , MAX (CASE WHEN (kw_cls = 'FI_DESCRN' AND lvl_nbr = 2) THEN keyword ELSE 'No entry' END) AS DescrN_2
    , MAX (CASE WHEN (kw_cls = 'FI_DESCRN' AND lvl_nbr = 3) THEN keyword ELSE 'No entry' END) AS DescrN_3
    , MAX (CASE WHEN (kw_cls = 'FI_DESCRN' AND lvl_nbr = 4) THEN keyword ELSE 'No entry' END) AS DescrN_4
    , MAX (CASE WHEN (kw_cls = 'FI_DESCRN' AND lvl_nbr = 5) THEN keyword ELSE 'No entry' END) AS DescrN_5
    , MAX (CASE WHEN (kw_cls = 'FI_DESCRN' AND lvl_nbr = 6) THEN keyword ELSE 'No entry' END) AS DescrN_6
    , MAX (CASE WHEN (kw_cls = 'FI_DESCRN' AND lvl_nbr = 7) THEN keyword ELSE 'No entry' END) AS DescrN_7
    , MAX (CASE WHEN (kw_cls = 'FI_DESCRN' AND lvl_nbr = 8) THEN keyword ELSE 'No entry' END) AS DescrN_8
    , MAX (CASE WHEN (kw_cls = 'ARCH_CNTXT' AND keyword IS NOT NULL) THEN keyword ELSE 'No entry' END) as arch_cntxt
    FROM joined_data
    GROUP BY site, find_id, season, fdno, matl_qstnbl, color, field_type_nbr, is_inscribed, seq_nbr
    ORDER BY seq_nbr

    Look at the interactive report Column Attribute, Allow Users to Filter check box might not be checked for this column. Thanks.
    --Manish                                                                                                                                                                                                                                                                                       

  • How to display special characters in APEX Classic Report column

    Ref: Thread: How to display newline characters as new lines
    Version: APEX 3.2
    Hi,
    I have created an classic SQL Report with one of the columns being a decode that gives a value 'Post'(the value should be highlighted in Red) on one condition and 'Pre' on another. I have followed the advice given in the page (URL provided above) , i.e. I have changed Strip HTML to 'No', changed Display as to 'Display as text (escape special characters, does not save state)'. I have also passed this value back to the same page to be stored in a page item each time a link (another column in report) in report is clicked. I have tried passing it as #DEADLINE# and \#DEADLINE#\. The issue I face is, instead of the value being highlighted in Red, it gets passed back as a string holding the value 'Post'. Is there any way I can get this to display as it should without the Strip HTML being changed to 'Yes'.
    Thanks very much.
    Rohi
    Edited by: Rohi on 18-Jul-2012 04:21

    876651 wrote:
    Hi,
    Thanks for your response.
    I am trying to display a page item that is derived from a report column based on a click on the URL link (*view >*>)
    This page item (here, it is Manager_ID) should ideally be highlighted when a particular condition is satisfied (achieved using a DECODE in the report).
    But it is not displayed like it should be.
    I do not want the value to be displayed along with the html tags as a string.
    I want the html tags to take effect and highlight the value within it.
    Initially, I had set Strip HTML to Yes and the value was returned without any highlighting .
    So I changed it to 'No' and and it contained the html tags.
    I am not sure what setting in APEX Report Attributes can help me achieve that effect I want.None of the report settings are relevant. They affect the rendering of the report and none of the columns you were changing the properties of were actually rendered.
    You can't pass HTML and CSS around in URL parameters.
    I suggest you pass *2* values in the column link: the MGR ID and a simple class or colour value computed by the DECODE in the report. I've suppressed the first version of the report and created a new one that does this:
    decode(dept.deptno, '30', 'c00', '000') highlight The link column now passes the MGR ID and the HIGHLIGHT colour (red when the condition is satisfied and black when it is not).
    I created another hidden and protected page item <tt>P0_HIGHLIGHT</tt> as the target for the highlight value, and used the Pre/Post Element Text properties of the <tt>P0_G_MGR</tt> to wrap it in a <tt>span</tt> whose colour is changed using the <tt>P0_HIGHLIGHT</tt> value as a subtitution string:
    <span style="color: #&P0_HIGHLIGHT.;">Having done that, I still don't really get the requirement here. I'm sure that given the full picture I'd be using a completely different approach...

Maybe you are looking for