Showing posts with label BI Publisher. Show all posts
Showing posts with label BI Publisher. Show all posts

February 10, 2014

RTF Template -- Repalcing Zero values with blank in BI Publisher



RTF template replacing zero values with blank space:
Here I have a requirement to replace zero values with blank space.
I have to do in RTF template level.
To resolve this issue I used decode function in RTF template.
You can find below screen shot which having zero values.








Open column properties of each and every column.







And modify the column formula in advanced tab as shown below.(you have to change column name for other columns)






Below is the result after changing the formula in each and every column.


February 6, 2014

Error: The conditional format is not inside a table and can therefore not be applied to a table row (RTF template work around for this error)


Conditional format in BI publisher 10.1.3.4.1


In above report I need to print two column values (Dept & Backlog WO’s Except SD) in red color if the
Backlog WO’s Except SD count was greater than 20%
So we need to do conditional format in RTF template.
When I am doing conditional format in RTF template I am getting below error
Error: The conditional format is not inside a table and can therefore not be applied to a table row


But this is the bug.
For this issue there was one work around.
1)      Create one dummy table as shown in below screen shot.




2)      In first row insert few fields as shown in below screen shot.


3)      Select any field and click on create conditional format


4)      I already having the percentage field…. So I am giving the condition according to my requirement  as shown in below screen shot.


5)      To check whether conditional format is working or not just create a group as shown in below screen shot.






And load sample XML to check conditional format


And the preview is


Here we applied conditional format only for skill field. So it will display in red.
Now copy the conditional field from dummy table and past in original table like below.
Note: Copy only conditional format i.e     C   


And copy to original table (TO both columns Dept & Backlog WO’s Except SD ) as shown in below screen shot.



Now delete the dummy table and click on preview.



If you want to apply to entire row … there will be one check box we need to check (Apply to entire row) check that box and apply to original table.



Output will be as below.

 



RTF Template blank page issue --- BI Publisher



BI Publisher Blank page issue
This is the common issue when we creating reports from RTF templates.
When we are previewing the report some times last page will be blank because of blank spaces in RTF template.
But some time’s after deleting blank spaces also we can observe blank page in last.
These types of scenarios will come only when we are using different page orientations with different sections.
For example in my scenario I am using two page layouts Landscape and Portrait with section break.
First page layout is Landscape and I used section break without any blank spaces.


Second page is Portrait.


Portrait page having the condition that if VENDOR NAME is exists then only that page should display.
Here this condition is working but I am getting last page is blank and if no vendor name exists it was displaying header with blank page as shown in below screen shot.


I am having the separate Dataset for this vendor name.
So I added one condition in header level of portrait page layout.
<?for-each@section:RFQ_TEST1_ROW?>

And I removed foreach condition  from portrait layout



And I added <?end for-each-group?>  tag at the end of template


Now RTF will not generate Blank page while previewing the output.

RTF template to get Distinct Count --- BI Publisher

Distinct values in BI Publisher RTF template.
Here I got one requirement to calculate distinct count of Purchase requisition numbers.
Report will display PR number and other information as shown in below screen shot. Here some PRs having multiple lines.


In report we need to display PRs with multiple lines and in header we need to display distinct count of PRs.
In above screen shot count is 413 and this is not distinct count.

Because in RTF template I used XML tag in header  level as <?count(field_name)?>



I tried with distinct keyword.
RTF template will not support DISTINCT keyword.
But publisher having one key word to calculate distinct values.
i.e :   distinct_values

syntax  : 
<?count(xdoxslt:distinct_values(field_name))?>

So just I replaced this tag in header level of RTF template as shown in below screen shot.

<?count(xdoxslt:distinct_values(REQ_NUMBER))?>

 

And save the template and upload sample data to check the results.
Now count will be distinct count.