SDyke Posted January 8, 2008 Share Posted January 8, 2008 In one of my database fields I have a path to a RichTextFile. How can I display the contents of this file in a field on my JasperReport? Link to comment Share on other sites More sharing options...
SDyke Posted January 11, 2008 Author Share Posted January 11, 2008 I have noticed several people have viewed this post. Does anyone have any idea on how to accomplish this task? I sure need to get a resolution to this. May there is an XML solution but I am not experianced enough to know the if and hows. Link to comment Share on other sites More sharing options...
SDyke Posted February 2, 2008 Author Share Posted February 2, 2008 Still looking for some answers. Link to comment Share on other sites More sharing options...
SDyke Posted February 4, 2008 Author Share Posted February 4, 2008 I really need help for this. Is there anything about this request that needs to be further explained? Link to comment Share on other sites More sharing options...
Pedja Posted February 4, 2008 Share Posted February 4, 2008 As far as I know, you can't display the content of the file in your report. You could instead create a hyperlink to your file, and set it to point to the location read from your database. Link to comment Share on other sites More sharing options...
SDyke Posted February 4, 2008 Author Share Posted February 4, 2008 That is exactly what I do now but is only works when viewing from the machine. I really need it to be printable also. Some thoughts I have: Isn't the JasperReport xml code? If so would it be possible, if so how, to take the rtf convert it to xml, insert this xml into the JasperReport xml to make one file, then make this printable. Make all this seemless to the user. Link to comment Share on other sites More sharing options...
Pedja Posted February 4, 2008 Share Posted February 4, 2008 I'm only speculating, but I think you would need some API for reading the rtf content, so you could manipulate with it, and pass it in report somehow (as a param or directly in xml, you have several options for this). But the best solution would be to keep the file content in your database, and read it as a field (of course, if this is a possibility in your case). The first way definitely needs plenty of work. Link to comment Share on other sites More sharing options...
SDyke Posted February 4, 2008 Author Share Posted February 4, 2008 Storing in database field would also be my choice however, the data that the rtf holds is first formated and can also be a mixture of text and graphics. This project I am working on is a migration from a windows based Microsoft Visual FoxPro application which I created into a Web Application. The Foxpro database alowed you to store a path in a field. Then to use this data you could append a field type of general with the contents of the file, then display the general field in a report using an OLE control. Link to comment Share on other sites More sharing options...
Pedja Posted February 4, 2008 Share Posted February 4, 2008 I don't have any experience with something like that, and if it is possible I don't know how to do it. Maybe you could store the file content as BLOB, but I don't know how you would format it for display after reading it from the database. You could download the file on the client machine, and then print it, if you include the files in your project content and adjust the relative path to them in the report hyperlink. Link to comment Share on other sites More sharing options...
SDyke Posted February 5, 2008 Author Share Posted February 5, 2008 I already have a link to the file appearing on the report when viewed. What I need is somehow to display the contents of the rtf link into a field on the JasperReport. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now