Hi John,
not sure if I understand you 100% but to summarize how I understand your
question you want the 2nd control to follow the lead of the 1st control so to
speak.
Hmm... I've done this myself but I wonder if this is not too difficult. I
assume that the field underlying the first control is an actual date/time
field. The trick was for me get the dates right for the selection on the 2nd
control. For example if you select June in the first control you will need
all the data until the 31st of May in the second... of course each month has
a different number of days.... I solved in the following (cumbersome?!?) way:
I created a 'from' and a 'to' parameter...
FROM:
=datevalue(Month(Fields!StartDate.Value)&"/01"&"/"&Year(Fields!StartDate.Value))
TO:
=datevalue(month(Fields!StartDate.Value)&"/"&IIF(month(Fields!StartDate.Value)=1,31,
IIF(month(Fields!StartDate.Value)=2,28,
IIF(month(Fields!StartDate.Value)=3,31,
IIF(month(Fields!StartDate.Value)=4,30,
IIF(month(Fields!StartDate.Value)=5,31,
IIF(month(Fields!StartDate.Value)=6,30,IIF(month(Fields!StartDate.Value)=7,31,IIF(month(Fields!StartDate.Value)=8,31,IIF(month(Fields!StartDate.Value)=9,30,IIF(month(Fields!StartDate.Value)=10,31,IIF(month(Fields!StartDate.Value)=11,30,31)))))))))))&"/"&year(Fields!StartDate.Value))
You will need to replace the parts 'Fields!StartDate.Value' with something
like
'Parameters!Date_Parameter.Value' because your second control is triggered
by the first (I did this as a navigation to another report)... It may look
difficult, but it really isn't... not saying this is the easiest way because
I'm only a noob with this stuff (lots of Access experience, only about a
month in Visual Studio)
hope it helps!
mischa
[quoted text, click to view] "John Wright" wrote:
> How can I check for an NaN when doing math functions? Isn't this the same a
> divide by zero?
>
> John
> "John Wright" <riley_wrightx@hotmail.com> wrote in message
> news:OuujRXkyHHA.1208@TK2MSFTNGP03.phx.gbl...
> >I have one report that contains three matrix controls. The first matrix is
> >filled with data for the current month (June of 07 for example). I have a
> >parameter dropdown listed with the months to select. The second matrix
> >report is the year to date total which is all data up to the previous
> >month. So if I put in the date of 6/1/07 I get all the data in matrix 1 for
> >the current month, now I want to fill the second matrix with the data up to
> >5/1/07 (or one month less that the data for grid 1). I have a parameter
> >set up that is set to a list of all months to report on. How can I
> >automatically set the parameter for the second matrix to be less one month
> >of the parameter selected? I am reporting against an Access 2000 database
> >(not by choice.)
> >
> >
> > John
> >
>
>