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

Wednesday, July 27, 2016

BIP: Report Usernames

 

There was a simple requirement to print the login name of the user running a BIPublisher report on that report itself. This got me hunting. There are tonnes of ways to get the login name from an oracle database, but because of the way BIP uses the DB and runs the SQL, not all of those ways would give the right answers. cleartext.blogspot.com

Simplest way, use the  <?$XDO_USER_NAME?>  parameter n your template.

But my requirement was to enforce data security on the report, to ensure the logged in user sees only the records he should see. This meant fetching the username at the SQL itself.

One sure shot way to do this is to use :XDO_USER_NAME in the SQL. This will fetch the userid of the logged in user. cleartext.blogspot.com

And there is one more way.

Use the sys_context ('userenv','CLIENT_IDENTIFIER') CLIENT_IDENTIFIER function in the SQL. cleartext.blogspot.com

image

 

To get all the sys_context parameters, this SQL can be used. cleartext.blogspot.com

select
  sys_context ('userenv','ACTION') ACTION,
  sys_context ('userenv','AUDITED_CURSORID') AUDITED_CURSORID,
  sys_context ('userenv','AUTHENTICATED_IDENTITY') AUTHENTICATED_IDENTITY,
  sys_context ('userenv','AUTHENTICATION_DATA') AUTHENTICATION_DATA,
  sys_context ('userenv','AUTHENTICATION_METHOD') AUTHENTICATION_METHOD,
  sys_context ('userenv','BG_JOB_ID') BG_JOB_ID,
  sys_context ('userenv','CLIENT_IDENTIFIER') CLIENT_IDENTIFIER,
  sys_context ('userenv','CLIENT_INFO') CLIENT_INFO,
  sys_context ('userenv','CURRENT_BIND') CURRENT_BIND,
  sys_context ('userenv','CURRENT_EDITION_ID') CURRENT_EDITION_ID,
  sys_context ('userenv','CURRENT_EDITION_NAME') CURRENT_EDITION_NAME,
  sys_context ('userenv','CURRENT_SCHEMA') CURRENT_SCHEMA,
  sys_context ('userenv','CURRENT_SCHEMAID') CURRENT_SCHEMAID,
  sys_context ('userenv','CURRENT_SQL') CURRENT_SQL,
  sys_context ('userenv','CURRENT_SQLn') CURRENT_SQLn,
  sys_context ('userenv','CURRENT_SQL_LENGTH') CURRENT_SQL_LENGTH,
  sys_context ('userenv','CURRENT_USER') CURRENT_USER,
  sys_context ('userenv','CURRENT_USERID') CURRENT_USERID,
  sys_context ('userenv','DATABASE_ROLE') DATABASE_ROLE,
  sys_context ('userenv','DB_DOMAIN') DB_DOMAIN,
  sys_context ('userenv','DB_NAME') DB_NAME,
  sys_context ('userenv','DB_UNIQUE_NAME') DB_UNIQUE_NAME,
  sys_context ('userenv','DBLINK_INFO') DBLINK_INFO,
  sys_context ('userenv','ENTRYID') ENTRYID,
  sys_context ('userenv','ENTERPRISE_IDENTITY') ENTERPRISE_IDENTITY,
  sys_context ('userenv','FG_JOB_ID') FG_JOB_ID,
  sys_context ('userenv','GLOBAL_CONTEXT_MEMORY') GLOBAL_CONTEXT_MEMORY,
  sys_context ('userenv','GLOBAL_UID') GLOBAL_UID,
  sys_context ('userenv','HOST') HOST,
  sys_context ('userenv','IDENTIFICATION_TYPE') IDENTIFICATION_TYPE,
  sys_context ('userenv','INSTANCE') INSTANCE,
  sys_context ('userenv','INSTANCE_NAME') INSTANCE_NAME,  cleartext.blogspot.com
  sys_context ('userenv','IP_ADDRESS') IP_ADDRESS,
  sys_context ('userenv','ISDBA') ISDBA,
  sys_context ('userenv','LANG') LANG,
  sys_context ('userenv','LANGUAGE') LANGUAGE,
  sys_context ('userenv','MODULE') MODULE,
  sys_context ('userenv','NETWORK_PROTOCOL') NETWORK_PROTOCOL,
  sys_context ('userenv','NLS_CALENDAR') NLS_CALENDAR,
  sys_context ('userenv','NLS_CURRENCY') NLS_CURRENCY,
  sys_context ('userenv','NLS_DATE_FORMAT') NLS_DATE_FORMAT,
  sys_context ('userenv','NLS_DATE_LANGUAGE') NLS_DATE_LANGUAGE,
  sys_context ('userenv','NLS_SORT') NLS_SORT,
  sys_context ('userenv','NLS_TERRITORY') NLS_TERRITORY,
  sys_context ('userenv','OS_USER') OS_USER,
  sys_context ('userenv','POLICY_INVOKER') POLICY_INVOKER,
  sys_context ('userenv','PROXY_ENTERPRISE_IDENTITY') PROXY_ENTERPRISE_IDENTITY,
  sys_context ('userenv','PROXY_USER') PROXY_USER,
  sys_context ('userenv','PROXY_USERID') PROXY_USERID,
  sys_context ('userenv','SERVER_HOST') SERVER_HOST,
  sys_context ('userenv','SERVICE_NAME') SERVICE_NAME,
  sys_context ('userenv','SESSION_EDITION_ID') SESSION_EDITION_ID,
  sys_context ('userenv','SESSION_EDITION_NAME') SESSION_EDITION_NAME,
  sys_context ('userenv','SESSION_USER') SESSION_USER,
  sys_context ('userenv','SESSION_USERID') SESSION_USERID,
  sys_context ('userenv','SESSIONID') SESSIONID,
  sys_context ('userenv','SID') SID,
  sys_context ('userenv','STATEMENTID') STATEMENTID, cleartext.blogspot.com
  sys_context ('userenv','TERMINAL') TERMINAL
