Posts

Showing posts from September, 2009

Cross tab Summation in RTF

Image
Crosstab report. It can be done in many ways, ideally people love to take some granular level data and manipulate and apply that in different template. Advantage of granular level data : We can use it for some other RTF template. We can show that the way we need to. If you pre-group, then your report will be faster. But you use the flex of using the same data for showing it different layout. since you pre-grouped it, its fixed data for some layout. You use this flex here. its a trade off on flex or performance, i choose go on the balanced line of these two. Forums thread with issue 1. it should be pretty simple in BIP template too. 2. have a look the thread link , i answered how to do it in Datatemplate. 3. Db rollup is also good option but for the answer at OPTION 1 look at this picture.

Summation of deficit data 2

Image
Again poped up, You have to use this, since you have data deficit in xml. <?xdoxslt:div(sum(current-group()[Interchange_Qual_Desc='BEST-QUAL']/Interchange_Qual_Count),/ROOT/LIST_Interchange_Tran_mc/Interchange_Tran_mc/Interchange_Tran_Count_Per_mc) * 100?> change the value, BEST, MID and NON for the three columns respectively. For the total, again <?xdoxslt:div(sum(/ROOT/LIST_Interchange_Qualilfication_Summary/Interchange_Qualilfication_Summary[Interchange_Qual_Desc='MID-QUAL']/Interchange_Qual_Count),(/ROOT/LIST_Interchange_Tran_v/Interchange_Tran_v/Interchange_Tran_Count_Per_v + /ROOT/LIST_Interchange_Tran_mc/Interchange_Tran_mc/Interchange_Tran_Count_Per_mc)) * 100?>

Summation of deficit data

Image
Request was, how to display the data when the value is not present in xml data. Just add the fixed number of description as rows and calculate respective total

Delimiter based E-text

Image
How to generate csv from Bi Publisher ? Have a look at this

Custom Dynamic sort in Bi Publisher

Image
Issue faced by someone on forum The data source can't be changed. You got the data as xml, and you want to specify the data sorting. Not in alphabetical order or numerical order, some arbitrary sort on particular column. We are make use of sort and decode and convert the element into number and get in sorted order. Looks possible and simple, but, one big hurdle over there, cannot use xsl 2.0, have to keep it simple. Here comes the handy "boolean to number conversion". We can make use of this here. Have a look at the snapshot. Look at the xml, status field is unsorted there. Expected output as follows. Status: Open Status: Unresolveable Status: Closed <?sort: (number(status='Open') * 1) + (number(status='Unresolveable') * 2) + (number(status='Closed') * 3);'ascending';data-type='number'?> Use the above sort.

Column Formatting

Image
We need formatting like * negatives values enclosed in () * Red color for negative values * format the number if not null How to do. Have a look at the syntax <?attribute@incontext:color;'red'?> <?attribute@incontext:font-weight;'bold'?> that's it, fantastic, you will see values in red and bold , with bracket. Other times, you might want to add border based on condition. here it is <?if@row:ELEMENT_NAME='SOME_CONDITION'?> <?attribute@incontext:border-top-color;'black'?> <?attribute@incontext:border-top-style;'solid'?> <?attribute@incontext:border-top-width;'thin?> <?attribute@incontext:text-align;'center'?> <?end if?> How to underline the text. <fo:inline text-decoration="underline"> <?YOUR_NUMBER_ELEMENT?> </fo:inline> This syntax is going to help you