More Colorful Groupings

I knew I had jumped the gun ... the devil is in the detail as it were - Bill followed up yesterday on the forum with a little more detail on what was needed.


Thank you for your fast response, actually I should have made my question clearer. Let's take your sample data, what I need is like this:

For group 1 Nuts and Bolts Limited, make background yellow,
981110 10-NOV-04 Standard EUR 122
100000 28-MAY-04 Standard FIM 122
100001 28-MAY-04 Standard FIM 200
1 03-JUN-04 Standard FIM 400
100004 28-MAY-04 Standard FIM 100
00s 07-JUN-04 Standard FIM 100
FI1009 10-MAY-04 Standard FIM 1220
Stop make background yellow.

For group 2 Tick Tock Clocks, make background blue,
100002 28-MAY-04 Standard DEM 235
100003 28-MAY-04 Standard DEM 100
2001 01-JUN-04 Standard EUR 1000
2002 01-JUN-04 Standard EUR 1500
2003 01-JUN-04 Standard DEM 1000
2004 01-JUN-04 Standard DEM 2000
3001 04-JUN-04 Standard EUR 1000
FI1011 25-MAY-04 Standard DEM 2000
Stop make background blue.

For group 3, make background back to yellow
Big Bike Motorsports
3001 01-JUN-04 Standard SEK 1000
FI1013 02-JUN-04 Standard USD 25000
Stop make background back to yellow

For group 4, make background back to blue
Second Cars
FI1010 20-MAY-04 Standard FIM 2440
Stop make background back to blue


We're mixing 'Groups' and 'records' here, in my original post I colored fonts and backgrounds based on the group or 'for-each'. What Bill is decribing above is to alternate the coloring of records within a group. Still doable, still not 'disappearing an elephant' but maybe 'pulling a bunch of flowers out of your sleeve' - OK OK I'll stop with the magician analogies.


Heres the template, looks similar to the ones from yesterday but without the shading.


Colors5:


The only addition is the IFColor field - inside there is some code to manipulate the table fill color based of some boolean expression.


<?choose:?>
 <?when:position() mod 2=0?>
 <?attribute@incontext:background-color;'Yellow'?>
 <?end
when?>
 <?otherwise:?>
 <?attribute@incontext:background-color;'Red'?>
 <?end
otherwise?>
<?end choose?>


This relies on the position() and 'mod' functions to allow us to, in this case alternate between two colors we can increase the mod value to alternate between more if we wish. If you are going to stick with just 2 then we can simplify further.


Colors6:


Just set a color background on the table and in the formfield use:


<?if:position() mod 2=0?><?attribute@incontext:background-color;'Red'?><?end if?>


So by default the color will be yellow but when the 'mod' condition is satified ie every even row you'll get a red background. Of course standard HTML color names are supported along with RGB HEX values.


 

Comments:

Hi Tim, I am generating some RTF letters using XMLP. These letters have some text which gets edited by user after generation of letter. For this, I need a functionality which will catch user's attention to such text in letter. In old system this was achieved by displaying such text in Form Fields. Then user has to just press F11 which takes him through all form fields. Can you please suggest me a way to have form fields in RTF output generated by XMLP? or is there any alternative to grab user's attention to such text? If alternative of highlighting background color is considered, then it appears in printing. So please let me know if you have any solution for this. Thanks in advance. Regards, Manjiri

Posted by manjiri on August 26, 2008 at 02:07 AM MDT #

Hi Manjiri We do not preserve the formfields in our RTF output right now. You could highlight the background of areas that need to be filled out. then you have the problem of removing the highlights before printing. for this the user could have a macro in their copy of Word. Before you ask, you can not embed macros in your RTF templates - MS does not allow it in the RTF spec. So, it would need to be a macro installed in the Normal.dot template in Word on the users machine that they would execute on exiting or you could attach it to the Save or Close event in Word to automate it. Tim

Posted by Tim on August 27, 2008 at 06:21 AM MDT #

The internet is seeing many services like this arise, and with the ease of access to such information (practically anyone can get these records) - privacy concerns are becoming more of an issue. There are obviously benefits to these types of services, but they also allow for people to gain information about you and your past that maybe you did not wish to reveal. People can also use this inforamtion to stalk, harras, threaten, or blackmail you. Although what they would be doing is wrong, the victim would still suffer. Thoughts?

Posted by Find Marriage Records on December 05, 2009 at 05:56 AM MST #

I'm giving you nowmy forex predictionsfor the year ahead of us:EUR/USD:1.3480GBP/USD:1.5010Dollar/Yen:80.40Dollar/Frank:1.1560Let's see if my forecast will be correctat the end of 2010..:-)

Posted by forex on January 11, 2010 at 02:06 AM MST #

So here aremy predictions on forexfor this year:EUR/USD:1.2050Pound/Dollar:1.9080Usd/Jpy:110.20Usd/Chf:1.1040Let's see if my forecast will be correctat the end of the year..:-)

Posted by forex on January 11, 2010 at 02:07 AM MST #

Being organized and having a trading plan is important for anything we do. As a former java programmer ,we would never dream of stepping onto the battlefield without a solid plan. I purchased professnioal forex traning from Fx Training Zone and now currently earn around $3000 per month.

Posted by Hal Behring on July 19, 2010 at 10:32 PM MDT #

Try this.... Its working for me....
<?if:ITEM_COST<1?><?attribute@incontext:color;'WHITE'?><?attribute@incontext:background-color;'RED'?><?end if?> <?ITEM_COST?>

Posted by guest on April 11, 2012 at 10:23 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