from dual
     
Try running this on Oracle Live SQL

Tuesday, June 14, 2016

BIP: Distinct

 

cleartext.blogspot.com

BIP has a distinct function

xdoxslt:distinct_values
If you use it on a node of elements, it returns a space separated sequence of its distinct elements.
Eg: for this xml:

cleartext.blogspot.com

<ROWSET>
    <ROW>
        <CwaProductCode>001</CwaProductCode>
    </ROW>
    <ROW>
        <CwaProductCode>002</CwaProductCode>
    </ROW>
    <ROW>
        <CwaProductCode>001</CwaProductCode>
    </ROW>
    <ROW>
        <CwaProductCode>003</CwaProductCode>
    </ROW>
</ROWSET>

cleartext.blogspot.com

Using <?xdoxslt:distinct_values(CwaProductCode)?> gives:

001 002 003

Using <?count(xdoxslt:distinct_values(CwaProductCode))?> gives:

3

But what if one needs to group by the distinct values, and then count the number of elements under it ? Then distinct can’t help.

cleartext.blogspot.com

<?for-each-group:ROW;./CwaProductCode?>
<?CwaProductCode?><?'-'?><?count(current-group()/.)?>
<?end for-each-group?>
Gives the answer:

001-2
002-1
003-1

cleartext.blogspot.com

cleartext.blogspot.com

Friday, May 20, 2016

HCM: Printing Hours and Rates on Checkwriter

 

Fusion HCM Cloud uses BIP templates as part of it payroll process, its also used for printing checks. One of the most common requirements I have received is to print the employees hours and rates on the checkprinter output.

Here is what the vanilla template looks like, its called USCheckWriterReport.rtf.

cleartext.blogspot.com

image

It can be seen that the earnings section in the bottom prints only current and YTD amounts. The hours and rates are not printed by default.

The hours and rates are in a different node in the Payslip xml 

cleartext.blogspot.com

This is the node for earnings:

image

And this is the one for Hours and Rates

image

So what we need to do is the use the REPORTING_NAME as a foreign key, and lookup the correct HOURS_X_RATE record, and then print it in the earnings table.

cleartext.blogspot.com

This is the code to use:

<?$ava_earnings/GLB_PAY_ARCH_PR_HOURS_X_RATE[REPORTING_NAME=current()/REPORTING_NAME]/EARNINGS_HOURS?>

 

PS: I am just putting this up for my own reference, and for anyone out there stuck like me.

cleartext.blogspot.com

Friday, April 15, 2016

Fusion HCM: Testing Payroll templates

 

