I want to hardcode the value of a dummy column from my view created upon an oracle DB

587 views Asked by At

I have a view which has one dummy column called action. I have a formula {@action}

if {abc_view.name} startswith "abc" Then {abc_view.action} = "Represents action" Else {abc_view.action} = ""

and when I am calling this formula from the record filter section, all I get is 'action' under the dummy column action in crystal reports 2.0 for eclipse. How do I achieve my purpose. Please help me out.

1

There are 1 answers

0
psaraj12 On

You can hardcode the dummy column in oracle view while creating the view where COL1 and COL2 columns have actual value like the below

CREATE OR REPLACE VIEW ABC_VIEW
AS 
SELECT 
CASE WHEN name like 'ABC%'
THEN 'Represents action' 
ELSE
ACB.ACTION
END AS ACTION,COL1,COL2 FROM ABC;