Report request form

viriato
Member Posts: 105
When running a form report with a date tab in the request form you have in the field list:
"Period Type"
"Period Start"
"Period End"
How do you access this data in the form code for example. Thanks
"Period Type"
"Period Start"
"Period End"
How do you access this data in the form code for example. Thanks
0
Answers
-
IF your dataitem is named Date in the report then:
Date."Period Start" is the value of the field in the current record.
Date.GETFILTER("Period Start") is the value the user entered on the request form.
If you need the filter at the beginning you should place the commend in the OnPreReport trigger...0 -
Thanks. One more question.
If you have let's say table with record and one of those records is a date field and you want to display them by "Period type" how would you do it?
Let's say I would take "Period Type" Month
January Record 1
January Record 2
January Record 3
February Record 4
February Record 5
...
and so on0 -
I would do the following:
Example with G/L Entry:
If I have the Date dataitem filtered to show month, then each month has a Period Start and Period End. So under the dataitem Date I would add a G/L Entry Dataitem indented one level after the date rec. Then through the propertied of the Dataitem link or through code I would do:
"G/L Entry".SETRANGE("Posting Date",Date."Period Start",Date."Period End");
Then in the body of the G/L Entry I would add the fields of the G/L Entry that I need and a textBox with SourceExpression Date.Name (or something similar)...
Hope that helps...0 -
Thank you for your help.0
-
You're welcome.0
-
One last question Kapamarou if you know.
If i want to group some data by months in a report like if i have a time period of
01.01.08 to 01.06.08
Jany 5 (invoices)
Feb 3
Mars 10
Apr 3
Mai 3
Jun 1
Is there a easy way to display the months in Nav or would I need to create manually create a month array.0 -
You can do that by using a Footer or Groupfooter section.
But with the Date dataitem it could be difficult since you cannot change the keys. In that case I would add a footer on the (for example) G/L Entry dataitem.
If I wanted to count I would print a "G/L Entry".Count in the section. If I wanted to add the Amount I would add a the amount in the totalfields property or in the Onpredataitem trigger I would do CurrReport.CREATETOTALS(Amount). Look up help for CREATETOTALS and Footers. It' easy to add automatic totals / subtotals that way...0 -
Thanks for your help Kapamarou. Have a nice weekend.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions