Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bullet list in VFP Report
Message
De
04/02/2016 05:34:08
 
 
À
04/02/2016 05:12:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Divers
Thread ID:
01630437
Message ID:
01630808
Vues:
65
Create another cursor where each line in the reports is one record. Add a logic field, lBullet , and replace it with .T. when the line number is represents is equal to int(alines(laDummy,YourField)/2). Then you only print the bullet when lBullet is true.

If you don't understand what I mean, feel free to send me the table vie email, and I will make some sample code for you. With data it's easier to see if my logic holds water. :-)

>Hi Lutz,
>The data is simple:
>one cursor with ID, iQuestion,mQuestion, iAnswer, mAnswer_a, mAnswer_b, mAnswer_c order by ID
>only few fields
>The problem is that if the memofields span more than one row and the bullets, which are objects on the report, are not alligned with the memo fields anymore.
>Look at the screenprint I added to my previous message.
>It seems that the trick with the unprintable line above the memofields do not push them down.
>Regards,
>Koen
>
>>High Koen,
>>
>>I still think that creating a second cursor with the items, bound it with with set relations to your cursor might be fast and not that tricky with the report.
>>
>>you have a fixed number of possible items, as I understand, I guess some fields of your table?
>>something like that will do:
>>
>>*assuming vPk  identifies the records in your table, cField1 to cField3 are the items.
>> SELECT;
>>  Cur1.vPK,;
>>  1 as FieldN,;
>>  Cur1.cField1 as cField;
>>  FROM SourceTable AS Cur1;
>>  INTO CurHelp;
>>  WHERE !EMPTY(Cur1.cField1);
>>  ORDER BY vPK,FieldN
>>UNION;
>> SELECT;
>>  Cur2.vPK,;
>>  2 as FieldN,;
>>  Cur2.cField2 as cField;
>>  FROM SourceTable AS Cur2;
>>  INTO curHelp;
>>  WHERE !EMPTY(Cur2.cField2);
>>UNION;
>> SELECT;
>>  Cur3.vPK,;
>>  3 as FieldN,;
>>  Cur3.cField3 as cField;
>>  FROM SourceTable AS Cur3;
>>  INTO CurHelp;
>>  WHERE !EMPTY(Cur3.cField3)
>>
>>INDEX ON vPK TAG vPK
>>SELECT SourceTable
>>SET RELATION TO vPK INTO curHelp
>>
>>REPORT FORM ...
>>SET RELATION TO
>>USE IN curHelp
>>
>>
>>The report can use two detail bands, where the second detail band is the helper with the items. Then positioning the stuff is simple. No need to supress unused items - the select will filter them out anyway.
>>
>>Lutz
>>>Hi Naoto,
>>>
>>>Have implented the lines, however the 'bullets' are not pushed down. What am I missing here?
>>>Lines are set .F. in print when and fixed relative to top of band
>>>Regards,
>>>Koen
>>>
>>>
>>>>I'm probably misunderstanding your question, and likely grossly oversimplifying, but if the report is a pattern similar to that of a multiple choice quiz, where there is a question text and a list of possible answers listed below (and the number of choices is limited in quantity, for example no more than five choices), then one (though somewhat kludgy) way would be to have:
>>>>* detail band would consist of a text box for question text and bullets and text box for each of the answer items (up to the maximum number).
>>>>* The text boxes are set to expand with contents
>>>>* The bullets and the corresponding text boxes are set to float relative to top of band, and the Print When expression set so that prints only when the item applies.
>>>>* Above each of the bullet and corresponding text, place a line that spans the width of the paired items, set the line to float relative to top of band. The Print When expression is set to .F. so that it isn't printed.
>>>>As a text box expands, it "pushes" the items (that are set to float) down the page, and the line above the bullet and corresponding text assures that the bullet and text are "pushed" together.
>>>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform