Hello Netta,
A. Apostrophe is not supported directly. Apostrophe is a character used by SQLQuery to separate one value from another. In order to handle this, we need to replace the apostrophe with some other character.
Follow the below given steps to implement this.
- Create a adhoc report
- Add the column with apostrophe values also as a column of the report.
- Click on “More” option in the column dropdown.
The DB function modal will appear. Click on Advanced.
- Here, we are replacing apostrophe with hyphen(-) by using database function.
- Add that column as report filter by clicking on “Use as Filter” and then remove the column from the column list in report pane
- Generate and Save the report
- Add the report in Dashboard then add filter also.
- Generally, the filter data is fetched from adhoc query so it causes problem with hyphen. In order to handle this, we should create a .efwd file and place in the below path. An .efwd file can be created using notepad++ :
….\hi\hi-repository
In the .efwd file, we can create the query that we want to use. The below sample query can be used as reference:
<EFWD>
<DataSources>
<Connection id="1" type="global.jdbc">
<globalId>2</globalId> //should be taken from Data source page
</Connection>
</DataSources>
<DataMaps>
<DataMap id="1" connection="1" type="sql">
<Name>sample_query1</Name>
<Query>
<![CDATA[
select name , replace(name,"'","-") as value from emp_name
]]>
</Query>
</DataMap>
</DataMaps>
</EFWD>
- The above query results 2 columns - name and value. Here name will have apostrophe and value will have hyphen in place of apostrophe.
In filter should provide display column as ‘name’ (having apostrophe)
Internally passing column as ‘Value’ ( not having apostrophe)
-
Open the dashboard in edit mode then click on filter edit
-
Now report works fine with filter values which is having apostrophe also
Thank You,
Helical Insight.