Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Writing a Report Exception (in case table empty)
Message
De
10/03/2010 06:51:51
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
09/03/2010 13:36:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
01453531
Message ID:
01453678
Vues:
63
This message has been marked as a message which has helped to the initial question of the thread.
>you mean dont use tables in the DE of my ReportS?

Using tables or cursors directly in the DE causes lots of problems. If the report shows some queer behavior, and doesn't work as expected, the FIRST thing I do is check the DE - and delete all tables.

Also, preparing a single cursor beforehand gives you lot of flexibility. For example, a single SELECT - SQL command can include several options based on user selection. Here is some sample code:
if ThisForm.OpgOrder = 1
  lcOrder = "Code"
else
  lcOrder = "Name"
endif
if ThisForm.ChkIncludeActive
  lcWhere = ""
else
  lcWhere = "where IsActive"
endif

select * from MyTable;
  order by &lcOrder;
  where &lcWhere;
  into cursor Temp

if _tally = 0
  MessageBox("No data - please check the selection criteria.")
  return
endif

report form MyReport
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform