﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » .NET Forums » General .NET Discussion  » ReportSharpShooter filling in forms - working with templates</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 01:39:51 GMT</lastBuildDate><ttl>20</ttl><item><title>ReportSharpShooter filling in forms - working with templates</title><link>http://forum.strataframe.net/FindPost23526.aspx</link><description>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)&lt;br&gt;
&lt;br&gt;
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?  &lt;br&gt;
&lt;br&gt;
Thanks &lt;br&gt;
&lt;br&gt;
Charles&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
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.&lt;br&gt;</description><pubDate>Wed, 17 Jun 2009 15:16:01 GMT</pubDate><dc:creator>Charles R Hankey</dc:creator></item><item><title>RE: ReportSharpShooter filling in forms - working with templates</title><link>http://forum.strataframe.net/FindPost23559.aspx</link><description>Actually you will want to use NVarChar(MAX).  This will support the unicode characters that may be entered at some point.  This would be the safest road to travel.  Your needs may be no greater than doing just as you mentioned and binding the SQL data to the RTF controls.  If that meets your need then I would say go for it!</description><pubDate>Wed, 17 Jun 2009 15:16:01 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: ReportSharpShooter filling in forms - working with templates</title><link>http://forum.strataframe.net/FindPost23556.aspx</link><description>just one other quick question - if I want to chop up my Word doc into RTF chunks and store them as data in varchar(max) fields ( or do I want vbinary? ) can I put them in as cut and paste to RTF textboxes bound to the SQL data or ???&lt;br&gt;
&lt;br&gt;</description><pubDate>Wed, 17 Jun 2009 14:38:54 GMT</pubDate><dc:creator>Charles R Hankey</dc:creator></item><item><title>RE: ReportSharpShooter filling in forms - working with templates</title><link>http://forum.strataframe.net/FindPost23546.aspx</link><description>Yup, you got it.  That is exactly what we are doing.  Let me know if you have any questions. :)</description><pubDate>Wed, 17 Jun 2009 09:55:22 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: ReportSharpShooter filling in forms - working with templates</title><link>http://forum.strataframe.net/FindPost23543.aspx</link><description>On further studying your example I think it is coming into focus.  It would seem those body text boxes could contain RTF with substitutions done within the framework of an RSS template with fixed items.  &lt;br&gt;
&lt;br&gt;
I think this is going to give me a starting point.&lt;br&gt;
&lt;br&gt;</description><pubDate>Wed, 17 Jun 2009 09:01:44 GMT</pubDate><dc:creator>Charles R Hankey</dc:creator></item><item><title>RE: ReportSharpShooter filling in forms - working with templates</title><link>http://forum.strataframe.net/FindPost23542.aspx</link><description>Trent -  &lt;br&gt;
&lt;br&gt;
Thanks very much for the thoughtful reply.  I will study this.&lt;br&gt;
&lt;br&gt;
My first thought was to store the RTF of the Word doc as data, do all of my substitutions replacing delimited markers in that data field, and then use the data field as a source for an advanced text control i.e. RSS would see the prechewed result as the RTF info to go in the report&lt;br&gt;
&lt;br&gt;
I do not plan to give the users any modification options for the report, other than they are producing the policy data that determines what gets filled in.  the Template could be modified if the wording changed, but the number and naming of the fields to be substituted would be fixed.&lt;br&gt;
&lt;br&gt;
Is this what you mean by RegExing out the placeholders or are you talking about a script that runs withing RSS?  &lt;br&gt;
&lt;br&gt;
I had thought about creating the basic RSS report as Header/style info ( company logos, perhaps some unchanged boilerplate etc ) and then a body that was one big Advanced Textbox ( which would receive the RTF as data that already had the substitutions done) &lt;br&gt;
&lt;br&gt;
Am I close here or do you see a problem with that ( again, apologies as I am at the beginning stages of my RSS learning curve and so I may be mumbling gibberish on this :) )&lt;br&gt;
&lt;br&gt;
I'm basically thinking of this as if I were doing a VFP textmerge on the memo field and then feeding the memofield to a report - but with RTF instead of plain text &lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;</description><pubDate>Wed, 17 Jun 2009 08:55:07 GMT</pubDate><dc:creator>Charles R Hankey</dc:creator></item><item><title>RE: ReportSharpShooter filling in forms - working with templates</title><link>http://forum.strataframe.net/FindPost23530.aspx</link><description>Charles,&lt;/P&gt;&lt;P&gt;I guess I am a little confused.&amp;nbsp; You are replacing Word templates, is that correct?&amp;nbsp; We have done the same thing and created our own little data dictionary so that data can be inserted into the report.&amp;nbsp; This would include such things as he/she, patient names, addresses, etc.&lt;/P&gt;&lt;P&gt;RSS has a control called AdvancedText (I think that is what it is called). Anyway, it is a hybrid HTML/RTF solution.&amp;nbsp; However, their most recent build (4.1 [again I think]) has fixed their RTF issues and now supports page breaks correctly, etc.&amp;nbsp; So you can use RTF.&lt;/P&gt;&lt;P&gt;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.&amp;nbsp; 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.&amp;nbsp; Not the end of the world, but just a heads up.&amp;nbsp; 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.&lt;/P&gt;&lt;P&gt;Here is a screen shot of our screen that allows the text to be maintained.&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/a3849cd0-cb80-4ad8-b5ab-1a39.png"&gt;&lt;/P&gt;&lt;P&gt;We use the « and » characters to represent a dictionary item.&amp;nbsp; Next, is the RSS template.&amp;nbsp; 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.&amp;nbsp; 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.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; Notice that only the alignment, bold, italics, underline, and font name can be selected.&amp;nbsp; This is all that was really supported well within the AdvancedTextBox control.&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/17a65971-8c05-4c5c-989a-85bb.png"&gt;&lt;/P&gt;&lt;P&gt;In the above picture, you can see a 1 and a 2 (I have attached the image for a better view).&amp;nbsp; 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.&lt;/P&gt;&lt;P&gt;This is how we replaced all of our Word document templates that we used in our previous VFP version with RSS.&lt;/P&gt;&lt;P&gt;Hope this helps!</description><pubDate>Wed, 17 Jun 2009 07:12:13 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>