Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting users some control
Message
 
 
To
01/02/2002 11:31:38
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00614042
Message ID:
00614098
Views:
26
>Nadya,
>
>He has a class library that allows you to create a report programmatically, and then save the report as a report file. And it doesn't require Excel. *grin*
>
>Here is a little sample of some code that adds a field to a report:
>
>
>loObject = loDetail.AddItem('Text')
>loObject.cExpression = 'Country:'
>loObject.nVPosition  = 1
>loObject.lFontBold   = .T.
>loObject = loDetail.AddItem('Field')
>loObject.cExpression = 'CUSTOMER.COUNTRY'
>loObject.nWidth      = fsize('COUNTRY', 'CUSTOMER')
>loObject.nVPosition  = 1
>loObject.nHPosition  = 10
>loObject.lFontBold   = .T.
>
>You could create a generic function that loops through aFields() (or a list of fields in a mover box by the end user) and add the fields to the report. I think he has a sample that loops through fields in the download, but I think it needed a little more generalization.
>
>So, basically you would be using his class to create a report on the fly and print it.
>

I see, sounds very interesting too. Right now I'm testing Daniel's solution. First try gave me an error, but I've fixed it and will continue. I'll download Doug's code and will play with it after I finish with this one.

BTW, Daniel, you have a typo in the first message text. You said vale instead of value :)

>
>>>Hi Nadya,
>>>
>>>Have you looked at Doug's article on Report Objects at www.stonefield.com? It has an example (and a download) that could probably be generalized for these types of listings.
>>
>>No, not yet. I like Daniel's solution, though. Could you please give me brief info about what's Doug code is about?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform