Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vary object position programmatically in report?
Message
De
27/05/2006 12:36:42
 
 
À
26/05/2006 05:51:27
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:
01125514
Vues:
19
Hi Srdjan,

This looks really powerful. I will check it out.

Thanks for the suggestions! I have heard of Minds Eye and xfrx, but haven't dug into the details. Your code sounds very powerfull tool.

David Schlesinger


>>In the old days, before the report writer, I would hand code my reports with @say, I could vary column positions by defining them in variable.
>>
>>Now I have a sales report, with data as follows:
>>M1,M2,M3,Q1,M4,M5,M6,Q2,M7,M8,M9,Q3,M10,M11,M12,Q4
>>laid out horizontally in landscape mode in one frx.
>>
>>Sometimes the customer may want to see only quarter 1 data, other times
>>q1+q2, other times q2 + q3, or q2+q3+q4
>>
>>If for example the customer wants to just see q2 or q2 and beyond, I could have when clauses in the print when that let me suppress q1. But then the data will appear offset to the right, for m4,m5,m6,q2 and beyond, when really it should be left justified.
>>
>>Right now the only way I can think of to do this is to have 4 frx's:
>>2)all, m4,m5,m6 and beyond, 3)m7,m8,m9 and beyond, 4, m10,m11,m12 and beyond
>>
>>Can I vary the output column position at report runtime? This would allow me to only have one frx. I'm guessing that I could programmatically manipulate the frx at runtime, or a copy of it and then run it. But I don't know the frx internals. And besides this seems tedious.
>>
>>Any suggestions appreciated.
>>
>
>
>Hi David,
>One quick fix could be to make one long frx field and to present entire
>row like this. Row (and Header) expression fields can be prepared programatically within preprocessed cursor and used instead of (or related to) original table.
>
>For more complicated programmaticly composed outputs you will hv to
>mess with listeners in VFP9. I saw somewhere article (foxtalk I think) with graph being prepared programmaticaly, writing custom rendering code in subclassed listener. So if graph was done then I assume text can be done as well.
>
>Being still with VFP6, when I hv report of such complexity or nature that FRX cannot cover it, I use XFRX-PDFL library wrappers class and compose whole thing programmatically in PDF format and then print it via Acrobat.
>
>Since you are talking about preFrx reporting;
>In order to achieve ALL flexibility that you got back in DOS,
>all you hv to do is make sufficient set of PDFL wrappers for
>easily advancing lines & pages + writing text positioned in line.
>
>Very much alike you had before ;
>.
>?
>?? myNumber at 55 picture ....
>?? Another at 72 picture ....
>.
>Eject
>.
>--------------------
>You can hv something like
>.
>oPdfl.ln() &&Advance desired number of lines
>oPdfl.write_at(550, transform(myNumber,'999,999.99')) && use monospaced font
>oPdfl.eject() &&Add new page
>.
>Some elementary drawing & painting ;
>.
>oPdf.draw_box(nTop,nLeft,nDown,nRight) **Rectangles & Lines
>.
>
>And then you know the rest of the drill :)
>Drawing freely text/graphcs anywhere in 840 X 570 page matrix
>gives you very big precision and all flexibily you will ever need to write ANY kind of report.
>
>FYI,
>New versions of XFRX converter, and I think also Mind's Eye RE are supporting custom scripts(!) for writing reports programmatically and
>bypassing completely VFP/RE. So maybe you should look into purchasing/utilizing something like this as well.
>
>You can also have look at source code of my CodeRep tool here
>(Download#23173). There is class there having set of wrappers for PDFL library, that you can easily customise for your own purposes.
>
>I am preparing as well free download called *FreeHandReports* focusing entirely on script based reporting, so I got already xff scripts (XFRX demo) wrapped but is not ready to be published yet.
>
>So don't worry;
>Just like everything else in VFP - it can be done more then one way :))
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform