Posts

Showing posts with the label Bip looping

Row filters

Image
How do i suppress row in the loop in BIP ? Obviously, we need to understand the condition what we need to apply. Once you identify the condition , it just we need to apply on the loop. One common mistake , people do is , they dont understand and write the conditions based on xml. The xml element might not be under the parent on what they are looping. So need to understand the xml structure to form the condition. here is the sample .

Split List in to Multi-Column

Image
Ooops, this turning out be an example needed for each query i get. Neway, i enjoy answering them. Consider this request, you have list, but you dont want to put in one below other. Rather, 4 in a row, or consider X in a row and rest X of them in next line and goes on. You can do it in many ways. First simple one would be have multiple for-each stmt's in each column. Add a filter on mod, 1,2,3,4,...0 Note: 0 is on the last column. Have a look at the snapshots, it is self-explanatory, i guess.

Power of Inlines

Image
How to add the looping element in same line - horizontally ? use @inlines command,in conjunction with for-each. Here is the sample on how to do.

Cross tab, by limiting the number of colums

Image
Cross-tab is the report, when the number of columns are unknown. But if the columns exceeds the page, the rest of the columns are moved to next page, by default. Horizontal-table-break command will be helpful here to repeat the number of columns to the next page. But if we want to control the number of columns that is displayed and if it exceeds the certain number, then the table has to be created in the same page from the columns where it left. In case there are 6 columns going accross (columns going accross are dynamic...). the first 5 columns should be displayed in one table and next 1 in another table below the first table In case of there are 16 columns going across.. 1st five columns in first table, 2nd five columns in 2nd table below the first table, 3rd five columns in third table below the 2nd table and remaining one column in the fourth table below the 3rd table is it possible ? Yes it is possible :) Here it is.

Crosstab issue

Image
http://forums.oracle.com/forums/thread.jspa?messageID=3344649 In order to get the all months,the for-each should have been put on the whole xml, rather than , the current group. the current group might be missing some month value in the xml.

Column Spanning

Image
I saw a request , Column span BIP forum on how to column span, though Tim has his own blog post to explain this Tim's Post , Xplanation It seems causing some confusion, on how to do it, Its an attribute to be used in the column we wanted to span, [ xsl:attribute xdofo:ctx="block" name="number-columns-spanned"] 3 [xsl:attribute ]

Limit rows per page

Image
Solution to have fixed number of rows in each page. This solution is not a perfect solution considering the line size increases due to text in each line. But this solution gives you how to fix no of rows per page. In the forum Heated discussion Users are arguing for having a placeholder in same fixed place on all pages, irrespective of no of lines , increased line size due to word-wrap. Here i am not going to discuss anything related to that. But a simple logic of , how to fix number of rows. Step 1: Loop through the records and display them Step 2: Have a condition for MOD of position(), then insert a page-break on the result of Zero Step 3. Blank row has to be filled, a condition has to be added, to find how many blank rows ROWLIMIT - (count of row mod ROWLIMIT) will gives us the rows to be filled. Step 4: use foreach_number function to simulate the iteration. Refer the images below

Long time no See ;) to this blog.

Image
I dont check that mail id so frequently, someone was lucky i guess, i logged in today, got 110 mail ;). iam not crazy to read all these mail immediately, thou iam very crazy abt BIP from the initial days, this mail struck my eyes.. opened it, saw a request which could be simple , but thought , i should not answer this question as i already answered this in BIP forum, but thought do blog on this, so it might help ppl searching , The Great Google grandpa anytime after this will get a hit. I am working in a XML publisher report. I need to repeat the record in the output depending on a report parameter. what a long xplaination was that LOL... Here you go ! /// I am using for loop to repeat the records in the RTF template. Example – If the parameter value = 1 Output Empno Ename Sal Dept 1 Ram 20 1 2 Scott 30 3 3 Smith 20 1 Example – If the parameter value = 3 Output Empno Ename Sal Dept 1 ...

Bip looping

Longtime back, i answered this in the forum :) try these http://sourceware.org/ml/xsl-list/2001-05/msg00517.html http://www.biglist.com/lists/xsl-list/archives/200105/msg00515.html http://www.biglist.com/lists/xsl-list/archives/200105/msg00536.html string-length function. http://www.zvon.org:9001/saxon/cgi-bin/XLab/XML/addressbook.html?stylesheetFile=XSLT/stringFunctions.xslt TEMPLATE ++++++++++++++ <?xdoxslt:set_variable($_XDOCTX, 'cnt',string-length(.))?> <?for-each:xdoxslt:foreach_number($_XDOCTX,1,xdoxslt:get_variable($_XDOCTX, 'cnt'),1)?> X <?end for-each?> ------------------------------------------------------------------------------------------------------ XML <TEST>FIVE</TEST> this will print no.of X for the length of the string passed. so it will print "XXXX" Hope this helps