PDA

View Full Version : grouping reports by month



Natasha
29-Aug-2005, 06:57 AM
BlankHello. Using VDF 10.1, I created a report in Web App, which I grouped by a date field.
However I would like to group that same report by month instead. Is there any way that this can be
done?

Dan Walsh
29-Aug-2005, 07:01 AM
If a month is passed to the report, and assuming the year is either
passed or otherwise known, your access method could use the date
functions from VDF Query (dates.nui) to determine the first and last
dates of the month. Then set the date properties in the DDO as with the
original report.

Natasha wrote:
> Hello. Using VDF 10.1, I created a report in Web App, which I grouped by
> a date field.
> However I would like to group that same report by month instead. Is
> there any way that this can be
> done?
>
>
>

Natasha
29-Aug-2005, 02:04 PM
Hi, Dan. Tried adding the dates.utl to the top of the WebApp.src and it
generated many errors. Can this be used in a Web application?

"Dan Walsh" <danwalsh46@earthlink.net> wrote in message
news:%23k0xdFJrFHA.1272@dacmail.dataaccess.com...
> If a month is passed to the report, and assuming the year is either passed
> or otherwise known, your access method could use the date functions from
> VDF Query (dates.nui) to determine the first and last dates of the month.
> Then set the date properties in the DDO as with the original report.
>
> Natasha wrote:
>> Hello. Using VDF 10.1, I created a report in Web App, which I grouped by
>> a date field.
>> However I would like to group that same report by month instead. Is there
>> any way that this can be
>> done?
>>
>>

Natasha
29-Aug-2005, 02:07 PM
I am sorry. I used the wrong include file. The functions worked with the
dates.nui . Thanks alot.
"Dan Walsh" <danwalsh46@earthlink.net> wrote in message
news:%23k0xdFJrFHA.1272@dacmail.dataaccess.com...
> If a month is passed to the report, and assuming the year is either passed
> or otherwise known, your access method could use the date functions from
> VDF Query (dates.nui) to determine the first and last dates of the month.
> Then set the date properties in the DDO as with the original report.
>
> Natasha wrote:
>> Hello. Using VDF 10.1, I created a report in Web App, which I grouped by
>> a date field.
>> However I would like to group that same report by month instead. Is there
>> any way that this can be
>> done?
>>
>>

Natasha
29-Aug-2005, 02:56 PM
Hi Dan.
This is the break procedure used to break the report on a monthly basis. But
instead the data still breaks on date. How can I get it to actually break
month by
month? I know how to get the first and last days of the month. But how do I
tell the
report to break by month?


Function Break1 Returns String

String sTranDate
String sFirstDayInMonth

Date dTranDate
Date dFirstDayInMonth
Date dLastDayInMonth

Get ddValue "Table_Name.Tran_date" To dTranDate

Move (FirstDayInMonth(dTranDate)) to dFirstDayInMonth
Move (LastDayInMonth(dTranDate)) to dLastDayInMonth

Move (DateToString(dFirstDayInMonth,DF_DATE_USA,1,'/' )) to
sFirstDayInMonth
Move (DateToString(dLastDayInMonth,DF_DATE_USA,1,'/' )) to
sLastDayInMonth

Send WriteHtmlRowBegin
Send WriteHtmlCell ("<h4>Date from: " + sFirstDayInMonth + "
to: " + sLastDayInMonth + "</h4>") 'COLSPAN="9"'
Send WriteHtmlRowEnd

Function_Return sFirstDayInMonth

End_Procedure



"Dan Walsh" <danwalsh46@earthlink.net> wrote in message
news:%23k0xdFJrFHA.1272@dacmail.dataaccess.com...
> If a month is passed to the report, and assuming the year is either passed
> or otherwise known, your access method could use the date functions from
> VDF Query (dates.nui) to determine the first and last dates of the month.
> Then set the date properties in the DDO as with the original report.
>
> Natasha wrote:
>> Hello. Using VDF 10.1, I created a report in Web App, which I grouped by
>> a date field.
>> However I would like to group that same report by month instead. Is there
>> any way that this can be
>> done?
>>
>>

Dan Walsh
6-Sep-2005, 09:30 AM
Natasha,

I've just returned from vacation and am just now seeing this. If you're
still having trouble with this, send me a private email and I'll have a
look.

Natasha wrote:
> Hi Dan.
> This is the break procedure used to break the report on a monthly basis. But
> instead the data still breaks on date. How can I get it to actually break
> month by
> month? I know how to get the first and last days of the month. But how do I
> tell the
> report to break by month?
>
>
> Function Break1 Returns String
>
> String sTranDate
> String sFirstDayInMonth
>
> Date dTranDate
> Date dFirstDayInMonth
> Date dLastDayInMonth
>
> Get ddValue "Table_Name.Tran_date" To dTranDate
>
> Move (FirstDayInMonth(dTranDate)) to dFirstDayInMonth
> Move (LastDayInMonth(dTranDate)) to dLastDayInMonth
>
> Move (DateToString(dFirstDayInMonth,DF_DATE_USA,1,'/' )) to
> sFirstDayInMonth
> Move (DateToString(dLastDayInMonth,DF_DATE_USA,1,'/' )) to
> sLastDayInMonth
>
> Send WriteHtmlRowBegin
> Send WriteHtmlCell ("<h4>Date from: " + sFirstDayInMonth + "
> to: " + sLastDayInMonth + "</h4>") 'COLSPAN="9"'
> Send WriteHtmlRowEnd
>
> Function_Return sFirstDayInMonth
>
> End_Procedure
>
>
>
> "Dan Walsh" <danwalsh46@earthlink.net> wrote in message
> news:%23k0xdFJrFHA.1272@dacmail.dataaccess.com...
>
>>If a month is passed to the report, and assuming the year is either passed
>>or otherwise known, your access method could use the date functions from
>>VDF Query (dates.nui) to determine the first and last dates of the month.
>>Then set the date properties in the DDO as with the original report.
>>
>>Natasha wrote:
>>
>>>Hello. Using VDF 10.1, I created a report in Web App, which I grouped by
>>>a date field.
>>>However I would like to group that same report by month instead. Is there
>>>any way that this can be
>>>done?
>>>
>>>
>
>
>

Natasha
14-Sep-2005, 10:21 AM
Hi Dan, sorry for not replying. Was not well and very busy. I did get it
to work though. Turns out it was very simple. Thanks for the help.
This is the code below.

Function Break Returns String

String sMonthName
Date dDate

Get ddValueEncode "TableName.Date" To dDate

Move (DateMonthName(dDate)) to sMonthName

Function_Return sMonthName
End_Function

Kind Regards
Natasha

"Dan Walsh" <danwalsh46@earthlink.net> wrote in message
news:J4hI59usFHA.960@dacmail.dataaccess.com...
> Natasha,
>
> I've just returned from vacation and am just now seeing this. If you're
> still having trouble with this, send me a private email and I'll have a
> look.
>
> Natasha wrote:
>> Hi Dan.
>> This is the break procedure used to break the report on a monthly basis.
>> But
>> instead the data still breaks on date. How can I get it to actually break
>> month by
>> month? I know how to get the first and last days of the month. But how do
>> I tell the
>> report to break by month?
>>
>>
>> Function Break1 Returns String
>>
>> String sTranDate
>> String sFirstDayInMonth
>>
>> Date dTranDate
>> Date dFirstDayInMonth
>> Date dLastDayInMonth
>>
>> Get ddValue "Table_Name.Tran_date" To dTranDate
>>
>> Move (FirstDayInMonth(dTranDate)) to dFirstDayInMonth
>> Move (LastDayInMonth(dTranDate)) to dLastDayInMonth
>>
>> Move (DateToString(dFirstDayInMonth,DF_DATE_USA,1,'/' )) to
>> sFirstDayInMonth
>> Move (DateToString(dLastDayInMonth,DF_DATE_USA,1,'/' )) to
>> sLastDayInMonth
>>
>> Send WriteHtmlRowBegin
>> Send WriteHtmlCell ("<h4>Date from: " + sFirstDayInMonth +
>> " to: " + sLastDayInMonth + "</h4>") 'COLSPAN="9"'
>> Send WriteHtmlRowEnd
>>
>> Function_Return sFirstDayInMonth
>>
>> End_Procedure
>>
>>
>>
>> "Dan Walsh" <danwalsh46@earthlink.net> wrote in message
>> news:%23k0xdFJrFHA.1272@dacmail.dataaccess.com...
>>
>>>If a month is passed to the report, and assuming the year is either
>>>passed or otherwise known, your access method could use the date
>>>functions from VDF Query (dates.nui) to determine the first and last
>>>dates of the month. Then set the date properties in the DDO as with the
>>>original report.
>>>
>>>Natasha wrote:
>>>
>>>>Hello. Using VDF 10.1, I created a report in Web App, which I grouped by
>>>>a date field.
>>>>However I would like to group that same report by month instead. Is
>>>>there any way that this can be
>>>>done?
>>>>
>>>>
>>
>>