Jump to content

Using Repeating Calculation for Printed Report


This topic is 2623 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Repeating fields are legacy feature in FileMaker however they do have their uses.

I was trying to create a report with columns that would slide up to the height of the maximum field the problem with using regular fields and turning on any borders on the fields the sliding up of all above or directly above did not produce the desired result some columns would be shorter then others and the lines would not be consistent from the top of the body to the bottom.

Screen Shot 2017-02-12 at 2.41.23 PM.png

In this case the columns are all the same width so I thought the use a calculation will be able do the trick. 

Screen Shot 2017-02-12 at 2.43.33 PM.png

With the final result sliding up to the height of the largest column, with a little tweaking to the padding and line spacing and since some numbers needed to be formatted as currency a custom function in the calculation made it possible not to have to apply currency formatting to the entire repeating field. Also in order to get the column headers to line up I even created a similar repeating calc for the column labels.

Screen Shot 2017-02-12 at 2.42.03 PM.png

Link to comment
Share on other sites

  • Newbies

Hi. I'd like to try your excellent idea. I need some more insight about the calculation you used. Can you please expand it a little bit so that I understand it better: is it used in a loop to go through all the rows of the document? Thanks, Michele

Link to comment
Share on other sites

The let function declares the variables a - h in this case and I wrap each field with the Extend( ) function this is solely used for taking non repeating fields and making their value accessible to a calculation's repetition.

The calculation at the end is a Choose function that returns the value depending on the function Get (CalculationRepetitionNumber) In essence the first rep gets value in a, second is b, third is c and so forth. This function is zero based meaning its the few functions in FileMaker that start out with zero so that is just blank, with two "". 

you should be able to click on the image to zoom in on it. 

Link to comment
Share on other sites

  • Newbies

Everything is cristalline clear now. Unfortunately I cannot use your solution to develop my invoice layout, because of the different widths of the columns. I am struggling to find a clever solution for the rows of the invoice, cause they are of different width and height. I need to draw continuous lines among the rows to separate each field. Any suggestion? Thanks again for your help.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.