|
|
|
|
|
|
Re: question on howto change the row background based on table data [message #76688 is a reply to message #76656] |
Thu, 22 September 2005 17:32  |
Eclipse User |
|
|
|
Jnorris,
About your question related to formatting the date field.
[ Question -
I have a grid in the report where I have the following in one of the
cells: new String( "Target Date: " ) + row["TARGET_DATE"]
In the property editor I have "Format DateTime" set to "9/22/05". However
in the report preview the full date prints out as "Target Date: 2005-09-22
13:04:45.233". Is there some other way to format the date object?
]
One way of doing it would be:
- Firstly the formatting through property editor applies only if the data item
return date type. In your case the value is string.
- You might want to add a text item ( instead of a date item) to the grid cell,
change the content type = html/dynamic text
And enter the following value:
Target Date = <VALUE-OF format="MMM-dd-YYYY" >row["TARGET_DATE"]</VALUE-OF>
--Rima Kanguri
jnorris wrote:
> Hi Jason,
>
> I think I'm just not writing the condition correctly. I'm trying to compare
> two date fields and the condition reads:
>
> row["ACTUAL_DATE"] Less than row["TARGET_DATE"]
>
> I need the comparison to be based on just the year/month/day so I probably
> need to strip off that part of the date object. I'm assuming that I will
> have to use javascript to accomplish this but I'm open to help or
> suggestions on how to do it.
>
> Also I have a grid in the report where I have the following in one of the
> cells:
> new String( "Target Date: " ) + row["TARGET_DATE"]
>
> In the property editor I have "Format DateTime" set to "9/22/05". However
> in the report preview the full date prints out as "Target Date: 2005-09-22
> 13:04:45.233". Is there some other way to format the date object?
>
> Thanks,
> Jim
>
> "Jason Weathersby" <jweathersby@actuate.com> wrote in message
> news:dgum81$icp$1@news.eclipse.org...
> > Jim,
> > Can you post your report design or build the same type of report using the
> > built in classic model source and reproduce the problem?
> >
> > Jason Weathersby
> > BIRT PMC
> >
> > "jnorris" <james.norris@pb.com> wrote in message
> > news:dguk47$f92$1@news.eclipse.org...
> >> Actually this doesn't work correctly after all. I have two conditions
> >> set to highlight the first column in the report based on comparing values
> >> of two columns from the dataset. In the designer preview it works as
> >> expected. However, when I run the application using the same dataset I am
> >> getting two rows in the report table for each row in the dataset with the
> >> second row being highlighted when it shouldn't be.
> >>
> >> Any ideas?
> >>
> >> Thanks,
> >> Jim
> >>
> >> "jnorris" <james.norris@pb.com> wrote in message
> >> news:dguitu$dls$1@news.eclipse.org...
> >>> Found this answer in a previous post from Jason Weathersby and it works
> >>> for me:
> >>>
> >>> Select the fields in the row and choose the highlights tab under the
> >>> Property
> >>> Editor. Add a condition for the highlight and set the background color.
> >>>
> >>> -Jim
> >>>
> >>> "jnorris" <james.norris@pb.com> wrote in message
> >>> news:dgugk5$a75$1@news.eclipse.org...
> >>>>I would like to be able to change the background color for a row in a
> >>>>table based on the value of some of the items in the row. If someone
> >>>>could tell me if this is possible and how to accomplish it I'd
> >>>>appreciate it.
> >>>>
> >>>> Thanks,
> >>>> Jim
> >>>>
> >>>
> >>>
> >>
> >>
> >
> >
|
|
|
Powered by
FUDForum. Page generated in 0.08691 seconds