Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
New Report Control for Creating, Previewing and Printing
Message
 
À
11/09/2002 06:23:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00698551
Message ID:
00699252
Vues:
17
Djordjevic,

That is EXACTLY what you can do. I have created a REPORT CONTAINER (RC) that is a both a PREVIEW and PRINTER tool. You can go to ANY PAGE at ANYTIME and paint over that page. At the moment each added object is painted back onto the Report Surface in a Z-Order of what order it was Added to the REPORT PAGE. I have also made allowances for naming the objects and then looking them up by name so you could modify them after they have already been added to the RC.

Also, I haven't written code to actually do the following yet but it wouldn't take but about a day if that. But it is possible that you could actually instantiate a second REPORT OBJECT within the REPORT CONTAINER because internally. I instantiate a REPORT OBJECT and add pages to that particular Object. Each REPORT OBJECT is a container for REPORT PAGES and each REPORT PAGE is a container for REPORT CONTROL OBJECTS.


* Add a Report to the Container
ReportObject.ADDREPORT()
ReportObject.NEWPAGE(8.5,11)
ReportObject.ADDTEXT()
ReportObject.NEWPAGE(8.5,14)
ReportObject.ADDTEXT()


* Now add a second Report to the Container and allow the user to be previewing the first report
* while a second report is being loaded into the Report Container

ReportObject.ProcessInBackground = .t.
ReportObject.ADDREPORT()
ReportObject.NEWPAGE(11,17)
ReportObject.ADDTEXT()
ReportObject.NEWPAGE(11,8.5)
ReportObject.ADDTEXT()

* Now add some more pages to the Report #1
ReportObject.SelectReport(1)
ReportObject.NewPage(8.5,11)
* Now add a photo to the page
ReportObject.AddPicture('','C:\IMAGES\MYPICTURE.JPG',.5,1,7,9,1)

* Now switch to viewing Report #2 in the Same Report Container
ReportObject.ShowReport(2)

* Synchronize the PREVIEW with the Pages Loaded into the control to show Report #2
ReportObject.ProcessInBackground = .F.

* Now switch to viewing Report #1 in the Same Report Container
ReportObject.ShowReport(1)

So, now you know why I get an Adrenilane Rush thinking about all the cool things I can do as I've been creating this control. It's like WOW I could do this and this, etc. So, I have to keep telling myself VERSION 2, VERSION 2! <bg>

So, I hope to have a Tool that a lot of developers will like and want to use. My VFP Report Engine class to process a VFP FRX report could actually paint directly to the printer but I just couldn't create a good REPORT PREVIEW in pure VFP code due to Window Refresh and Speed Issues. Maybe as a C++ FLL, but TOO MUCH PAIN to write it just for VFP. Delphi verses C++ is much quicker.

Thanks for the Feedback!

Rich


>Hi Rich :-))

>This sounds realy great!

>What would be great feature is, if you would provide sort of
>multipage creation interface (library) that could be used
>from within VFP code and then folowed by preview/print.

>In other words yr product should hv two dimensions;
>one like ready made stuff,visual interface, wizards etc
>and then LIBRARY of calls for use via code.

>It would be prety exciting having possibility to write reports
>via (meta)code like this.
>=CreateReportFile(...\myreport)
>=AddPage(1)
>=GoPage(1)
>=DrawPictureAt(x,y,'\\myPicture.bmp')
>=WriteTextAt(x,y,'I like it already','Arial','Bold',12,,,)
>=HorisontalLine(x,y,y,z,nTick)
>=DrawBox(i,j,k,l,nTick)
>=AddPage(2)
>=GoPage(2) etc etc
>and then (I am getting nasty here)
>=GoPage(1) (back)
>=WriteTextAt(x,y,'I like it even more ...','Arial','Bold',18,,,)
....
>=PreviewPrint()
>=SaveAs(\\savedReport.???)
>WOW! This would be something :-))

>As a matter of fact I developed my own reporting engine class (in code)
>which I am using in order to convert my code/FRX based reports into excel
>via excel automation (class of course). All this what I was mention before is doable in Excel via OLE Automation.

>If I had means of creating printable page(s) programaticaly by writing to previewable/printable medium (file I guess)
>that would be realy PERFECT.

>I would be certainly among your first customers :-))
>Looking fwd seeing your utility in action.
>Rgds+
>*************
>Djordjevic Srdjan - Sergio
>MCL Shipping
>www.mclfeeders.com
>www.metzgrp.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform