Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Dynamic movement of all date items within a report
mluke
<p>[font="'helvetica neue';"]<span style="font-size:10.5pt;">I am building a report that will be printed on a pre-printed form. However the pre-printed form does not have a 'universal standard'. Meaning that it is not exactly the same for each organization that will be using this report. The position that I choose in the report design may not be the 'exact' location it needs to be on that particular pre-printed form. Also, some data items may need to be hidden. I am including in the data source 'user specified' options to dynamically hide and move all the data items within the form. There are 25 data items and all will have an expression in the visibility property to hide it as well as onCreate JavaScript to set the top and left margin based on these 'user specified' options.[/font]</span></p><p> </p><p>[font="'helvetica neue';"]<span style="font-size:10.5pt;">In addition to the hiding and data movement, the form itself can be in a different position on the pre-printed form. Sometimes it is at the top of the page, sometimes at the bottom and sometimes in the middle. For this I am leveraging Master Pages. I have one Master Page for the top, where this data is in the header portion of the Master Page. I have another Master Page for the bottom, where this data is in the footer portion of the page. I have another 'blank' Master Page for when the form is in the middle. For the middle, the form data is repeated in the layout within a single cell grid. The position for where this data should be printed is also a 'user-specified' option. Based on this option, I have JavaScript to set the appropriate Master Page to use as well as when to hide the grid that contains the form data in the layout.[/font]</span></p><p> </p><p>[font="'helvetica neue';"]<span style="font-size:10.5pt;">The form also includes two images that will be dynamically sized. This too will be controlled by the 'user-defined' options and JavaScript to set the height and width of the images.[/font]</span></p><p> </p><p>[font="'helvetica neue';"]<span style="font-size:10.5pt;">Are there any concerns with this approach? A typical print run will generate any where from 50 to 100,000 pages in the pdf output. Will all this dynamic movement impact performance?[/font]</span></p><p> </p>
Find more posts tagged with
Comments
mluke
<p>[color=#282828;][font="'helvetica neue';"]<span style="font-size:10.5pt;">I am building a report that will be printed on a pre-printed form. However the pre-printed form does not have a 'universal standard'. Meaning that it is not exactly the same for each organization that will be using this report. The position that I choose in the report design may not be the 'exact' location it needs to be on that particular pre-printed form. I am including in the data source 'user specified' options to dynamically move the data items within the form and wrote onCreate JavaScript to set the top and left margin based on these 'user specified' options.[/color][/font]</span></p><p>[font="'helvetica neue';"]<span style="font-size:10.5pt;">if[/font]</span> [font="'helvetica neue';"]<span style="font-size:10.5pt;">(row._outer[[/font]</span>[font="'helvetica neue';"]<span style="font-size:10.5pt;">"Company_Name_Left_Position"]!=[/font] "0") {</span></p><p>[font="'helvetica neue';"]<span style="font-size:10.5pt;">this[/font]</span>[font="'helvetica neue';"]<span style="font-size:10.5pt;">.getStyle().marginLeft = row._outer["Company_Name_Left_Position"[/font]] +'mm'</span>;</p><p>[font="'helvetica neue';"]<span style="font-size:10.5pt;">}[/font]</span></p><p>[font="'helvetica neue';"]<span style="font-size:10.5pt;">if[/font]</span> [font="'helvetica neue';"]<span style="font-size:10.5pt;">(row._outer[[/font]</span>[font="'helvetica neue';"]<span style="font-size:10.5pt;">"Company_Name_Top_Position"]!=[/font] "0") {</span></p><p>[font="'helvetica neue';"]<span style="font-size:10.5pt;">this[/font]</span>[font="'helvetica neue';"]<span style="font-size:10.5pt;">.getStyle().marginTop = row._outer["Company_Name_Top_Position"[/font]] +'mm'</span>;</p><p>[font="'helvetica neue';"]<span style="font-size:10.5pt;">}[/font]</span></p><p> </p><p>[font="'helvetica neue';"]<span style="font-size:10.5pt;">However, this only moves the data within the 'cell' I put it in. Is there a way to provide total movement of the data within the report through java script and change its 'order' within the report? Example, the data in the report is laid out as follows:[/font]</span></p><p style="margin-left:.5in;">[font="'helvetica neue';"]<span style="font-size:10.5pt;">Row 1 = Company Name, Institution Name, Date[/font]</span></p><p style="margin-left:.5in;">[font="'helvetica neue';"]<span style="font-size:10.5pt;">Row 2 = Company Address, Institution Address, Form Number[/font]</span></p><p> </p><p>[font="'helvetica neue';"]<span style="font-size:10.5pt;">Is there way through java script to place Date as the first piece of data in row one? Is there a way through java script to place the Form Number in front of Date?[/font]</span></p><p> </p><p>[font="'helvetica neue';"]<span style="font-size:10.5pt;">I have tried putting all the data in a single cell using the ‘inline’ display option, but cannot see how to change to ‘order’ of the data items from what I have positioned them in the report. [/font]</span></p>
kclark
<p>My first thought is the performance would be impacted, but not much since you're making changes to the design and not doing many things like computed columns that could be given to the query. I haven't tried to do something like this before so I don't have an answer off hand. Do you already have this running? What's your average render time if you do have it working?</p>
mluke
<p>We did a run with about 10% of the code in place for the data movement that would be needed in the complete solution. It generated 1785 pages with a 30 second difference between a version with no java scripting for movement and one that included the java scripting.</p><p> </p><p>Any concerns with using the master pages in this way? The form data is about 4inches long. Also, since the form data is repeated in three places in the report, there will be over 75 onCreate java scripts in the report. Any concerns with this? All though in a single print run, the form will always print in the same location i.e. the top, middle or bottom.</p>
kclark
<p>I don't think you should have any problems with this, I'd have to set something up on my end that's similar to what you're doing to test though.</p>