First Last & Always

Been reminiscing about music from my youth, a boy of the eighties there was so much going on back then. I was into some weird stuff Gene Loves Jezebel, the Boot Hill Foottappers, the list goes on, I was also into the Sisters of Mercy where the title for this post comes from. Im nothing if not consistent with my tenuous blog titles.

Quick question on an internal forum asking how to show just the first and last record in a group. XPATH to the rescue there are a couple of functions we can use to fetch just the first and last record. Lets assume we are looping over EMPLOYEES.

<?for-each:EMPLOYEES?>

this will fetch all records. With the addition of the XPATH expression

<?for-each:EMPLOYEES[position()='1' or position()=last()]?>

The XPATH standard allows us to create a filter, if or boolean expression to limit the number of rows to be rendered.

position() - returns the current record being process. So position() = 1 will only return the first record

last() - returns the last record pointer. So position()=last() will give us the last record only.

Combining them together with an 'or' statement ensures we only get the first and last record in our group. Done!

Comments:

Do you think it's advisable to bring roses on a first date?  I met a girl who's just amazing, hot, cool, great body, etc.  I'm taking her to dinner and drinks, and I'm hoping for dessert at my place.

Regards,

In Love

Posted by Drew Peterson on January 12, 2010 at 01:31 PM MST #

How do you set 'current record only' functionality in new BIP reports? I am aware that the latest fixpack for Siebel 8.1.1.2 should fix the issue. But, is there a code or functions that would help to achieve this functionality without installing the fix pack?

Posted by RS on May 26, 2010 at 05:52 AM MDT #

thanks

Posted by Vasiliy on May 17, 2011 at 04:16 PM MDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Follow bipublisher on Twitter Find Us on Facebook BI Publisher Youtube ChannelDiscussion Forum

Join our BI Publisher community to get the most and keep updated with the latest news, How-to, Solutions! Share your feedback and let us hear your voice @bipublisher on Twitter, on our official Facebook page, and Youtube!

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today