Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vary object position programmatically in report?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01125119
Message ID:
01126229
Vues:
18
Hi Cathy,

Thanks! I always figured there had to be a better way to debug. Somehow I never learned this little tidbit along the way.

I have another question. For this project I am using VFP8 sp1, primarily because the related accounting system is compiled with that. Although, I could make this application standalone and compile with VFP9. I haven't yet used vfp9 at all, and I'm sure there is a substantial learning curve. But it might be worth it just for the report writer enhancements. I haven't explored the details enough on the enhancements to know whether my specific issues are addressed.

Today I am trying to code enhancements to the report I spoke about previously and am having problems. I have the following scenario:
In the detail band of the report I have columns for monthly and quarterly sales data and sales goal data. In the group footer I have sales totals. I also have to calculate percentage of goal achieved. I have 4 product lines that have sales associated with them - these appear in the detail section But, only 3 of those have sales goals associated with them. In the client's current excel output format, which they want to duplicate, in a report, they list:

Sales Product A Goal product A
Sales Product B No goal
Sales Product C Goal product C
Sales Product D Goal product D
--------------------------------
total sales total goal percent of goal

But the problem is that they only want to add up sales for products with goals to get the total sales for 'goaled' products and percent of goal for 'goaled' products.

At first I started out with a simple sum of the sales data object in the group footer. But then I decided I needed a way to exclude sales for products with no goals, so I started to try to come up with an expression in a report variable. It seems cumbersome to come up with an expression. So far the only way I can think of to do this is to, again, have a function call or a method call in the variable expression - e.g.
GetSalesSubtotal(nsalesamount, lproductlineexcludeflag)
and then have code to test whether or not to add the value in or, or exclude it.

Is there any other way to do this?

Thanks,
David Schlesinger






>The great thing about FoxPro is there are half a dozen ways to do the same thing. I don't think it matters either way which approach you take.
>
>For debugging reports .. use this tip to find the offending object on the report. In your code, change the REPORT FORM command to MODIFY REPORT. Then run the test again. When the report designer pops up, preview the report. The error will pop up but once you move past the error the property dialog of the offending object will appear in the report designer. Now you know which object caused the error.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform