Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2695

SQL and Layout-Problem

$
0
0

Hello everybody,

 

my todays problem is as follows:

my sql-statement is as follows:

 

select

    incident.incident_id,

    inc_data.event_type,

    inc_data.sub_event_type,

    item.item_sc,

    serv_dept.serv_dept_sc,

    serv_dept.serv_dept_n

from

    incident

left outer join inc_data on incident.incident_id = inc_data.incident_id

left outer join item on incident.item_id = item.item_id

left outer join serv_dept on incident.***_svd_id = serv_dept.serv_dept_id

where

    incident.inc_status = 'o' and

    (incident.csg_id = '1' or incident.csg_id = '7') and

    inc_data.event_type in ('i', 'c', 'p') and

    serv_dept.serv_dept_sc IN ('I21', 'I23')

 

So I get 3 different typ of event_types (i, c, p, Incidents, Changes and Problems), which I grouped and summarized.

So far so good. The incidents again contain again another service_type (Service Requests) which is defined by this code:

 

($F{EVENT_TYPE}.equals("c") && $F{SUB_EVENT_TYPE} == ("s") ? "Service Requests" :

($F{EVENT_TYPE}.equals("c") && $F{SUB_EVENT_TYPE} != "s" ? "Changes" :

($F{EVENT_TYPE}.equals("p") ? "Problems" :

($F{EVENT_TYPE}.equals("i") ? "Incidents" : "Unbekannt"

 

How should this code look like in CR and where to put it, so I get 4 event typs in the report?

 

I enclose the report how it should look like and my result in CR so far as well.

 

Thank you for your help.

 

 

Eberhard


Viewing all articles
Browse latest Browse all 2695

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>