Oracle’s Fusion HCM cloud service uses BIP templates as part of its pay processing. When the Payoll processes are submitted, HCM does a lot of things, it generates the Pay data, and populates tables. But the final step of this process is to generate the actual payslip , and for this it invokes a BIP report. © 2016 cleartext.blogspot.com

As report designer, I often get requests to modify these reports. But to test the reports, one need not run the entire payroll process again. Simply re-running the report with the modified template will suffice. © 2016 cleartext.blogspot.com

The BIP template to modify for US is the USOnlinePayslip.

image

Its location is:  image

To see when it was last run, simply check the history of this report, under More-> History. Reset the query and run search.

image

 

Pick up any of the last records, and drilldown  on it. Now copy the Payroll Action Identifier from this page © 2016 cleartext.blogspot.com

image

Now you can go back and re-run this report with this parameter, and can see the changes of your template instantly ! Ta-da ! © 2016 cleartext.blogspot.com

Monday, March 21, 2016

Date calculations in eText templates

 

Aahh, eText. That most hated or Oracle templates. One area where this template really falls is in the area of date calculation, or date manipulations. Example a standard requirement is to calculate an end date, or proposed/expected end date for some transaction. Check is valid for only ..30 days from date of issue. cleartext.blogspot.com

The official documentation does no mention any way to x number of days to dates. But if you search on supportweb, you will come across the INCREASE_DATE function.

To add 30 days to today’s date, use INCREASE_DATE(SYSDATE(),30). To substract days, use a negative number for the offset. cleartext.blogspot.com

But that’s it, eText does not provide a way to get the month, year, or day from a date. So those will have to be calculated in whatever onpremise/cloud system is being used and the value must be present in the xml. eText also does not provide a way to add extra functions or XSLT functions in the templates, like in BIP RTF templates. cleartext.blogspot.com

 

 

Originally published on cleartext.blogspot.com

Thursday, March 10, 2016

Sequence Numbers in eText templates

 

As I said earlier, Oracle’s eText template is really painful to work with. Its does not have support variables or arrays, so when the need arises to have something temporarily stored somewhere, you are lost. The one thing eText does have, is a method to generate sequence numbers. Basically you use the DEFINE_SEQUENCE command.

image

The define sequence command has four subcommands: reset at level, increment basis, start at, and maximum. The increment basis subcommand specifies if the sequence should be incremented based on record or extract instances. The allowed parameters for this subcommand are RECORD and LEVEL. Enter RECORD to increment the sequence for every record. Enter LEVEL to increment the sequence for every new instance of a level.  cleartext.blogspot.com

To generate the sequnce numbers, use the SEQUENCE_NUMBER function in the template.

image

But what if you just want to keep count of something, and not count levels or records in the data ? Just leave out the INCREMENT_BASIS completely.  cleartext.blogspot.com

image

So now, whenever SEQUENCE_NUMBER function is called, the current value will be printed, and the counter will be increased by 1. This happens everytime the function is invoked.

There are some payment interfaces where the number has to be incremented in steps of 5 or 10. For example, one of the ADP checkprinter format template requires a counter to start at 30, and be incremented in steps of 5. So its 30, 35, 40, 45…

To do that the SEQUENCE_NUMBER function should be used with some mathematics.

image

 

 

Originally published on cleartext.blogspot.com

Saturday, January 23, 2016

eText woes

 

What is the worst report template to work with ? After 9 years of working on varous Oracle report template formats, I am happy and frustrated to report that that would the the eText BIP template from Oracle.

cleartext.blogspot.com

It is commonly used to generate Payment Texts, to be processed by banks and other financial institutions, like ADP. It is the only Oracle template which can generate output in .txt format. It has very little functions, and all the documentation can be summarized to this one page. That’s it. All the functions and settings which can be used on the eText template is right there. The output of this template is not meant to be human-read, it is always meant to be transmitted to a banking or payment system via secure ftp. From the initial version of the template system, no new function has been added. So it is kinda version independent, there is no dependency on what version of BIP you have installed. eText templates designed on older versions of BIP will happily work on newer versions. And vice versa. But this is probably the only good thing ever about this template format.

cleartext.blogspot.com

