How to have a report not to print certain records at BAND level  
Author Message
Johan Van Linden





PostPosted: Visual FoxPro General, How to have a report not to print certain records at BAND level Top

I have a report on a table with materials used for production of an good. I only want to see the materials of a certain 'group' (high cost materials).
Is there any way I can add an expression at the band level so only the relevant records are printed. (for instance if cost is > 200)
If I can do this at band level, I don't have to add a 'print when' condition in each of the fields in the band.
Other problem when I add a 'print when' condition an all fields of a band is that the report still shows a 'blanc space' on the printout; even if the 'remove line if blanc' is set on (on all the fields in the band).
Any ideas
Thanks,


Visual FoxPro2  
 
 
AndyKr





PostPosted: Visual FoxPro General, How to have a report not to print certain records at BAND level Top

>>Is there any way I can add an expression at the band level so only the relevant records are printed. (for instance if cost is > 200)

Why not just run the report against a cursor instead of the main table - then you can select whatever you like into the cursor...



 
 
Johan Van Linden





PostPosted: Visual FoxPro General, How to have a report not to print certain records at BAND level Top

mmm thanks, I'm really new and I'm not sure if I can create a cursor. We have a software written in foxpro which has a foxpro reporting module as well. I thinks we are restricted in what we can-can't do.

Can you direct me to the place where I can learn how to create a cursor on a table for a report

THanks,

JOhan


 
 
Alex Feldstein





PostPosted: Visual FoxPro General, How to have a report not to print certain records at BAND level Top

If you have a compiled EXE in VFP that produces your report, then you would not be able to change the report conditions or data set.

What Andy is saying, is that if you have access to the data that controls the report, in this case a table (DBF), why not create a filtered cursor instead.

He refersto a query that extracts only the data you want into a temporary table in memory (a cursor), which you use as dataset for your report.

 

Example:

SELECT * FROM MaterialsTable WHERE cost > 200 INTO CURSOR TempData

 

 


 
 
Lakshminarayana





PostPosted: Visual FoxPro General, How to have a report not to print certain records at BAND level Top

U can right click on the fields in the details band and select print when and give the following condition

cost > 250

give this condition in print when clause of all fields in the detail band