Report.close or something?

amb
Member Posts: 14
Hi,
I try to explain my problem:
I run a report. Now, I want to close this report, but not only quit or break. I want to close the window the report is inside.
Something like this: CurrReport.close
thx 4 help,
amb
I try to explain my problem:
I run a report. Now, I want to close this report, but not only quit or break. I want to close the window the report is inside.
Something like this: CurrReport.close
thx 4 help,
amb
0
Comments
-
What do you mean with:I want to close the window the report is inside.
Normally I would use
CurrReport.QUIT;
or I may also try
ERROR('');
This last one is not advised because if the report is part of a batch of commands, this batch will be interupted.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Hi kriki,
thx, I mean:
if I use CurrReport.quit the report stop, no problem, but I want to "close" the report in OnInitReport(). F.e. I want to close the window, in which I can setup the filter before I start the report.
If I start the report and use CurrReport.quit, I must use "ESC" or something to see the form I´ve used before.
I hope you understand what I mean.
Regards,
amb0 -
If I understood correctly :
you don't want to run the report, without showing the request-form or just the part for selecting a set of records
-don't show the request form=>the report has a property "UseReqForm" : put this to No.
-don't show the filters=>the dataitems have some properties:
DataItemTableView : in this you put the key you want
ReqFilterFields : don't put any fields in this oneRegards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
No, I know the property.
I save a report with a password. The inputbox, which is getting the password is loaded in OnInitReport().
That´s my code:
OnInitReport()
window.OPEN('Passwort #1########');
window.INPUT(1,Password);
window.CLOSE;
Login.INIT;
IF NOT Login.GET('Reportentry') THEN
ERROR('Benutzer: "Reportentry" existiert nicht!');
Hash := Login.Kennwort;
Login.VALIDATE(Kennwort,LOWERCASE(Password));
IF (Login.Kennwort = Hash) THEN
BEGIN
END ELSE
MESSAGE('Password false!');
If the password is not correct, the user doesn´t see the request-form because he isn´t allowed to see the report.
Something like "CurrReport.UseReqForm := no" instead of "MESSAGE('Password false!')" in my code can be a solution.
thx,
amb0 -
If the user may NOT run the report, you can put
ERROR('Password false!');
instead of
MESSAGE('Password false!');
If the user may run the report, but may not see the requestform, you can put
CurrReport.USEREQUESTFORM(FALSE)Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
thx kriki,
that seems to be a good solution.
thanks for replying.0 -
If you want to close a report without showing the request form, you could use the following code in OnInitReport:
CurrReport.USEREQUESTFORM := FALSE; CurrReport.QUIT;
For some reason, CurrReport.QUIT on its own doesn't work, and RequestOptionsForm.CLOSE also doesn't seem to have any effect.
See also my post at http://www.mibuso.com/forum/viewtopic.php?f=5&t=29159Alastair Farrugia0 -
Hi all
I have one problem again.
How i need to do show one form when closing report?
It's mean report/form checkbox/-> preview-> report previewed->close report /click on "X"/ -> if form checkbox checked then form will show
merry christmas & happy new yearbye my work, bye navision0 -
This is only possible doing it from the object that calls the report with a RUNMODAL-command. After running the report, you need to ask the report (through a function in it) which is the value of your boolean. If it is true, you run your form.
In the report, create a function like this:
FUNCTION ShowForm(): AS BOOLEAN
EXIT(blnShowTheForm);
END;
In the object where you call your report:
...
repTheReport.RUNMODAL;
IF repTheReport.ShowForm() THEN BEGIN
FORM.RUNMODAL(FORM::"The Form"); // you can also use RUN in stead of RUNMODAL
END;Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Ok
thanks kriki
Regardsbye my work, bye navision0
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