Whereas BIP RTF templates also have some functions supported, there are ways to inject some xslt/xdofx functions in different namespaces into them. So this gives rise to redundant, but useful bunch of functions. And there is an added functionality of writing xsl templates within BIP RTF templates. And if even that does not work, one can link in external jars with added functions. But none of these can be done on eText templates. You have to make do with what you have.

cleartext.blogspot.com

Well this makes working on eText templates extremely frustrating. And error prone. The fact that you are designing payment system integrations increases the seriousness of the situation. If there are even fractional errors during the processing, that would direct the banks to pay a different amount out.Scary.

The good thing is that there is a small community of eText developers/consulants which can be accessed via supportweb. Most of the usual issues one faces are documented with workarounds. If a requirement cannot be done , all you can do is blame Oracle and tell the customer.

Here is an issue: you use the Number command to print numbers in the eText output.

cleartext.blogspot.com

image

Internally the template uses the format_number function to convert the source into a number. But this function has a problem, it errors out if the source data has non-numbers in it. It cannot even handle a null. So if the PAYMENT tag in the xml contains null or any non-integer, the template will error out.

Simplest solution ? Just multiply the source with 1  !

image

Multiplying with 1 will work fine if PAYMENT has numbers in it. And in case of any non-number, it will just get converted to 0 ! No errors thrown !

Weird. But it works, no need to do a separate check of null or isnumber.

 

Originally published on cleartext.blogspot.com

Friday, July 3, 2015

Inserting images in BIP templates for HTML output

 

Just documenting a BIP trick to insert images when the output will be in HTML. Time to time, report designers have to embed static images like logos or emblems on reports which have to be rendered along with the final output. Simply inserting the image into the RTF template will work fine if the output is in RTF or PDF format, but the images will be blank if the output is in HTML. This is , of course, because HTML does not embed the image, it just adds the the url reference to the image. Here is how to place an image in the RTF template so that it renders properly no matter what the output format.

cleartext.blogspot.com

First of all, you will have to place the image to be rendered in a public server somewhere, this can be anywhere on the internet which can be accessed via a url. Do not place this image on any server behind corporate firewalls,or it won't be rendered.

cleartext.blogspot.com

 

1: First, enable 'Developer Mode' in your Word. For this, go to File->Options->Cutomize Ribbon, and check the box next to 'Developer' in 'Main Tabs':

tmpB0AE

2: Now under the new 'Developer' tab, click on 'Design Mode'

clip_image001

3: Now, from under "Legacy forms", choose the image holder: cleartext.blogspot.com

clip_image001[5]

4: This will put a nice grey square in your template. Right click that,  choose 'Format Control' , and go to 'Alt Text'

tmp46C

5: Under the alternative text, insert the url to the final image to be rendered.  cleartext.blogspot.com

tmp9EE7

6: Thats it ! Now when you generate the output of this template, the image will be rendered properly in any output format, including HTML.

7: Bonus ! You can even add a unique URL to the image, so that when it it clicked, the user it re-directed to another website. For this, right click the image (or grey square) and choose hyperlink. Insert the url in the hyperlink box. The re-direction also works regardless of output type.

cleartext.blogspot.com

 

Cheers !

Wednesday, May 20, 2015

Oracle BI Publisher 11.1.1.9.0 is available !!!

 

 

Oracle BI Publisher 11.1.1.9.0 was GA on May 19th and you can get the download, documentation, certification matrix and release notes here at the BI Publisher home page in OTN. Here is a quick snapshot of new features in this release. The download is also available at Oracle Software Delivery Cloud site. The documentation page has also been given a fresh new structure.

Well, the Word Addon is still not updated, which means it still does not support Microsoft Word 2013. But templates can be created online on the BIP server site itself.

Saturday, April 4, 2015

BIP Logs

 

A quick roundup on how to set up the log levels on a BIP setup.

On the BIP Desktop Addon:

Here is how to increase Log levels on your windows machine, running the BIP Destop addon

cleartext.blogspot.com

1.Find out the Java folder your Word add on is using.
In side your Word's Addin Tab, go to BIPublisher -> Tools -> Options -> Preview

tmp2EF8

2. In this java folder, go to /lib/ folder, and create a file named xdodebug.cfg

3. Add these two lines the xdodebug.cfg file:

LogLevel=STATEMENT
LogDir=C:\xdo_logs

4.Create a folder named xdo_logs under C:\  Next time you preview a report on your addon, BIP will create logs in the folder.

