Jump to content

GreggRusson

Registered Users - Approved
  • Posts

    35
  • Joined

Everything posted by GreggRusson

  1. Why not just use a inline graphic rule based on the Signature field? return "<graphic file='sig.tif' height='4800' width='5600'>"; Gregg
  2. http://forums.pti.com/showthread.php?p=20745#poststop
  3. One idea would be to use a textbox and write a rule using a FPTable object with 1 row and up to 6 columns (one for each logo field that's not empty). Then center the returned table... Gregg
  4. Try using this in a rule: if (CurrentRecordNumber()% 2 == 1) return CurrentRecordNumber(); return NullResource(); If the current page/record number is 1, 3, 5, 7 etc, the rule will return that number...
  5. To Dan, Great response, clear, concise and compact. To Tou, After posting my 'down and dirty' response, I had the same thought on tracking tags. It wasn't clearly defined 'why' the extra space was needed, but you're right. If there was a reason the spacing between the characters needed some kind of exacting tolerance, that would have been the way to go. Gregg
  6. Put this into a rule: var ZipWithSpaces = ""; for(var idx = 0; idx < Len(Field("ZIP")); idx++) { ZipWithSpaces += Field("ZIP").substr(idx,1) + " "; } return Trim(ZipWithSpaces); Gregg
  7. Look in the user manual for 'Modifying Frames During Composition'. This section will give you an overview of how to programmatically write (or add to ) a OnRecordStart rule to find and modify either a graphic or text frames properties. To find all the properties of a frame (of which suppress is one), consult the Rules system guide under the FusionProFrame Attributes section.
  8. draco66, I've attached a Access db with 1 data table and an example of a simple select correlated sub-query to get 10 samples from each segment/sort grouping in the data table. Double click on the data table... a little over 36k records with 4 sort groups (A,B,C & E) and 3 fields, rec_id, sort & name. Now, right click and select the design view icon. Next select SQL view. Notice you have an inner & outer query which both reference the same table, hence the AS aliases. The inner query and outer query work together. The inner one runs first, selecting the TOP n (in this case 10) rec_id's needed by the outer query for each segment/sort group. I have just the basics for criteria, but you could easily add additional requirements, like the zip must be 10 characters and/or the country needs to be US etc... you could also add sorting specs as well if you like. Another idea would be turning it into an Update query so you could post back to the database and flag the records selected for tracking purposes. In any event, for ~36k records, process time for me running on a Intel I7 box was just under 3 seconds! Hope this helps, Gregg CorrelatedSubQueryExample.zip
  9. If I understand you correctly, you have a database with some kind of segment/version field and want a quick way to create a proof file with n records from each segment/version. Use whatever SQL database RDBMS you want (such as MS Access) and write a corralated sub-query. It's basically a query within a query, eg, self joining a table to itself and returns the Top n records you specify for each version. Here's a link to get you going: http://allenbrowne.com/subquery-01.html Take a look at the 'TOP n records per group' example Gregg
  10. Hi David, With only one location, it's really straight forward. One input data file with a page number, old & new serial fields. The catalog.pdf is used as a resource, with a rule to control what page is returned for each call. Example attached. Happy Programming, Gregg CatalogMask.zip
  11. Hi David, Is there just one part with one serial number in a static location to replace on each page or multiple parts/serial numbers in different locations? Every page or just certain pages that need to be dealt with? If it's just one static location to replace, even if it's not every page it's certainly doable. Multiple locations would involve more work. Gregg
  12. Hey Step, A quick question on a post in this thread (#4). In your function getTextWidth(input), you're returning the tm.textWidth * 1.1. I get the space * 2 to get the 1/8 inch left/right margins the original poster said he wanted, but why multiply the textWidth * 1.1? Just curious... TIA Gregg
  13. Have a project where I thought Text on a Curve frames would work great. Haven't ever used it before. Wanted the text to flow between multiple linked curve frames... but alas, it seems that you can't link the curved text frames. Is there any way to get the line/path length of this type of frame to get a object reference and write my own linking routine? Went looking for a function similar to FindTextFrame or FindGraphicFrame but no luck. Any ideas? Thanks, Gregg
  14. Hi Dave, Did a couple of these types of jobs for tax season. The general idea is to have 2 files with a parent/child relationship. You already have the 'child' table with all the transactions. All you need to do is make a copy of the file you already have and de-dupe down to one record per account based on account number... this will be the 'parent' file. In your template, you'll need to define the child table in your on job start rule with an external data file. Next, in your on record start, you'll need to define a FP Table and loop thru the child table, populating the table cells with the data you want with when the account numbers match. Hope this helps, Gregg
  15. In the MS Visual Studio editor environment, you can select multiple objects at one time and move them all at once. Can this be done (selecting multiple frames to move) in Fusion Pro? TIA, Gregg
  16. Hi, I know Dan or Ste will have a much more elegant way of doing this but here’s my outline: ‘The data is not combined currently into one csv but I can do that depending on what is needed for this to work.’ Great! I’m assuming then the data is in some type of relational database, having a customer name and address table (or something similar) and a related details table. If this is the case, you’ll need to do the following. First, the data. Pick your favorite RDMS, I’ll use Access for this example. Add a new numeric field to the name and address table called detail_count. Write a select groupby query linking the N/A table to the detail table on the ID field and add a count(*) field. This will tell you how many detail records are associated to each N/A record. Next, write an update query linking the N/A table to this query by ID and update the N/A field detail_count with the queries count value. Use FP manage pages feature to name each of the pages in the template and to set the initial use (On/Off). Call the first one something like COVER. Next, start adding the static variable data pages naming them PAGE1, PAGE2, PAGE3 etc till you’ve added the maximum number of child records possible setting the first to On and the rest to Off. You’ll also want to add a text box to each ‘static’ page. This text box will call a rule to populate the ‘static’ page with data from the global array. You’ll obviously need an external data file for reading the detail records and a global array to hold the various detail info for each data field on each of the successive detail pages. You’ll also need a counter variable to know which ‘static’ page you’re currently processing. In your OnRecordStart start rule, you’ll need to accomplish 2 things, 1st, a loop to turn on the required number of ‘static’ pages in the template that are needed (which you’ll know by the detail_count field). 2nd is to traverse the details table and load the global array with each of these ‘static’ pages variable data based on ID. You’ll also need to reset the global array counter here to zero. The only thing left to do is write the PopulateStaticFields rule and include it on each ‘static’ page. This rule will add the appropriate data from the global array. Like I said, can it be accomplished… I think so, but this is only an outline from a tired old list programmers mind On the other hand, I didn't see a barcode and it's ******* information, so I assume it's going out full first class. If you're doing 1000's or 10's of thousands of these, buy knowing the detail pages needed, you can calculate the weight of each recipients piece and pre-sort accordingly. Could be a significant postage savings. I’ll be curious to see Dan’s or Step’s solution… there must be a more elegant way to do this! Regards, Gregg
  17. Thanks Step! By changing the paragraph tags to breaks, all the linked textboxes flow perfect now! Gregg
  18. Hi All, Had a request to flow text around a graphic of a mountain out-cropping. First time trying this so please bear with me. To simulate this (for testing), I created the main text box for the top of the form, 4 other text boxes each stepped back to surround the graphic image and a final text box to finish off the page. I then linked them together. The test data file only contains 4 records, and the only field used is the VARTEXT field to see how the linked text flow is working for short, medium, long and really long fields. For whatever reason, page 2 doesn't format correctly. If you add another ' really ' to record 4 and refresh, then this record doesn't format correctly either. At this point, I just don't get it. If anyone out there has some insight it would be most appreciated. Find attached the template and data file. Best regards, Gregg Using FP 7.2 desktop Win 7 LinkedTextFlow.pdf data.txt
  19. http://forums.pti.com/showthread.php?t=4146 Try this...
  20. bkurzbuch, Just got back from vacation and saw your message. You were asking about an example of how to do a closest 3 stores geo-code calculation (to instance file records) in FP to get an idea of the basics. You will find that attached. The ingredients: FP template Instance data file with long/lat populated Locations data file with long/lat populated Logic: OnJobStart callback will load and populate the locations object array. OnRecordStart callback will take the current instance records long/lat and calculate how far each store location is from it in miles. The locations array is then sorted by distance in ascending order. Return Array Rule returns a table showing either all the locations listed ordered by there distance to this instance records location, or, if the closest location is over 10 miles the page will be suppressed. (business rule example). Caveats: Most of the free long/lat stuff in modern mailing presort software are accurate to within a mile or so if the record CASS's (the address is found in the USPS nat'l database thereby appending a plus 4 code to the zip). If not, the geo-graphic center of the zip is returned which can be off by 4 or 5 miles. If your projects locations are fairly spread out (like in different cities & states), the free long/lat stuff would work just fine. But if your locations are numerous in a large metro area (like StarBucks coffee stores in Seattle), you would want to pay for the rooftop to rooftop long/lat type appending (usually a setup fee + x dollars per thousand). Gregg LongLat.zip
  21. I'm assuming here that you've named your body pages 'Cert n'. But the SetBodyPage method needs the name of the page you want to turn off or on. FusionPro.Composition.SetBodyPageUsage(pages, false); Gregg
  22. It's funny that you posted this question as I just finished off a similar project for a dialysis company in my state with approx. 20 locations. They wanted to remind previous customers to the closest location to them. Can FusionPro handle this? All but one part, and that's getting the long/lat info of the address and comparing it to the long/lat info for the locations and returning the closest n of them. Check and see if your postal software has a long/lat module (most do) along with CASS. The free long/lat coordinates are not roof-top to roof-top perfect like google maps but are usually within a mile or two of the intended coordinates... good enough if your locations are fairly well dispersed. You can also go to a service provider like GoDataSolutions.com which does provide roof-top to roof-top remote encoding for a fee (thinking a setup fee and a few bucks a thousand). Once you have the long/lat coords assigned to both your data & location file, you can concentrate on the general logic. First, you need to define a function to calculate the distance between 2 sets of coordinates. Google haversine formula and many examples show up. Two params will be passed into the function, point 1 coords and the top n number of locations to be returned . Have the function compare each recipient coord to each store coord. Once all location distances are calculated, sort the location array by distance and return an array with the top n locations. Next is the general logic. On job start, use an external data file to load the store locations into an array. On record start, pass the recipient coords and the n number (3) of locations to return to your calculate. Rinse and repeat till done and salt to taste! That's pretty much it in a nutshell. Gregg A couple of caveats: Remember the haversine formula is as 'the crow flies'. Not like mapquest calculating the driving distance. If an address does'nt CASS (Like if there's bad data entry) long/lat cords returned will be in the geographic center of the zip code (which means the calculation could be off by 5 or 6 miles.
  23. Hey Dan, Thanks for the links. Now things are becoming clear. I think the thing that was throwing me was I kept thinking JDF was some sort of print language, not a job definition file. It also makes sense to map the generic media requirements to a paper catalog at runtime. Hopefully, I'll get the JDF module on the Fiery activated and configured this week or next as well as the paper catalogs. I'll report back the results. Thanks again the help. Gregg More on JDF: http://w3.efi.com/Fiery/Products/Fiery-Integration
  24. Thanks Richard, Hopefully, the JDF module will be setup and configured on the Fiery by the end of the week. I'm still a little confused on how to use the JDF finishing settings window (see attached). I see all the settable JDF sub-categories (media, media type etc...), but when I look at the entries under each one, I didn't see any type of paper tray/selection settings. Does the JDF module need to be installed & paper catalogs need to be set up B4 any additional settings come up? I know there's gotta be a pony in there somewhere! Gregg
  25. Looks like I need to check on which languages our printers support, SetBodyPageUsage along with On RecordStart: http://forums.pti.com/showthread.php?t=2562
×
×
  • Create New...