Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Writing a Report Exception (in case table empty)
Message
From
10/03/2010 06:51:51
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
09/03/2010 13:36:36
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
01453531
Message ID:
01453678
Views:
62
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)
Previous
Reply
Map
View

Click here to load this message in the networking platform