This article first appeared on cleartext.blogspot.com

Alternate: TemplateViewer

If you want a quick method to get logs without making these changes, you could simply use the TemplateViewer jar file. It will be under the TemplateViewer folder under the BIP addon installation. For me, it was under :

C:\Program Files (x86)\Oracle\BI Publisher\BI Publisher Desktop\TemplateViewer\tmplviewer.jar

1: Just run the jar file in Windows.

tmp841B

 

2:Use the browse button to go a folder where you have your RTF template & XML data file.

3:In the left pane, select the XML file, and in the right pane, select the RTF file you need to test.

tmpACC2

4. Before you run the report, go to the Settings tab, and select log leve as Maximum.

tmp8B31

5. Click on the Start Processing button, to see the logs getting generated and the preview being generated.

On a BIP Server:

Here are the steps to change your BI Publisher Enterprise Server to be in a debug mode:

  1. Login to BIP as Administrator
  2. Select Admin -> System Maintenance -> Server Configuration
  3. Change Debug Level to ‘Debug’ under General Properties
    clip_image001
  4. Click on the ‘Apply’ button and restart the server.

 

When set to maximum log level, BIP will generate the logs, and in addition, create a .xml file, .xsl file, and a .fo file. The XML file will contain the dataset used to generate the report. The .fo file contains the final output, and can be renamed to PDF or whatever output you had chosen and it will open up in its viewer.

 

Happy BIP ! and Happy Easter !

This article first appeared on cleartext.blogspot.com

 

This article first appeared on cleartext.blogspot.com

Saturday, January 10, 2015

Siebel BIP Performance Tuning

 

1) Increasing the amount of heap memory available to the Java Virtual Machine (JVM)

Increasing the memory available to the JVM can improve the performance of the report generation and ensure that this error is not encountered.

"C:\OraHome_1\jdk\bin\java" -XX:MaxPermSize=128m -Xms512m -Xmx512m -Duser.language=en -Duser.dir=C:\OraHome_1\oc4j_bi\bin -Duser.country=US -jar "%OC4J_JAR%" %CMDARGS%

OS

Memory Value

Windows (32-Bit)

Any value of up to 1.4GB (based on available RAM)

Windows (64-Bit)   

1.4 GB or higher (based on available RAM

2) Changing the Server Request Processor DB Polling Interval

By decreasing the polling interval the Server Request Processor can check the S_SRM_REQUEST table more regularly thereby reducing the period before the request processing is started. Once the change has been made it is necessary to shutdown and restart the affected Siebel Server before the change will take effect.It is recommended that this change be made only on the Siebel Servers hosting the XMLPReportServer component as this change will result in an increased number of queries being issued against the S_SRM_REQUEST table in the database.

change param PollIntvl=1 for comp SRProc

3) Minimize the size of Integration Objects/Components

An excessive number of unrequired fields in the report will lead to increased data generation times from the XMLPReportServer component and will result in an increased data file size for BI Publisher to process.

4) Minimal Force Active fields on  BC-

Ensuring that a minimal number of fields are flagged as Force Active will help to ensure that the number of fields being returned when querying against the Integration Component for report generation is further reduced.

5) XMLPReportServer PreloadSRF parameter to TRUE

Prelolading the SRF into the process ensures that any performance overhead during the SRF load is encountered during component startup and not during report processing. This parameter is listed under Advanced tab.

6) Inactive Web Services not used in Enterprise

Due to Bug 10587893 at present the component will load all of the active webservices configured in the enterprise rather than just those which it may access, such as PublicReportService or PublicReportService_v11. This leads to a performance overhead during the first report request for any process as these can take a significant period of time to load. In order to reduce the impact of this loading process review the webservices configured as 'Active' in the Siebel Enterprise through the Administration - WebServices > Outbound Webservices and Inbound Webservices views.  Set any webservices which are not used in the enterprise to 'Inactive'..

7) Minimize logging levels on all report generation components

This will include the requesting Object Manager, the XMLPReportServer component, the EAI Object Manager, the File System Manager component, and the BI Publisher Server itself.

8) Eliminate any un-necessary scripting during report generation

 

9) Create Separate Named Datasource For Siebel BI Publisher Reports With Large Data Volume

