Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 9 Jahren, 4 Monaten
Letzter Beitrag:
vor 9 Jahren, 4 Monaten
Beteiligte Autoren:
Jeff Graham, M. Beaven, Fabrice Harari

iPreview and iPrintReport Delay

Startbeitrag von Jeff Graham am 29.12.2008 21:29

I have a report that is slow because of a related query being executed for each data item. The iPreview and iPrintReport show a blank page and then additional pages are built but this makes the users think the program has failed.

Is there a easy way to cause the preview to not show until the report is finished or to at least put a message on top of the preview saying to be patient?

Or should I put the report out to a temporary file and the display that?

Thanks,
Jeff

Antworten:

Hi Jeff...

Just before starting the printing, you can display a message in a non modal window, with the in front of all setting, saying to wait till the report is constructed... you then close this window by a timer code after a reasonable time (enough for the first page to be displayed, at least)

best regards

Fabrice Harari
WinDev, WebDev, WinDev Mobile Video Courses

von Fabrice Harari - am 30.12.2008 12:45
Hi Fabrice,

Thanks. Have a great New Year.

Jeff

von Jeff Graham - am 30.12.2008 14:43
Jeff- Is it possible to replace the query with direct file access through HCommands? (perhaps adding keys, etc.) In cases where I have had this issue, replacing the queries has resulted in major performance gains with execution speed (contrary to my expectations).

Regards,

-Marc

von M. Beaven - am 30.12.2008 14:52
Hi Marc,

The problem is that I am reporting on data from another application and have no authority to add fields, keys, or indexes.

However, I did find a better variation on Fabrice's suggestion. I put the following in the opening code of the report:

// Open a message window due to long wait as pages are built.
OpenChild(WIN_Message)
WinStatus(WIN_Message,AboveAll)

WIN_Message just has a text box saying "Report is dynamic. Please wait for report to display. Multiple pages will display slowly." The window never automatically closes and it is not active so the user can't close it either. Then in the Post-Print of the END_OF_DOCUMENT I put the following:

// See opening of WIN_Message in Opening Code
// WIN_Message cannot be closed by user
IF NOT WinStatus(WIN_Message) = NotFound THEN
Close(WIN_Message)
END

This seems to do what my user wants.

Thanks for all the help,
Jeff

von Jeff Graham - am 09.01.2009 22:43
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.