views:

82

answers:

1

I'm using Rave to generate reports, but it's poor at generating Word docs. My reporting needs are simple; the only thing I can't do easily within code is make a table. I'd love suggestions about how to display a [DB]Grid's contents (or underlying ClientDataSet records) within a bordered table, in Word or RTF compatible format.

Thanks, as always -- Al C.

+2  A: 

You can test the same component that I have recomended here (mxExports from max).

mxExport can export a TDataset, TStringGrid and TDBGrid to differents file formats, including RTF and MS Word.

See the component and test the demos. It can be usefull for you. It's free and source included. ;-)

Neftalí
Muchas gracias para la respuesta! ... Do you know whether I could use this component to insert the exported grid within a file? In other words, create a file with text, then the table, and then more text?
Al C
It sounds like you want to use Office Automation. At the risk of blowing my own trumpet, I have blogged on this subject several times -http://nbnewman.blogspot.com/search/label/office%20automation. It's no problem to add text to a Word file, then add a table and then add more text.
No'am Newman
@AlC; "I could use this component to insert the exported grid within a file?"The component exports the data into a file. ¿I don't understand this cuestion?
Neftalí
No'am -- thank you; I'll take a look at your blog. ... Netfali -- I think what I was talking about would be like adding the data into the middle of a file. Try to imagine a file with text (not from mxExports), then a grid (from mxExports), then some more text (not from mxExports). It sounds like mxExports does not do that directly, but I will take a look at it and explore. Thank you again for responding.
Al C
Hello AIC.OK, now i have understand what you need. ;-)Maybe you can complete the task with automation, as said No'am.You can also try to modify/review the source code and modify it.Regards.
Neftalí