Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to modify a field value dynamically in a report
Message
From
06/09/2009 17:45:15
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01422876
Message ID:
01422888
Views:
80
Thanks for the help Sergey,

Yes I have set print repeated values to no. The problem here is that some repeated values, such as units per case in my example, may need to be printed because they belong to the next product even though they are have the same value for two consecutive products.

The following is the effect I am looking for. As you see I want to print the number of units per case whenever "Product" changes
Assembly    Units/Case          Component           Quantity
Product 1          48            Labels                 48
                                 Caps                   48
Product 2          48            Labels                 48
                                 Caps                   48
As I mentioned before, in the printed report I accomplished that by storing TRAN(nUnitsPerCase) + ' ' + cProductName in the cursor and then making the report field narrow enough so only the units per case was printed. Since I now wish to use the frx both to print report and to send it to ExcelListener I have run into this problem.

Is there a way to make a field not print based on whether some *other* field has repeated?

TIA,

Alex

>Did you try to set Print repeated values to No for the fields in question?
>
>>In a report I'd like several fields not to be printed in a line if one of them has a repeated value. For example, if a product name is repeated I'd like not to print the units per case either.
>>
>>Originally I solved this by appending the product name to the units per case and making the width of the field narrow enough so the appended name was not printed. Now I am offering the user the option of exporting the report to excel and naturally the appended product name goes along. The user is not asked the report destination until after all data is prepared, and that is done in a process that I prefer not to touch, so it is not really feasable to change the value in the cursor.
>>
>>Sounds like a job for dynamic formating, except I don't know how to accomplish it.
>>
>>TIA,
>>
>>Alex
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform