Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not suppressing blank lines 4

Status
Not open for further replies.

SitesMasstec

Technical User
Sep 26, 2010
470
1
18
BR
Hello colleagues!

I have created a report which has 20 detail rows:

TelaItens_i01r7y.jpg


When processing the report I want to remove lines which have no data in each field, so I set the Properties, Print When tab, for each field to:
1) Print field only when data>0
2) Remove blank line
PrintWhen_doinkd.jpg


But when I process the report, the blank lines are NOT suppressed!

Am I missing anything?


Thank you,
SitesMasstec
 
Hi SitesMassTec,

Did you find a solution to your problem?

FB would be appreciated

MarK
 
Hello colleagues!

Dear Mark and everyone who has helped me a lot:

Yesterday I downloaded the SitesBakery.7z file provided by Mark and after unzipping the files, I executed the sample. It was like magic for me, despite the fact that I work with Visual FoxPro since 2002 (VFP 6, then VFP9, and many books from Hentezenwerke); but I came from FoxPro 2 for MS-DOS, and I am afraid I had not opened widely my mind to the possibilities of VFP9!

I have never used Cursor, because temporary "hard" files (like TEMPEXPL.DBF in this thread) have worked fine for me, but, now I will use Cursor (yes, it is simpler), thanks to your advice.

Well, I am now reviewing all the posts to apply the advices to my project.

I will give notice here as soon as I solve the problem (of course, using Cursor, among other changes).

Thanks from my heart.

Thank you,
SitesMasstec
 
Hi Sites...

I took the data from the table you provided, normalized them and copied them into a cursor to drive the report. You may download the 7z file from Engineering.com, extract it and run testgridbaker.prg.

I left you some work to do (designing the report) [wink] . Nevertheless Enjoy!

hth

MarK
 
 https://files.engineering.com/getfile.aspx?folder=267eb884-8adc-4c41-b60a-9df4db0af3ff&file=SitesBakeryUpdate.7z
Thanks for the feedback, SitesMasstec.

The restructuring of data just as it is ideal for a report is not depending on using either cursor or DBF file, though. Tore's code would also extract the single records from your data, if it started with CREATE TABLE instead of CREATE CURSOR, for example.

Cursors are just very commonly used by Foxpro programmers, as you very often only need data temporally. And you need it in another form as you have it in DBFs. It actually is normal to split up data even though it belongs together and then need to join it back together. It's the ability to join in many ways for many aspects and points of views, which also give views their name.

To describe it in the topic of recipes and ingredients, a good database design is storing data in the same manner as you prepare food at the start of cooking a recipe, you prepare the base ingredients, for example, peeled and diced or sliced vegetables, called "Mise en Place". And then you put them together for a salad, a bowl, a pizza, a cake or whatever you want to make of it. And you join the different ingredients as needed. Data is usually not the convenient food you just use as is and put into a microwave or oven. It's normal to need to combine data to something "consumable".

The art is not designing the DBFs so you later only need to open one DBF for form or a report. It is indeed to store the data prepared to be easily combined as necessary for those forms and reports and the actual composition printed is usually only needed temporarily.

Chriss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top