Generating Large Reports (over 10,000 records) - When running report generation there may be scenarios in which more than 10,000 records need to be retrieved. The standard ServerDataSrc within the Siebel Enterprise has a row limit of 10,000 for any single query and therefore in order to support large report generation a custom data source is required without this restriction.

Friday, November 7, 2014

BIP: If , then ,else

 

Looks like whole of the Siebel community has moved onto Open UI, but I am spending more and more time into Siebel-BI Publisher reports and their Integration. I had to setup a really, really complex report template for our Order Management module. The final report has 65 for loops and 162 if conditions , and 85 set_variables ! Though BIP’s function set is nicely documented, there are times, I felt, when a requirement could not be implemented as easily as it seemed. Specially when it comes to condition checks. Here are a few pointers if you get lost.

1: If condition: The function is

<?if:[condition]?>
[statements]
<?end if?>

The actual condition has to be provided after the colon (:) after the if statement. The statements to be executed are to be provided before the <?end if?> tag. For some reason, BIP inserts a new line in the report whenever it sees an if tag.

2: If Inlines:

<?if@inlines:[condition]?>
[statements]
<?end if?>

Same as the if condition above, but @inlines statement prevents BIP from inserting a new line in the output report.

3: If @row  and @column. 

<?if@row:[condition]?>
[statements]
<?end if?>

<?if@column:[condition]?>
[statements]
<?end if?>

 

These are to be used in grid layouts/tables to ensure the output of the condition is printed in the same row or column. Otherwise the output gets wrapped into next rows/columns.

4: If @ context.

<?if@incontext:[condition]?>
[statements]
<?end if?>

The '@incontext' is a useful addition to the 5.6.3 release shortening code requirements further to update attributes, when dealing with text output.

As long as the condition checks are straight, these functions prove enough. But things start getting tricky when you need the else clauses , or to build else-if ladders.

5: if-else. Syntax

<?xdoxslt:ifelse([condition],[true statements],[false statements])?>

A simple if-else check, this function is in the xdoxslt namespace. the [true statements] are executed if the condition is evaluated to true, and [false statements] are executed if not. New lines are not inserted for this function.

6:  else if ladder. Syntax

<?xdofx:if [condition 1] then [true 1] else if [condition 2] then [true 2] end if?>

This xdofx function is used when complex else-if ladders need to be built. It can also be used as simple if else condition, so the second if [condition 2] is not required. New lines are not inserted for this function.

 

The @inlines, @incontext, @row, @column statements can only be used with for-each loops, to avoid the newlines inserted automatically by BIP

eg:  <?for-each@inlines:

 

tmp9B00

Hope this is useful, Happy BIP !

Monday, April 21, 2014

Check boxes not appearing–BI Publisher Reports

 

Today I lost a whole day trying to get BI Publisher to print check boxes in PDF output reports. Though this issue is common on most implementations, and lots of solutions documented, none of that worked for me. I am documenting the changes I made to get it working here, hopefully it will help some one else.

My requirement was to get Siebel-BI Publisher reports to print checkboxes, for boolean fields in PDF output, for the same fields where Siebel displays checkboxes.

Siebel version : 8.1.1.11 SIA [23030] ENU  (Open UI)

BI Publisher version : 10.1.3.4

Server OS: Solaris 2.6.39-400.17.1.el6uek.x86_64


RTF Template:

After you have installed the BIP Word Addon, you need to enable the Developer tab, to insert the CheckBox form control.

image

Ensure that the “Check box enable” option is checked. Also, you may specify default value, here I have selected “Not checked”, so the box would appear without a check in it be default.

image

Map the control to a field in the XML, and ensure it works on your local machine.

Now if the mapping is correct you should see a checkbox on it when you preview the report. If the font setup is incorrect on you Windows machine, you will see a Rhombus instead of a checkbox.

PDF Output:

image

This means that BIP is able to map the field to a checkbox, but the font installation is not complete on your Windows machine. This is OK, we need to ensure the fonts are installed correctly on the server.

 


Server side setup:

    1. On you BIP server, upload the Wingdings 2 fonts. This is a .ttf file, you may also find this in your Windows machine at C:\Windows\Fonts\
    2. Upload this .ttf file to your BIP server onto …jdk/jre/lib/fonts. This will change depending your BIP server installation. For me the path is

    /oracle/apps/OraHome_1/jdk/jre/lib/fonts

    1. Now log into your BIP server as Administrator. Navigate to Admin –> Font Mappings.  clip_image001
    2. Click on “Add Font Mapping”. In the next screen, check if your new font appears in the target font mappings dropdown list. clip_image002

    If the font appears in the list, select it under Truetype. In the top Field, enter Windings2. Leave the Style and Weight as Normal. Leave the TTC Number blank.

    1. Click on “Add Font Mapping”. In the next screen, check if your new font appears in the target font mappings dropdown list.
    2. Edit your xdo.cfg file. It will be somewhere under Configuration folder     …/OraHome_1/xmlp/XMLP/Admin/Configuration/xdo.cfg
    3. Open the xdo.cfg file in notepad. BIP would have already added the font mapping into it. You now need to add the character code for the “Yes” and “No” values to toggle the Checkbox. Add the below line in the properties container:                                                                                        <property name="rtf-checkbox-glyph">Wingdings2;0082;0163</property>. image This is what my file looks like.
    4. Restart BIP Server.
    5. When you generate the PDF output of the report, the checkboxes should appear properly now.  image
    6. However, if you generate an HTML output report, you might see “R” in place of the check box. This is because in Wingdings2 font, capital R is mapped to the checked checkbox (decimal code 82) .  And the pound symbol is mapped to the unchecked checkxbox (decimal code 163).image

 

Hope it helped !

 


Notes:

I was getting tired triggering the report from Siebel every time I made a change, so I created a new standalone report directly in BIP, with a xml file for its input. This way, I could test changes directly in BIP without logging into Siebel.

I found that although Wingdings1 font had checkboxes, this would not appear in PDF output. The easiest way to see the chars in Word is to Insert ->Symbol.

image

Word will show you the code for each symbol when you insert them.

Wingings 1 font works right when you’re report has HTML output. But won’t work with PDF, it would come out as some junk chars. For PDF to work, you have to use Wingdings 2.

This is inputted in the cfg file :

<property name="rtf-checkbox-glyph">Wingdings2;0082;0163</property>

Wednesday, January 1, 2014

BIP - Siebel functions

 

If you use Siebel functions in your BIP reports for date conversion, you will get “class-not-found” errors during your report generation.

 

image

 

The fix for this is to point BIP to the path where your Siebel JARs are installed.

In your Work designer: Go to Addins-> Tools –> Options, and add a the path to the Java option field, under Preview.

For me, Siebel is installed on D drive.

-Xmx256M  -Xbootclasspath/a:D:\Siebel\8.1\Tools_1\CLASSES\SiebelXMLP.jar;D:\Siebel\8.1\Tools_1\CLASSES\XMLP.jar;D:\Siebel\8.1\Tools_1\CLASSES\siebel.jar;D:\Siebel\8.1\Tools_1\CLASSES\XSLFunctions.jar;D:\Siebel\8.1\Tools_1\CLASSES\SiebelCustomXMLP.jar;D:\Siebel\8.1\Tools_1\CLASSES\SiebelCustomXMLP_SIA.jar

 

image

Friday, January 1, 2010

BIP: Grouping and Parent Access

 

I found an interesting question on stackoverflow in the BI-Publisher tag. At first I thought BIP could not handle this requirement, but a little bit of trial and error taught me something. cleartext.blogspot.com

With this xml:

<root>
    <OrderEntry-Orders>
        <CwaChannel>Customer Portal</CwaChannel>
        <CwaOrderType>UT Sales</CwaOrderType>
        <ListOfOrderEntry-LineItems>
            <OrderEntry-LineItems>
                <CwaLineTotalAmount2>1000</CwaLineTotalAmount2>
                <CwaProductCode>001</CwaProductCode>
            </OrderEntry-LineItems>
            <OrderEntry-LineItems>
                <CwaLineTotalAmount2>1000</CwaLineTotalAmount2>
                <CwaProductCode>005</CwaProductCode>
            </OrderEntry-LineItems>
        </ListOfOrderEntry-LineItems>
    </OrderEntry-Orders>
    <OrderEntry-Orders>
        <CwaChannel>Customer Portal</CwaChannel>
        <CwaOrderType>UT Sales</CwaOrderType>
        <ListOfOrderEntry-LineItems>
            <OrderEntry-LineItems>
                <CwaLineTotalAmount2>1000</CwaLineTotalAmount2>
                <CwaProductCode>005</CwaProductCode>
            </OrderEntry-LineItems>
        </ListOfOrderEntry-LineItems>
    </OrderEntry-Orders>
    <OrderEntry-Orders>
        <CwaChannel>Customer Portal</CwaChannel>
        <CwaOrderType>UT Redemption</CwaOrderType>
        <ListOfOrderEntry-LineItems>
            <OrderEntry-LineItems>
                <CwaLineTotalAmount2>1000</CwaLineTotalAmount2>
                <CwaProductCode>005</CwaProductCode>
            </OrderEntry-LineItems>
        </ListOfOrderEntry-LineItems> cleartext.blogspot.com
    </OrderEntry-Orders>
