Hide column based on condition on other column in table
hi,
am using BIP 10.1.3.2 to generate reports.In the template i need to hide one column based on condition on other.am using SQL query as my data source type.can anybody help me ?
Use <?if:?> condition in the RTF, but its mainly for the rows not column. You can work around this by handeling in backend. Or take two separate tables, one with the column which you want to hide and another table without that column and before calling that table use IF condition.
Regards,
Amit D
Persistent Systems Ltd.
Similar Messages
-
Issue in populating values in a column based on values in other columns
I have a situation as below:
Src Tar New tar
AC001 TAC001
AC002 TAC001 AC002
AC003 TAC001
AC011 TAC011
AC012 TAC011 AC012
AC021 TCA021
AC022 TCA021
Now, wherw I have New target as AC002, I need to copy the same value to TAC001 which is the 1st and 3rd row. Similarly, I need to copy AC012 to 4th record. And my last 2 rows will be null as I do not have any values for TCA021..Any thoughts on this would be apprecated..
Thanks in advance..Hi
almost all is said so i tip you How to Fish (with Pictures) - wikiHow because it is good asset for future when you are hungry
Read also http://docs.oracle.com/cd/E11882_01/server.112/e41084/functions004.htm#SQLRF06174
"Analytic functions compute an aggregate value based on a group of rows. They differ from aggregate functions in that they return multiple rows for each group. The group of rows is called a window and is defined by the analytic_clause. For each row, a sliding window of rows is defined. The window determines the range of rows used to perform the calculations for the current row. Window sizes can be based on either a physical number of rows or a logical interval such as time.
Analytic functions are the last set of operations performed in a query except for the final ORDER BY clause. All joins and all WHERE, GROUP BY, andHAVING clauses are completed before the analytic functions are processed. Therefore, analytic functions can appear only in the select list or ORDERBY clause.
Analytic functions are commonly used to compute cumulative, moving, centered, and reporting aggregates." -
Column check constraint cannot reference other columns !????
Hello,
why it don't work?
I have read that Check Constraint must work with other columns. What is the Problem here (KK_ID)?
DROP TABLE Pat CASCADE CONSTRAINTS;
CREATE TABLE Pat
PAT_ID NUMBER(12) NOT NULL
CONSTRAINT pat_id PRIMARY KEY initially immediate,
NAME VARCHAR2(50)NOT NULL initially immediate,
date_b DATE NOT NULL initially immediate,
PRIVAT_KNZ VARCHAR2(20)
CONSTRAINT PRIVAT_KNZ_ CHECK (UPPER(PRIVAT_KNZ) in ('Y','N')) initially deferred,
KK_ID NUMBER(10)
CONSTRAINT KK_ID CHECK ((UPPER(PRIVAT_KNZ) in ('N')) AND KK_ID is NOT NULL) OR ((UPPER(PRIVAT_KNZ) in ('Y')),
CONSTRAINT REF_KEY_KK FOREIGN KEY (KK_ID)
REFERENCES Tab2 (KK_ID) initially deferred
The field KK_ID must became a value if PRIVAT_KNZ has a 'N'. If PRIVAT_KNZ has a value 'Y' then can KK_ID have a NULL or a value.
ERROR__________________________________________________________________
DROP TABLE Patient CASCADE CONSTRAINTS
ERROR at line 1:
ORA-00942: table or view does not exist
CONSTRAINT KK_ID CHECK ((UPPER(PRIVAT_KNZ) in ('N')) AND KK_ID is NOT NULL) OR ((UPPER(PRIVAT_KNZ) in ('J')),
ERROR at line 12:
ORA-02438: Column check constraint cannot reference other columns
Thank you in advance!!!!
AndrejThank You very much!
It works great!
But i don't understand why i must put coma, after
KK_ID NUMBER(10) NUll REFERENCES KRANKENKASSE ,
And then follows the contstraint? How can i see, that constraint KK_ID belongs to column KK_ID?
How can i make,than the constrain belongs to definition of Columns KK_ID?
Thank you in advance!
DROP TABLE Krankenkasse CASCADE CONSTRAINTS;
CREATE TABLE Krankenkasse
KK_ID NUMBER(10)
CONSTRAINT KK_id_PR PRIMARY KEY,
BEZEICHNUNG VARCHAR2(20)
INSERT INTO Krankenkasse VALUES(1, 'AOK');
INSERT INTO Krankenkasse VALUES(2, 'Techniker');
INSERT INTO Krankenkasse VALUES(3, 'Barmer');
DROP TABLE Patient CASCADE CONSTRAINTS;
CREATE TABLE Patient
PATIENTEN_ID NUMBER(12) NOT NULL
CONSTRAINT pat_id PRIMARY KEY initially immediate,
NACHNAME VARCHAR2(50)NOT NULL initially immediate,
VORNAME VARCHAR2(20)NOT NULL initially immediate,
ADRESSE VARCHAR2(100)Null,
GEB_DATUM DATE NOT NULL initially immediate,
PRIVAT_KNZ VARCHAR2(20)
CONSTRAINT PRIVAT_KNZ CHECK (UPPER(PRIVAT_KNZ) in ('J','N'))
initially deferred,
KK_ID NUMBER(10) NUll REFERENCES KRANKENKASSE,
CONSTRAINT KK_ID CHECK
((Upper(PRIVAT_KNZ) in ('N') AND KK_ID is NOT Null) OR (UPPER(PRIVAT_KNZ)in ('J')))
INSERT INTO PATIENT VALUES(1,'Schmidt','Bernd','Adresse1', TO_DATE('01101965', 'DDMMRRRR'),'N',1);
INSERT INTO PATIENT VALUES(2,'Mueller','Heiko','Adresse2', TO_DATE('15061955', 'DDMMRRRR'),'N',1);
INSERT INTO PATIENT VALUES(3,'Becker','Josef','Adresse3', TO_DATE('03101947', 'DDMMRRRR'),'J',2);
INSERT INTO PATIENT VALUES(4,'Winter','Paul','Adresse4', TO_DATE('01051933', 'DDMMRRRR'),'J',Null);
INSERT INTO PATIENT VALUES(5,'Winter','Paul','Adresse4', TO_DATE('01051933', 'DDMMRRRR'),'N',Null);
commit;
__________________________________________________________________________ -
How to Hide Columns Based on Condition
Hi All,
i have an SSRS Report with below four columns.
Product_Name , Year , Credit_Amount , Debt_Amount
I want to hide the Credit_Amount Column if that column all values are Zero.
In the same way needs to hide Debt_Amount Column if that column all values are Zero.
Thanks in advance.
bala krishnaStep 1- Right click on your required Column here in below example: I wanted to hide
Name column
and select Column Visibility
Step 2- From the
Column Visibility window , select Show or hide based on an expression and
then click on fx button as shown in below screenshot
Step 3- Write Your expression in expression windows as below
=IIF(Fields!Credit_Amount.Value = 0, True, False)
Repeat step 1 to Step 3 for Debt_Amount column .
Sandip Pani http://SQLCommitted.com -
How to? Suppress Crosstab Total column, based on condition, Please help!
Hi All,
Please give an advice on the following:
My problem I have an item stock and value by depo by region report, with the following structure:
http://img29.imageshack.us/img29/5289/ctab.jpg
Row 1 is Items
Column 1 is region, has six values (value 1->6), but its grouped in specified order like: value 1, value 2, other (all other values as one, with the name of "other")
Column2 is depo.
I need to hide the sum next to depo (highlited whit thin red on the pic), but only where column 1 (region) is "other".
i tried useing suppress, and conditional highlighting (its acceptable if the column is made blank by useing white as text color)
if GridRowColumnValue("Region") = "other"
Region is set for the Column1 grouping as alias in Crosstab expert.
I usualy get the error: "This is not a name for a grid group for the field being formated."
or if it's no error in it, it simply stays on the form.
What am I missing? Is it even possible to do this?
Thank you, for all of your help in advance.
Regards,
Daniel
Edited by: Daniel Omaisz Takacs on Sep 14, 2010 2:49 PMThe only way to suppress a "column" is to not pull that data.
You can turn the column header white as well - highlight with
if CurrentFieldValue="your value" then white else black
or
CurrentFieldValue="your value" // conditional suppression -
Refresh Cell Value Of Column Based On Condition
Hi Experts,
I m working on UI5 grid.
This my grid:
My requirement is:
On change of "Actual Value ", if value is in between UL and LL then "Sub Test" column should be refreshed with image(ex.green ! mark)
Till Now i achieved upto comarision in columns:
But now i stucked with ,how to refresh image in "Sub Test" column based on valued entered in "Actual Value" column.
Request your ideas.
Regards,
NehaYou can also use CalcFields to bind to your data if you don't want the Icon column to be part of you model.
Documentation/AdvancedTopics/DataBinding/CalcFields – SAPUI5 Wiki (TIP CORE User Interface)
I've modified Dennis' example slightly to use a CalcField, notice the paths are defined to create a composite binding, the data is the automatically passed to the formatter function.
http://jsbin.com/poren/1/edit
Regards,
Jason -
Update column based on sum of data from another table
Hi We had two tables.
Table 1: matusetrans
ITEMNUM Location Quantity transdate
AM1324 AM1 2 12-4-12
AM1324 AM1 2 15-5-12
AM1324 AM1 3 10-6-12
AM1324 AM1 4 5-1-13
AM1324 AM1 2 13-3-13
AM1324 AM2 3 2-5-12
AM1324 AM2 2 12-7-12
AM1324 AM2 1 13-2-13
Table 2: Inventory
ITEMNUM STORELOC lastyear currentyear
AM1324 AM1 need sum(quantity) here need sum(quantity)
AM1324 AM2 need sum(quantity) here need sum(quantity)
We have to update the last year and current year columns with sum of quantities for each item from matusetrans table based on date at different location in Inventory table.
we had nearly 13,000 records(itemnum's with different location) in inventory table in DB we have to update entire records.
Any help...How to write an sql queries to update lastyear and currentyear columns with sum of quantities based on itemnum and location in Inventory table
Thanks
Edit/Delete MessageTry this
SQL> select * from matusetrans;
ITEMNU LOC QUANTITY TRANSDATE
AM1324 AM1 2 12-APR-12
AM1324 AM1 2 15-MAY-12
AM1324 AM1 3 10-JUN-12
AM1324 AM1 4 05-JAN-13
AM1324 AM1 2 13-MAR-13
AM1324 AM2 3 02-MAY-12
AM1324 AM2 2 12-JUL-12
AM1324 AM2 1 13-FEB-13
8 rows selected.
SQL> select * from inventory;
ITEMNU STO LASTYEAR CURRENTYEAR
AM1324 AM1 0 0
AM1324 AM2 0 0
SQL> merge into inventory i
2 using (
3 select itemnum
4 , location
5 , sum(decode(extract(year from transdate), extract(year from sysdate), quantity)) currentyear
6 , sum(decode(extract(year from transdate), extract(year from add_months(sysdate, -12)), quantity)) lastyear
7 from matusetrans
8 group
9 by itemnum
10 , location
11 ) t
12 on (
13 i.itemnum = t.itemnum and
14 i.storeloc = t.location
15 )
16 when matched then
17 update set i.lastyear = t.lastyear
18 , i.currentyear = t.currentyear
19 /
2 rows merged.
SQL> select * from inventory;
ITEMNU STO LASTYEAR CURRENTYEAR
AM1324 AM1 7 6
AM1324 AM2 5 1
SQL> -
Hello there,
basically, as the title says: We have a Document Library on a Sharepoint 2013. Attached to every document are multiple columns, the type for every column is 'Single line of text'.
One column is called 'billing date' and has suitable data in it, e.g. 01.01.2015, 26.02.2015, 29.03.2015 an so on.
Sometimes when someone is editing an other column of the same document the data in 'billing date' changes from 01.01.2015 to 2015-01-01T00:00:00Z for that document, seemingly randomly.
Is there any way to configure or prevent this?
Thanks in advance and kind regards,
MichaelHi,
From your description, my understanding is that SharePoint changes the format of date in single line.
It is very strange issue. I try to reproduce your issue in my environment, but everything is OK.
To solve your issue, I need to collect some information, please confirm these points below:
When will the format of date change? Does it change immediately when you edit the document or after clicking save button?
Does the issue occur in this document library or each one in your environment?
Do you have some special configurations for this document library?
In addition, could you provide a screenshot as below?
Best Regards,
Vincent Han
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
May I take photo, insert into a spreadsheet, input info in several other columns; review and/or print; and download onto my laptop later?
You can play with the 'route' command in an Applications -> Utilities -> Terminal session to specify which route a specific IP address should take.
man 8 route
Google can most likely give you examples you can use to specify routes.
Routes must be setup after each reboot. -
Grouping column in same table based on status of other column
Hi,
MyTable( eid, ename, status, did);
MyTable2(did,dname);
Status column have data in 1/2.
did is forieng key to Mytable2.
i want o/p like:
DNAME , count(eid with status =1) ,count(eid with status = 2)
Please help me in writing query.
Regards,
KrishnaOne possibility (untested):
SELECT DNAME
, COUNT((CASE WHEN STATUS=1 THEN 1 ELSE NULL END)) CNT_STATUS_1
, COUNT((CASE WHEN STATUS=2 THEN 1 ELSE NULL END)) CNT_STATUS_2
FROM MyTABLE
JOIN MyTABLE2 ON MyTABLE.DID = MyTABLE2.DID
GROUP BY DNAME -
SQL Help: Derive "new" columns based on condition
Hello all,
Can someone please help me with this ? I am trying to achieve this in a SQL ( not PL/SQL), if it can be done in two different steps, even that is fine too...
Thanks in advance,
Chandu
SELECT * FROM
SELECT 2765 BTCH_ID,'payroll' BTCH_NM,'payroll~EUR~EUR~DE'NEW_BTCH_NM,'1234'TMPLT_ID FROM DUAL
UNION
SELECT 2765,'payroll','payroll~USD~USD~US','1235' FROM DUAL
UNION
SELECT 2765,'payroll','payroll~USD~USD~US','1236' FROM DUAL
UNION
SELECT 2765,'payroll','payroll~GBP~GBP~GB','1237' FROM DUAL
UNION
SELECT 2766,'SALARY','SALARY~USD~USD~US','1238' FROM DUAL
UNION
SELECT 2766,'SALARY','SALARY~USD~USD~US','1239' FROM DUAL
) T_BATCH;For a "Batch-id" there exists multiple Transactions which are denoted by ( cr_crncy_cd , dr_crncy_cd , recvr_cntry_cd), and "NEW_BTCH_NM" column is basically a concatenation of "BTCH_NM" + above 3 columns ( with a ~)
I am trying to derive two new columns 'SEQ' & 'Output_Batch_name'
SEQ column:
For every batch_id, the first row will be assigned by sequence.nextval.
For all transactions within BTCH_ID,
all the rows with same NEW_BTCH_NM, share the same sequence number
if different, then SEQ.nextval for all distinct rows
Output_BTCH_NM:
for a given batch_id,
if the NEW_BTCH_NM is the same for all transactions ( batch_id 2766 in the below example) ,
then Output_BTCH_NM = BTCH_NM should be marked for All transactions which belong to this Batch_id,
Else
Output_BTCH_NM = New_BTCH_NM
END if
Expected OUTPUT
*BTCH_ID BTCH_NM NEW_BTCH_NM TMPLT_ID SEQ Output_BTCH_NM*
2765 payroll payroll~EUR~EUR~DE 1234 1 payroll~EUR~EUR~DE
2765 payroll payroll~GBP~GBP~GB 1237 2 payroll~GBP~GBP~GB
2765 payroll payroll~USD~USD~US 1235 3 payroll~USD~USD~US
2765 payroll payroll~USD~USD~US 1236 3 payroll~USD~USD~US
2766 SALARY SALARY~USD~USD~US 1238 4 SALARY
2766 SALARY SALARY~USD~USD~US 1239 4 SALARYEdited by: user10711957 on Sep 25, 2010 4:37 PMCan someone please help me with this ? I am trying to achieve this in a SQL ( not PL/SQL), if it can be done in two different steps, even that is fine too...
Thanks in advance,
Chandu
SELECT * FROM
SELECT 2765 BTCH_ID,'payroll' BTCH_NM,'payroll~EUR~EUR~DE'NEW_BTCH_NM,'1234'TMPLT_ID FROM DUAL
UNION
SELECT 2765,'payroll','payroll~USD~USD~US','1235' FROM DUAL
UNION
SELECT 2765,'payroll','payroll~USD~USD~US','1236' FROM DUAL
UNION
SELECT 2765,'payroll','payroll~GBP~GBP~GB','1237' FROM DUAL
UNION
SELECT 2766,'SALARY','SALARY~USD~USD~US','1238' FROM DUAL
UNION
SELECT 2766,'SALARY','SALARY~USD~USD~US','1239' FROM DUAL
) T_BATCH;For a "Batch-id" there exists multiple Transactions which are denoted by ( cr_crncy_cd , dr_crncy_cd , recvr_cntry_cd), and "NEW_BTCH_NM" column is basically a concatenation of "BTCH_NM" + above 3 columns ( with a ~)
I am trying to derive two new columns 'SEQ' & 'Output_Batch_name'
SEQ column:
For every batch_id, the first row will be assigned by sequence.nextval.
For all transactions within BTCH_ID,
all the rows with same NEW_BTCH_NM, share the same sequence number
if different, then SEQ.nextval for all distinct rows
Output_BTCH_NM:
for a given batch_id,
if the NEW_BTCH_NM is the same for all transactions ( batch_id 2766 in the below example) ,
then Output_BTCH_NM = BTCH_NM should be marked for All transactions which belong to this Batch_id,
Else
Output_BTCH_NM = New_BTCH_NM
END if
Expected OUTPUT
*BTCH_ID BTCH_NM NEW_BTCH_NM TMPLT_ID SEQ Output_BTCH_NM*
2765 payroll payroll~EUR~EUR~DE 1234 1 payroll~EUR~EUR~DE
2765 payroll payroll~GBP~GBP~GB 1237 2 payroll~GBP~GBP~GB
2765 payroll payroll~USD~USD~US 1235 3 payroll~USD~USD~US
2765 payroll payroll~USD~USD~US 1236 3 payroll~USD~USD~US
2766 SALARY SALARY~USD~USD~US 1238 4 SALARY
2766 SALARY SALARY~USD~USD~US 1239 4 SALARY -
Insert value into a column based on value of another column
Hi,
I am trying to insert a value into a record based on a column in
the record, using a trigger. The complication arises because
the new value is selected from the same table. For example:
SELECT COL1, COL2, COL3, COL4 from TABLE1
I want to set COL2 and COL3 based on the value of COL4. And to
get the value of COL2 and COL3, I will go back to TABLE1 and set
the condition to TABLE1.COL1 = :NEW.COL4
I cannot seem to execute the trigger as I get the message "ORA-
04091: table SYSTEM.TABLE1 is mutating, trigger/function may not
see it" everytime.
Is this the correct way to achieve what I wanted? Or is there
another way?
Appreciate your feedback. Thank you in advance.Hi,
I am trying to insert a value into a record based on a column in
the record, using a trigger. The complication arises because
the new value is selected from the same table. For example:
SELECT COL1, COL2, COL3, COL4 from TABLE1
I want to set COL2 and COL3 based on the value of COL4. And to
get the value of COL2 and COL3, I will go back to TABLE1 and set
the condition to TABLE1.COL1 = :NEW.COL4
I cannot seem to execute the trigger as I get the message "ORA-
04091: table SYSTEM.TABLE1 is mutating, trigger/function may not
see it" everytime.
Is this the correct way to achieve what I wanted? Or is there
another way?
Appreciate your feedback. Thank you in advance. I'm not sure what you mean when you insert a value into a
record, but if you are setting a value in a column of the same
record using a trigger, then it's easy.
:new.COL2 := ....:new.COL4...
:new.COL3 := ....:new.COL4...
The trigger must be 'INSERT or UPDATE' and 'FOR EACH RECORD'.
If you are setting a different record in the same table, the
solution is much more difficult. -
New column based on four logical measure column
Hi All
I have four logical measure column which each one indicate how many activity under each service request.
ie value of each column is
col1 - 1,
col2 - 2
col3 - 3
col4 - 4 activities or more
Based on this can i create a new measure column, whenever any service request has two activitiy, my new column should show 2 (ie value col2)
can i do the max of all the four columns or how to approach this issue?.
ThanksYes, this is little bit complicated.
Since there is no direct SQL which extracts the number of activities under each Service Request in the existing setup. They used the nbr of rows in activity in relation to service request table. This way they calcuate the nbr of activities under each SErvice request.
In the previous request, business want to see how many Service request with one activity or two activties. Because of this, four logical column have been created.
Now My request need to see service request with one activity or more than one activity measure in the drill report. Since i have already show that nbr of service request with one activity or more than one activity in a chart format.
Instead of showing all the four measure in my drill report, i want to show if a service request has got one or more than 1 activity. -
Filter column based on values in second column
I have a 7 columns (A-G). I want to add a filter to return rows if the value in column D exists anywhere in column C (values in column D and C do not necessarily match).
Is this possible? I tried creating a filter for column D based on column C using the 'Filter based on results of another request' functionality, but it did not work.
Create/Edit Filter>Filter based on results of another request
Column: column D
Relationship: is equal to any
Saved Request: same request
Use values in Column: column COkay, it looks like you are using the same query for both the main and subquery. That won't work.
1) Create a query with one column, column D. Name it and save it.
2) Now build your main report with all the columns you desire and on column C, apply the filter "based on results..." and have it point to column D of the subquery in step 1. -
Validate list column based on entry from another column
Hi there
I would like to ensure that a value is entered in list column B, if there is a value of 'Yes' in list column A.
I assume this formula is entered in the Validation settings of the list, but cannot work out what is required.
Is it something like? =IF([Col-A]="Yes",IF(LEN([Col-B]<1,TRUE,FALSE),TRUE)
Thanks
Asher
Fast, Cheap, Good. Choose any Two!Ahh, found a solution:
=IF([Col-A]="Yes",IF([Col-B]<>"",TRUE,FALSE),TRUE)
Now i need to do the same for other fields in the list, and these formulas must go together in the validation settings of the list, which is going to look messy.
If i want to do the same with columns C and D, how would i append this to the formula?
=IF([Col-C]="Yes",IF([Col-D]<>"",TRUE,FALSE),TRUE)
Thanks
Asher
Fast, Cheap, Good. Choose any Two!
Maybe you are looking for
-
How do I save an image along with the inklayer?
I have a form with a pictureBox with an annotatable image on it. When the image is dirtied I allow the user to save it. Problem is, after save, I only see the original image, not the annotations.
-
Hi, When using ECP on browsers other than Internet Explorer, it loads but does not display the content correctly. We only get to see the links. Unfortunately I cannot add an image to this post. How can I fix this so that all browsers (Safari, Chrome,
-
Hi, What does following lines mean in mappings file LIST_AUTH *;*|* $[IMTA_LIBUTIL,imdlauth,$2+$1@$0] They are not there in default file ...but I have seen these entires in some servers?? This is not mentioned in admin guide... RGds
-
Drivers and Software will not work on new hard drive
Hello: Pavilion DV7-4270us Windows 7 64 bit I installed new 500 GB hard drive into the above referenced notebook, as previously installed 640 GB hard drive from factory began to fail. I have downloaded drivers and software for HP Media Smart, HP Simp
-
Whatever appears on my monitor screen at any given time, I would like to print it.