I have a rdlc report which is like below. I want to set visible false AraciFirmaField if AraciFirma is null from Dataset1. Is it possible ? How can i do ?
<DataSet Name="DataSet1">
<Fields>
<Field Name="AraciFirma">
<DataField>AraciFirma</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="AliciFirma">
<DataField>AliciFirma</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
..........
In Visibility.Hidden property of AraciFirmaField you have to specify if the object must be hide or not. So you can use:
=IIf(IsNothing(Fields!AraciFirma.Value), True, False)
Select Column in tablix
Go to column visibility option
select show or hide column based on expression.
Related
I want to index daterange as multifiled in solr
eg----- temp_close_timing=[2022-02-08T16:40:49 TO 2022-02-28T16:40:49,2022-02-08T16:40:49 TO 2022-10-28T16:40:49,2022-02-08T16:40:49 TO 2022-02-28T16:40:49,2022-02-17T00:00:00 TO 2022-02-28T23:00:00]
can someone help me in this.
I am doing as shown below but getting error in this
My scehma file show below:
<field name="temp_close_timing" type="rdate" stored="true" omitNorms="true"
multiValued="true"/>
my dataconfig FIle:
<!-- temp closing timing of restaurant -->
<entity name="tempRestaurant" dataSource="dineout" onError="skip"
query=" SELECT
GROUP_CONCAT(CONCAT(DATE_FORMAT(rtc.start_dt, '%Y-%m-%dT%T'),
'.0Z',
' TO ',
DATE_FORMAT(rtc.end_dt, '%Y-%m-%dT%T'),
'.0Z')) AS temp_close_timing,
rtc.rest_id AS restaurant_id
FROM
restaurant_temp_close AS rtc
WHERE
rtc.status = 1"
transformer="RegexTransformer"
cacheKey="restaurant_id" cacheLookup="rest.r_id" cacheImpl="SortedMapBackedCache">
<field name="temp_close_timing" column="temp_close_timing"/>
</entity>
I got the solution of this question
<!-- temp closing timing of restaurant -->
<entity name="tempRestaurant" dataSource="dineout" onError="skip"
query=" SELECT
GROUP_CONCAT(CONCAT('[',
DATE_FORMAT(tr.start_dt, '%Y-%m-%dT%T'),
' TO ',
DATE_FORMAT(tr.end_dt, '%Y-%m-%dT%T'),
']')
SEPARATOR '#####') AS temp_close_timing,
tr.rest_id AS restaurant_id
FROM
restaurant_temp_close AS tr
WHERE
tr.status = 1
GROUP BY tr.rest_id"
transformer="RegexTransformer"
cacheKey="restaurant_id" cacheLookup="rest.r_id" cacheImpl="SortedMapBackedCache">
<field name="temp_close_timing" column="temp_close_timing" splitBy="#####"/>
</entity>
can anybody tell how to apply intersect of contain in this field with exampl ..I want to check that todays date/time lies in this range or not
This question already has answers here:
Extracting XML sub-tags from a clob in Oracle via SQL
(3 answers)
Closed 1 year ago.
I'm trying to read the values from the XML format stored in clob data type in Oracle DB.
from below XML stored in CLOB column i wanted to read the specific values like "entityFldType="uid""
can anyone help me with SQL
"d258b8c7-fa47-49d4-a28c-f779d39" xmlns:even="http://www.cos.com/EDA/Event100">
<Body userId="administrator" entityType="USER" internalId="uid=usertest1,ou=People,dc=abcde,dc=medical,dc=com" datasource="LAP">
<Field entityFldType="uid">
<value>usertest1</value>
</Field>
<Field entityFldType="userPassword">
<value>********</value>
</Field>
<Field entityFldType="telephoneNumber">
<value>000 00000/55555</value>
</Field>
<Field entityFldType="employeeType">
<value>active</value>
</Field>
<Field entityFldType="mail">
<value>usertest1#coz.com</value>
</Field>
<Field entityFldType="initials">
<value>a</value>
</Field>
<Field entityFldType="objectClass">
<value>top</value>
</Field>
<Field entityFldType="sn">
<value>qa</value>
</Field>
<Field entityFldType="cn">
<value>qa</value>
</Field>
</Body>
</even:Event>
Your XML got a little mangled, but an easy way is to convert to XMLTYPE which opens up many of the XMLDB features. So you'll have something along the lines:
select
extractvalue(my_xml, '/body/field/text()') tag_value,
extractvalue(my_xml, '/body/field/#entityFldType') attr_value
from ( select xmltype(clob) my_xml from your_table )
I need some more help with another XML query. Below is an example of a record of my XML column:
<Fields>
<MappedFields>
<Field name="FormNumber" value="21" />
<Field name="ProcedureCode" value="T2023" />
<Field name="CurrentDate" value="4/23/2012" />
</MappedFields>
</Fields>
The field elements may appear in any order, so it can appear like this as well:
<Fields>
<MappedFields>
<Field name="ProcedureCode" value="G5532" />
<Field name="FormNumber" value="12" />
<Field name="CurrentDate" value="3/29/2011" />
</MappedFields>
</Fields>
What I am looking for, is a query that will get the value of the Field with the name "FormNumber" for all the records in the table. The query I have below works if the Field with the name of "FormNumber" is the first Field element in the XML. What I need is a query that will find the Field element even if it is not the first element. Can someone help me out with this?
SELECT
X.Node.value(N'(Field/#value)[1]', 'nvarchar(max)') AS FormNumber
FROM
dbo.MHTCM_LetterSent A
CROSS APPLY A.LetterXML.nodes(N'/Fields/MappedFields') AS X(Node)
WHERE
X.Node.value(N'(Field/#name)[1]', 'nvarchar(max)') = 'FormNumber'
You can have a test in the xml path like [#name="FormNumber"].
SELECT
X.Node.value(N'(Field[#name="FormNumber"]/#value)[1]', 'nvarchar(max)') AS FormNumber
FROM
dbo.MHTCM_LetterSent A
CROSS APPLY A.LetterXML.nodes(N'//Fields/MappedFields') AS X(Node)
Note the WHERE isn't needed now.
It might make more sense to move the test to the CROSS APPLY:
SELECT
X.Node.value(N'(./#value)[1]', 'nvarchar(max)') AS FormNumber
FROM
dbo.MHTCM_LetterSent A
CROSS APPLY A.LetterXML.nodes(N'//Fields/MappedFields/Field[#name="FormNumber"]') AS X(Node)
Edit- I made the paths absolute (//) and both examples are working for me.
I have a working solr with DIH now i need to add multi rows which is ONE to MANY relationship with the solr indexed doc
TABLE:
ID:int PK
post_id:int FK
name:string
value:text
type:(int|string)
i need to insert all rows based on FK (post_id) into solr doc with dynamic name and convert value based on type
SELECT name,value,type FROM TABLE WHERE post_id='${post_entity.id}';
loop
insert into solr fieldname: meta_{$name} value: if type int cast to int else just value
end loop
Anyone knows how to do this?
Not sure if you have the answer yet, but my understanding is you need to create multiple entity tabs in the data handler document, one for each new multi-value field you want to add, and indicate the ID from the root document. Look at this example:
In the DataHandler.xml file:
<dataConfig>
<dataSource name="jdbc" driver="org.postgresql.Driver" url="jdbc:postgresql://localhost/bedrock" user="postgres" password="test" batchSize="1000" readOnly="true" autoCommit="false" transactionIsolation="TRANSACTION_READ_COMMITTED" holdability="CLOSE_CURSORS_AT_COMMIT" />
<document name="doc-a">
<entity name="employee-root" datasource="jdbc" pk="id" query ="
select
a.id as id,
a.name as name,
a.dept as dept,
a.jobtitle as jobtitle,
a.last_change as last_change
from employee a
"
transformer="RegexTransformer,DateFormatTransformer,TemplateTransformer">
<field column = "id" />
<field column = "name" />
<field column = "dept" />
<field column = "jobtitle" />
<entity name="employee-hobby" datasource="jdbc" query ="
select
employee_hobby as features
from employee_hobby
where employee_id = ${employee-root.id}
"
transformer="RegexTransformer,DateFormatTransformer,TemplateTransformer">
<field column = "features" />
</entity>
</entity>
</document>
i think i can use DIHCustomTransformer to invoke a function but i am not sure yet
http://wiki.apache.org/solr/DIHCustomTransformer
any enlightenment will be appreciated
I am having some problems Validating a select tag in one of my forms.
The for code for select is as follows;
<s:select list="assessmentTypes" headerKey="0" headerValue=" -- Select One --"
listKey="id" value="name" listValue="name" key="course.assessmenttype"
name="assessmenttype.id"/>
and validation is as follows;
<field name="assessmenttype.id">
<field-validator type="requiredstring">
<message key="errors.required"/>
</field-validator>
</field>
any help would be appreciated.
use the below code for in ur jsp
s:select list="assessmentTypes" headerKey="" headerValue=" -- Select One --"
listKey="id" value="name" listValue="name" key="course.assessmenttype"
name="assessmenttype.id"/>
Cheers
Shakil