| View previous topic :: View next topic |
| Author |
Message |
phasel General User

Joined: 15 Jun 2008 Posts: 13
|
Posted: Sun Jul 06, 2008 1:42 pm Post subject: Custom report with writer |
|
|
Hi,
As the reports created are too simple for what I need, I am trying to make a custom report with writer. So far, I am partially successful. I am able to open a template, and substitute text strings with content from the database.
Basically:
dim sURL as String
dim vComponente
dim noArgs()
sURL = ConvertToURL("/path/to/my/templatet")
vComponente = StarDesktop.LoadComponentFromUrl(sURL, "_blank", 0, noArgs())
and then:
dim oBuscador
oBuscador = ThisComponent.createReplaceDescriptor()
With oBuscador
.SearchString = "XXXX"
.ReplaceString = mydbobject.getString
End With
ThisComponent.ReplaceAll(oBuscador)
But I have a problem with some text tables that I want to create. I would like to place one after the other from records of many to many relationships (so the number of tables is variable). I insert a bookmark for the first one:
But how do I tell the macro to insert the rest one after the other?
I only know how to insert over a bookmark, at the beginning of the text, or at the end.
After checking for a long time, I really find navigating a writer document is obscure...
I am really stuck with this.
Thanks a lot for your help,
Best regards,
phasel |
|
| Back to top |
|
 |
r4zoli Super User

Joined: 17 May 2005 Posts: 570 Location: Budapest, Hungary
|
Posted: Tue Jul 08, 2008 7:19 am Post subject: |
|
|
| Use SUN Report Builder, download, minimalist example. |
|
| Back to top |
|
 |
phasel General User

Joined: 15 Jun 2008 Posts: 13
|
Posted: Tue Jul 08, 2008 12:00 pm Post subject: |
|
|
Hi,
Thanks for your answer.
I already thought about it, but it crashes all the time, and I could not find any documentation to do something useful.
I was not even able to make a normal report. It handled strings as field+formula too giving 0 as output ?? and I found no options.
So I decided there might be something wrong with my version...
If you can tell me where I can find a tutorial for sun report builder that is OK (I googled, but I was not able to find anything going from simple to complicated), I would appreciate it.
Thanks a lot for your help,
Best regards,
phasel
P.S. I have made many advances in the report with writer, and I am almost where I want to get. Effort was big for a newbie like me, but that is normal  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|