New-Bee needs help -step 1 in programming

jcn
Member Posts: 14
Hello every one -and merry Christmas to you all 
The simple problem:
I need to make a command button on my sales header form that calls my new report with the order no. from the sales header.
So I need to parse the order number from the sales header to the report!
I have downloaded the example made on these pages (parsing parameters between objects) and I understand the core of it, but I can not seem to get it working.
I know that this is very simple to most of you, but I hope that you will give me a few minutes of your time and make a small "step by step" guide for me
Hopefully this will give me the basic knowledge to go through "bigger" things myself afterwards.
I run Attain 3.60 in danish.
-thanks in advance!

The simple problem:
I need to make a command button on my sales header form that calls my new report with the order no. from the sales header.
So I need to parse the order number from the sales header to the report!
I have downloaded the example made on these pages (parsing parameters between objects) and I understand the core of it, but I can not seem to get it working.
I know that this is very simple to most of you, but I hope that you will give me a few minutes of your time and make a small "step by step" guide for me

Hopefully this will give me the basic knowledge to go through "bigger" things myself afterwards.
I run Attain 3.60 in danish.
-thanks in advance!
Best regards
Jens Christian Nørtoft
Denmark
Jens Christian Nørtoft
Denmark
0
Comments
-
Have a look at the on-line help at REPORT.RUNMODAL
(or look at my Navision reference guide you can download here: http://www.mibuso.com/dlinfo.asp?FileID=288 ).REPORT.RUNMODAL(Number [, ReqWindow] [, SystemPrinter] [, Record])
Number
Data type: integer
The ID of the report you want to execute.
ReqWindow
Data type: boolean
Tells the system whether it should display the request window for the report.
SystemPrinter
Data type: boolean
Tells the system whether it should use the default Windows printer or use the Printer Selection table to find the right printer for this report. For example, if the report prints on continuous forms, you can set up an entry in the Printer Selection table to tell the system to always print this report on a specific printer.
Record
Data type: record
Tells the system which record to use in the report. The system will use any filters attached to the record you specify.
Example: REPORT.RUNMODAL(50000, TRUE, FALSE, Rec);
Put this in the OnPush-trigger of your Command button.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
Hi jcn
A merry chrismas to you too.
I will present a generic scenario here wherein we have
a form : say form1
value to be passed to report : value
a report to be invoked from within form1 : report1
a global variable in report1 : FilterValue
1:
You need to have a function in report1 : SetValue that would assign value to FilterValue
SetValue( value as type)
{
FilterValue = value
}
2:
In report1, on preDataItem
DataItem.setfilter( ValueField, FilterValue)
valueField is the field in dataItem that maps to the FilterValue.
3:
OnClick of GenerateReport on Form1, you need to do this
Report1.SetValue( value )
value is OrderNo in ur case.
4.
After setting the value, run the report.
Report1.run
And you should have ur work done. 8)
regards
Jyotsna______Doubt is the father of Invension_______0 -
Hello Guys
Thanks for the fast and thorough answers -I look foreward to the holidays so I can test, try and learn :-)Best regards
Jens Christian Nørtoft
Denmark0 -
If you have to print a Sales Order and you want to use a different report form the standard one, you have just to change it in the Sales Report list. Form Sales and Receivables, click Setup, Report Selections Sales. In that window you can associate a Document with its report.
I don't know if this is the case, otherwise use the samples you read in this forum.
Bye,
Marco0
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