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.
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 one
Regards,Alain Krikilion No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
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.
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
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!
Comments
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.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
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,
amb
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 one
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
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,
amb
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)
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
that seems to be a good solution.
thanks for replying.
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=29159
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 year
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;
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
thanks kriki
Regards