</root>

 

This BIP code :

<?for-each-group: OrderEntry-LineItems; CwaProductCode?>

<?CwaProductCode?>

<?if:../../CwaOrderType='UT Sales' and ../../CwaChannel='Customer Portal'?>

<?'True'?>

<?end if?>

<?../../CwaOrderType?>

<?count(current-group()/.)?>

<?end for-each-group?>

Produces this output:

001

True

UT Sales

1

005

True

UT Sales

3

The count function returns a value of 3, but it prints only one value of OrderType. So it looks like the if condition is not filtering at all and always returns True.

The count returning 3 gives us the clue that there are two more elements there which need to be processed.

This code:

<?for-each-group: OrderEntry-LineItems; CwaProductCode?>

<?CwaProductCode?>

<?for-each:current-group()?>

<?if:../../CwaOrderType='UT Sales' and ../../CwaChannel='Customer Portal'?>

<?'True'?>

<?end if?>

<?../../CwaOrderType?>

<?end for-each?>

<?count(current-group()/.)?>

<?end for-each-group?>

Returns the answer: cleartext.blogspot.com

001

True

UT Sales

1

005

True

UT Sales

True

UT Sales

UT Redemption

3

Here the second True is print only once, as it iterates through the parents of the grouped node. cleartext.blogspot.com

So when there is a grouping done, and you need to check if its parent satisfies a condition, one single if statement will not suffce. Instead one more “ for-each:current-group() “ is required to iterate through all the grouped elements , and then the if statement should be added after that.

 

So the original BIP code in the question: cleartext.blogspot.com

 

<?for-each-group: OrderEntry-LineItems; CwaProductCode?>
<?if:../../CwaOrderType='UT Sales' and ../../CwaChannel='Customer Portal'?>
<?for-each: current-group()?>
<?CwaProductCode?>
<?xdoxslt:set_variable($_XDOCTX, 'countFund', xdoxslt:get_variable($_XDOCTX, 'countFund')+1)?>
<?xdoxslt:set_variable($_XDOCTX, 'TotalCount', xdoxslt:get_variable($_XDOCTX, 'TotalCount')+1)?>
<?xdoxslt:get_variable($_XDOCTX, 'countFund')?>
<?xdoxslt:set_variable($_XDOCTX, 'countFund', 0)?>
<?end if?>
<?end for-each-group?>
<?xdoxslt:get_variable($_XDOCTX, 'TotalCount')?>

Returns:

001

1

1

 

005

1

005

1

005

1

4

Can be re-written as

<?for-each-group: OrderEntry-LineItems; CwaProductCode?>

<?CwaProductCode?>

<?for-each: current-group()?>

<?if:../../CwaOrderType='UT Sales' and ../../CwaChannel='Customer Portal'?>

<?xdoxslt:set_variable($_XDOCTX, 'countFund', xdoxslt:get_variable($_XDOCTX, 'countFund')+1)?>

<?xdoxslt:set_variable($_XDOCTX, 'TotalCount', xdoxslt:get_variable($_XDOCTX, 'TotalCount')+1)?>

<?xdoxslt:get_variable($_XDOCTX, 'countFund')?>

<?xdoxslt:set_variable($_XDOCTX, 'countFund', 0)?>

<?end if?>

<?end for-each-group?>

<?end for-each-group?>

<?xdoxslt:get_variable($_XDOCTX, 'TotalCount')?>

 

Which returns: cleartext.blogspot.com

cleartext.blogspot.comcleartext.blogspot.com

001

1

005

1

1

3