ReportSharpShooter filling in forms - working with templates


Author
Message
Charles R Hankey
Charles R Hankey
StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)StrataFrame VIP (1.3K reputation)
Group: Forum Members
Posts: 524, Visits: 30K
I need to fill in fields in Word doc templates to be printed/pdf with ReportSharpshooter. I'm trying to get a handle on it conceptually - at what part of the process does the insert happen? Do I first desiign a RSS report with an RTF field and data fields as inserted into the RTF? How do you handle places where there might be multiple lines of data (this is insurance policies and at some points there will be lists of things appearing on the policy)



Is there a particular place in the docs or samples I should be looking? Anyone have a RSS report as a sample I could look at?



Thanks



Charles





Any guidance to get me started will probably save me a lot of time and will be greatly appreciated. I am still somewhat of a novice with RSS.

Reply
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Charles,

I guess I am a little confused.  You are replacing Word templates, is that correct?  We have done the same thing and created our own little data dictionary so that data can be inserted into the report.  This would include such things as he/she, patient names, addresses, etc.

RSS has a control called AdvancedText (I think that is what it is called). Anyway, it is a hybrid HTML/RTF solution.  However, their most recent build (4.1 [again I think]) has fixed their RTF issues and now supports page breaks correctly, etc.  So you can use RTF.

No here is the kicker that requires a bit of work, you will have to create a class that RegEx's out your keys and replaces them.  This requires a little bit of work to make it line up with their AdvancedText control and will in RTF also as there will be some special tags in the RTF versus being able to do a straight replace.  Not the end of the world, but just a heads up.  We then have a section of our report engine that is called Letters and Labels that allows the customer to modify the text, insert pre-built dictionary items, etc.

Here is a screen shot of our screen that allows the text to be maintained.

We use the « and » characters to represent a dictionary item.  Next, is the RSS template.  Here is what it looks like for this particular report. If you notice, in this report, we have two checks above for the body texts.  This means that we will have two AdvancedTextBoxes on the report template since the text needed to be physically separated but there was no real way to do this inline in one RTF field.

Note: Notice that only the alignment, bold, italics, underline, and font name can be selected.  This is all that was really supported well within the AdvancedTextBox control.

In the above picture, you can see a 1 and a 2 (I have attached the image for a better view).  The 1 is where the Body Text 1 will print from the previous screen shot, and the 2 is where the Body Text 2 will print from the second shot.

This is how we replaced all of our Word document templates that we used in our previous VFP version with RSS.

Hope this helps!

Attachments
Screen2.png (228 views, 21.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search