Jump to content

Ryan_B

Registered Users - Approved
  • Posts

    71
  • Joined

Converted

  • Location
    Kansas City, MO

Converted

  • Occupation
    Web Developer

Converted

  • FusionPro Products
    Yes

Converted

  • FusionPro VDP software version
    9.3.12

Ryan_B's Achievements

Enthusiast

Enthusiast (6/14)

  • First Post Rare
  • Collaborator Rare
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

10

Reputation

  1. I was wondering if there is a way to dynamically set the x coordinates of a text frame based on the dimensions of an uploaded graphic. I have a graphic frame that the user uploads a logo to. To the left of said frame I have a text frame that holds the company's slogan. I'm looking for a way to move the text frame so that it always butt's up against the left of the uploaded logo. My original thought was to use FusionProTextMeasure to get the width of the uploaded graphic, using: var graphic = Field("Logo"); function getGraphicWidth(input){ var tm = new FusionProTextMeasure; tm.useTags = true; tm.CalculateTextExtent(input); return tm.textWidth; } return getGraphicWidth(graphic); Using that returned value and doing some calculations, I would be able to set my x coordinates for my text frame in order for it to butt up against the graphic frame. The problem I'm realizing is that the returned value is the width of the graphic before getting resized to fit in the graphic frame. So hypothetically, if the uploaded image was larger than the graphic frame, or the template itself, the returned value for the width would obviously not be accurate, thus making my text frame not butt up against the logo. In closing, is there a way to get the width of an uploaded image after it's been inserted into a graphic frame? Or, if anyone knows of a simpler/better/more accurate way of doing this, I'm all ears. TIA.
  2. I realize this post is almost 10 years old, but did you ever find a resolution to this?
  3. Hey Dan I've zipped up and attached the template and a handful of records from the data file for you to take a look at. When you open and preview the template, pg 5 ("TE") is where the bar chart in question is. You will see that the first two records still do not format properly. Records three and four are formatted properly, but only because the monthly amount spent is long enough to force it to the next line. The name of the rule that builds the chart is simply called Bar Chart. My original plan for displaying the monthly dollar amount spent is on pg 4 ("PLCC"). Changing the field "Type" in the data file to "PLCC" will display why that won't work for me. If a customer spends $1000 or more, the y axis label grows, thus pushing the x axis labels to the right, and making my text frames overlap the labels. You can see what I'm talking about on record #2. FP_Forum.zip
  4. Or did you mean an actual space like: '<cell><cell>Jan'+"$"+" "+Field("JanTotal")
  5. How much control do you have with the formatting of the x and y axis labels on a bar chart? I have built a bar chart using the following: var str = ''; str += '<row type="header">'; str += '<cell><cell>Jan'+"$"+Field("JanTotal")+'<cell>Feb'+"$"+Field("FebTotal")+'<cell>Mar'+"$"+Field("MarTotal")+'<cell>Apr'+"$"+Field("AprTotal")+'<cell>May'+"$"+Field("MayTotal")+ '<cell>June'+"$"+Field("JunTotal")+'<cell>July'+"$"+Field("JulTotal")+'<cell>Aug'+"$"+Field("AugTotal")+'<cell>Sep'+"$"+Field("SepTotal")+'<cell>Oct'+"$"+Field("OctTotal")+ '<cell>Nov'+"$"+Field("NovTotal")+'<cell>Dec'+"$"+Field("DecTotal"); str += '<row>'; str += '<cell><cell>'+Field("JanTotal")+'<cell>'+Field("FebTotal")+'<cell>'+Field("MarTotal")+'<cell>'+Field("AprTotal")+'<cell>'+Field("MayTotal")+'<cell>'+Field("JunTotal")+'<cell>'+ Field("JulTotal")+'<cell>'+Field("AugTotal")+'<cell>'+Field("SepTotal")+'<cell>'+Field("OctTotal")+'<cell>'+Field("NovTotal")+'<cell>'+Field("DecTotal"); return str; Which returns this: As you can see, the category (x) axis labels are not displaying in any sort of consistent format. What I'd like to display is the month with the amount spent beneath it. I have tried the following, to no avail: '<cell><cell>Jan<br>'+"$"+Field("JanTotal") '<cell><cell>Jan<br/>'+"$"+Field("JanTotal") '<cell><cell>Jan<p>'+"$"+Field("JanTotal") '<cell><cell>Jan'+'<p>'+"$"+Field("JanTotal") '<cell><cell>Jan\n'+"$"+Field("JanTotal") When validating the rule in the editor, it would appear that my desired results will be returned, however that is not the case. According to page 29 in the TagsRefGuide, (I realize this is for a table, but I would think it'd be the same concept for charts) the <br> should work. Their example: The results: Does anybody have any ideas on what to try next?
  6. Thanks Dan for your suggestions. I ended up chunking it out into more manageable sizes.
  7. The external data file is created via a console application I wrote using a stored procedure that returns only what I need for the table in my template. Every row within the external data file is a separate transaction that needs to be outputted to the table. Therefore, it is unfortunately already trimmed down as much as it can be. Yes, it does. Compressing just the external data file still produces almost a 350 MB zip. I've placed the external data file out on our file sharing site here: http://docs.henrywurst.com/it/table.txt I can share the template with you there as well if you think it'd help any, but unfortunately I cannot share the primary data file due to privacy reasons, e.g., addresses, phone numbers, etc.
  8. I've collected my job files to show you. However, even compressed, the folder is almost 400 MB. Max file size for a zipped attachment is 42.92 MB. How can I get you what you're looking for? Is there part of the collection in particular that you're trying to take a look at?
  9. What kind of specifics can I tell you about? Not being snarky, just asking so I can provide them.
  10. I have an external data file that I'm using to build a table for end of year transaction statements. It is a little over 1.5 gb. Every time I try and compose the template, I receive the following error: Does FusionPro have a size limit for external data files? Does anyone know of a solution for this?
  11. This is outstanding Dan! Works just like I need it to. Thank you so much. Just out of curiosity, did you develop this?
  12. I'm working on a statement that builds out a purchase summary into a table using an external data file. There is really only one caveat, which is that the total page count for each record must be an even amount of pages. The table starts on page three, and overflows to as many pages as it needs to. If I knew that the table would always be more than 3 pages, I'm pretty sure I could simply select the "So Last Added Page Is Even" from the Add pages dropdown within the Overflow Options dialogue box. However, not every record is long enough to warrant an overflow page. So I attempted to write a rule that got the total page count, and added a blank page if the page count was odd: OnRecordStart var pageCount = FusionPro.Composition.totalPages; if(pageCount %2 != 0) { FusionPro.Composition.SetBodyPageUsage("ExtraPage", true); } I also tried: var pageCount = FusionPro.Composition.countPages; After that didn't work, I thought maybe it was because I was checking it before the record had composed, thus FP didn't yet know the total number of pages in each record. So I tried the rule in the OnRecordEnd rule. That didn't work either. Is that because that rule runs after composition, so changes to the file cannot happen? I also tried it in the OnJobEnd. Is there a way to see what the last page number is in a record? If I could find that out, I could check against that and add the ExtraPage if it was odd. Just for clarification, all I need to do is add a blank page if a record has an odd amount of pages. Thanks in advance. TSC_Mockup.zip
  13. In this folder you will find both the MultipleCustomerExternal and the TableExternal data files. ExternalDataFiles.zip
×
×
  • Create New...