Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Field names & totals appear after each record
Message
 
 
To
13/05/2008 20:03:57
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01316737
Message ID:
01316942
Views:
12
Hi Fred,

To add an ALIAS() to the Header from the Report Toolbar drag a field to your report header. Double click on this field and type ALIAS(). Then after you verified you have the correct alias, delete this field or you may add Print When = .f. to never print it.

The main idea is to make the report independent on the table/cursor you're going to run it against. Of course, the table/cursor has to have the right structure, but that's it.

So, you need to make sure that you don't accidentally save anything related to the table alias. In other words, in all your fields you should have FieldName and not the Alias.FieldName.

Also the report should not have private DE (you need to verify it from the Report Menu - the DE should not be checked).

Now, if you want to make sure you don't have the table name somehow embedded into your report, here is a hack.

Save both FRX and FRT files in some safe place in case you would accidentally do something wrong.

type in the command window
use myReportName.frx && report is just a table
BROWSE for upper('TableName') $ upper(Expr) && use your name of the table
use

This will show you the suspect records. If you have them, then you can either remove the table name directly from the report by browsing, or you should go back into the report and make sure you don't have aliases in the fields.

Now, when you're debugging, you may put

select ... && Your long select statement
BROWSE && To see if you indeed selected the correct data in the right order

Finally, if you have a grid on the form, there may be a problem.

See Forms with Grids and printing reports FAQ #15515 for details.

>I do not know how to add an alias () to the header at all???
>
>As far as not doing it right uh... I am sure I hust do not understand properly what you have asked me. as far as run the select statement from the command window I suppose and when I create a report after issuing this select statement do you mean when I create a new report that this info is then re-inserted through command window or???
>
>Now I am confused
>
>Any ideas how to unconfuse me?
>
>Thanks,
>
>Fred W.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform