f.date_select: display month and year together in one single option menu? - html

Instead of separate option menus (one for year and one for month), how could I merge year and month into visually one single menu for a date attribute?
Each option would be a year/month pair, i.e.
2014 January
2014 February
Currently I have this code: f.date_select :begin_date, discard_day: true (to visually exclude the days).

You might like the following small jQueryUI code, which does exactly what you describe: http://lucianocosta.info/jquery.mtz.monthpicker/

Related

Nested Parent Grouping with RDLC

I'm trying to add groupings to my tablix. I was able to add a parent grouping and it would add in a new header and it works fine but my table is very long so I'm trying to nest the grouping value ontop of the collection.
Current grouping settings
Before Groupings
Date Description
Jan Description A
Feb Description A
Jan Description B
Feb Description B
With Parent Grouping
Client Date Description
A Jan Description A
Feb Description A
B Jan Description B
Feb Description B
What I would like
Date Description
Client - A
Jan Description A
Feb Description A
Client - B
Jan Description B
Feb Description B
I was wondering does RDLC support this type of grouping, if so may I ask how would I do that?
You have to modify the default layout of the tablix to achieve the look you want. My dataset is slightly different than yours in that I'm showing a value instead of a description but the technique is the same.
Select your tablix and at the bottom of the design window in Visual Studio find the "Row Groups" box. Now select the drop-down arrow on the details group and add a Parent Group. Make sure to check the "Add group header" option in the dialog box.
Then go back to the "Row Groups" box and select the drop-down arrow in the details group again and this time select "Group properties". Add a new group expression on your month field.
You will now have a tablix that looks like your initial example with an additional row inside of the parent grouping (this is the group header row).
First select the parent group column (in my case it is ASSIGNMENT) and delete it. Then select the two cells in the parent group header row, right click, and select "Merge cells". Then set the value of this cell to be an expression that will show your header text. In my case I've used:
="Assignment group - " + Fields!ASSIGNMENT.Value
The final design of your tablix will look similar to this:
and the output looks like this:
Of course you'll probably want to tweak it and make it look a bit nicer than that. This is just a quick & dirty example.

Using DateDiff in Access to colour code dates in Conditional Formatting

I have a table of clearances and their expiry dates. If a clearance has expired I would like it to be red, if it expires within 6 months I want it to be amber, if it expires in more than 6 months green and if it is yet to be granted (hence doesn't yet have an expiry date) then black.
I have got the text to default as black and then have
RED
[C_ExpiryDate]<Now()
AMBER
DateDiff("m",[C_ExpiryDate],Now())<6 And [C_ExpiryDate]>Now()
GREEN
DateDiff("m",[C_ExpiryDate],Now())>6 And [C_ExpiryDate]>Now()
This seems to have a few different problems, the red works fine from what I can tell. But the other two seem to be handled poorly, for example a clearance with 06 Sep 2015 is amber (today is 03 July 2014 so this should be green). Similar for 05 Mar 2017, I think it is just looking at the month regardless of the year, but I'm not too sure how to handle this better.
Not sure if it might be easier to default as green and perhaps write something like
[C_ExpiryDate] = ""
But this didn't seem to do anything and everything was coming up as green even when there was a blank date. Similar for single quotations.
Any suggestions appreciated...
Which version of MS Access are you using? This works for me:
The way you have it written this is happening (i'm substituting #06/Sept/2015# for [C_ExpiryDate] to keep with your example)
Red?
#06/Sept/2015#<Now() --> False
Amber?
DateDiff("m",#06/Sept/2015#,Now())<6 And #06/Sept/2015#>Now() --> True
Green is not evaluated
The problem is that you have the greater date first and the lesser date last. Switch them.
Or alternatively, since you are checking [C_ExpiryDate]>Now() anyway you can take the absolute value of them and not worry about order.
#06/Sept/2015# < Now() --> False (Red)
DateDiff("m",Now(),#06/Sept/2015#) < 6 And #06/Sept/2015# > Now() --> False (Amber)
DateDiff("m",Now(),#06/Sept/2015#) > 6 And #06/Sept/2015# > Now() --> True (Green)
You have no equal to 6 months condition though. Something for you to think about.

SSRS 2008 R2 Charts - Hide WhiteSpace for a series value that returns 0

I need to remove the whitespace for the bars (or series) that do not return a value.
The chart I posted returns no values for April, May, June, Sept., Nov. or December and as result there is a gap for each of those months. I'd like to hide these gaps and have the existing bars display side by side.
I've tried adding a conditional statement to each month under the Visibility property (under Series Properties) and had no luck. Example:
=iif(isnothing(sum(fields!jan.Value)), true, false)
Any help would be appreciated.
![1]: http://i.stack.imgur.com/ZrSXN.png
Couldn't you filter out the data at the chart level and/or the category group level. Then it wouldn't get included in the rendering of the chart. You can filter on Sum(field) = 0 or whatever the appropriate aggregation is that you are using.

Datefield to select years

I'm using a Datefield to get user birthday..But its very difficult to select very past years like 1987..Here I have to move 12 month to pass a Year..Is any way to acheive it easily?
<mx:DateField width="17%" height="75%" selectedDate="{new Date()}" formatString="MM/DD/YYYY" />
You can enable yearNavigationEnabled property of DateField control
<mx:DateField yearNavigationEnabled="true"/>
Just mouse press down on year navigation up arrow or down arrow it will increase/decrease.
Consider splitting this field into three list selectors, and populate each with sequential numbers, 1-31 for days, 1-12 for months (or use name selector), and 1900-current year (generated) for year. I have not ever seen any sites use such a combined field to select date of birth, this is used only for dates 1-2 months from current date. I expect such a component was NOT designed to select distant dates.

How can i show labels on a single bar graph depecting its value in flex for column chart?

Please check this link
http://livedocs.adobe.com/flex/3/html/help.html?content=charts_displayingdata_07.html#332805
here the thing is it is showing labelposition on all 3 column chart(column series)
(from link.. jan :2000,feb:1000,march:1500)
but instead of showing in all months i want the value to be displayed only on march
how can i do it?
need help
Create an itemrenderer(Implement IDataRenderer), and in set data method, write the condition for March month.