×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

No output. How to make a nice stylish message for the end user?

No output. How to make a nice stylish message for the end user?

No output. How to make a nice stylish message for the end user?

(OP)
Hello!

If my report generates no output (e.g. the report does not have any data for the chosen time period) I'd like to give the user a nice message a la "Sorry no data for this time period." instead of the webfocus message.

I tried EMPTYREPORT=ON which generates a nicer message than without this line. Yet webfocus still displays a lot of information that confuses the user.

Can anybody help?
Thanx a lot.
Eva

RE: No output. How to make a nice stylish message for the end user?

Build a html-page with a user-friendly message to tell the user there is no data.
In your request you can ask Focus if the table has output by reacting on the Focus-variable &LINES. Then you can branch to your message:


TABLE FILE filename
  PRINT fields
  ON TABLE HOLD AS XX FORMAT HTMTABLE
END
-RUN
-IF &LINES EQ 0 THEN GOTO NO_OUTPUT;
-* Output:
-HTMLFORM XXOUTPUT
-EXIT
-* No output:
-NO_OUTPUT
-HTMLFORM NOOUTPUT
-EXIT

Frank van de Kant
http://www.explicit.nl

RE: No output. How to make a nice stylish message for the end user?

(OP)
Hello Frank,

I don't understand the line -HTMLFORM XXOUTPUT. what do I have to insert here?

Eva

RE: No output. How to make a nice stylish message for the end user?

The file XXOUTPUT.HTML or XXOUTPUT.HTM is a file in your HTML-dir with the following code in it:

<html>
 !IBI.FIL.XX;
</html>

The variable !IBI.FIL.XX; refers to a file with name XX in the focus path including its temppath.
The HTML-file XXOUTPUT can contain normal HTML-statements including styling, title, meta-tags etc.

The Focus-command

-HTMLFORM filename

means that Focus loads this file and shows it in the browser of the user.

But off course Focus has an alternative:

-HTMLFORM BEGIN
put some html-code here
-HTMLFORM END

Frank van de Kant
http://www.explicit.nl

RE: No output. How to make a nice stylish message for the end user?

(OP)
Hello Frank,

sorry to ask you again, but no matter what I fill in for filename I always get the error:

there was a error running 'app/test4.fex' this error has to to with the file 'xxoutput.htm ' it may be missing the internal errorcode was '1023'

Eva

RE: No output. How to make a nice stylish message for the end user?

Eva,

Don't worry about asking again. You can send me the fex by mailid:info@explicit.nl

I will have a look and reply an example. As usual there a several options to solve this problem.

Frank van de Kant
http://www.explicit.nl

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close