0

Single page formatted print of all records in a table

I have just started trying iPad Ninox (after around 20 years of using MS Access) and am generally very impressed. However, I need to produce a nicely formatted single page printed report containing all records from a table (one line per reecord, the number of records varying but generally in the range 30-50). So far I have been unable to achieve this.

The Print Table button (top of screen) produces a report that offers no control of the layout and cannot be restricted to a single page even at the smallest font size available, and is therefore unsuitable. The Print Record button (bottom of screen) offers excellent control of formatting, but wnen I select All for the records to print, it appears to insert a page break after every record, so that I end up with around 40 pages instead of 1.

I feel like i must be missing something obvious, but cannot see what it is. Could somebody point me in the right direction please.

9 replies

null
    • Nick
    • 5 yrs ago
    • Reported - view

    The only way I found to do this is:

    Create a new table, let's call it "Master". Create one record in Master and relate this record with all records to your data.

    Then you can print from Master table and format the subtable the way you want.

    I hope it's clear...

     

    Nick

    • Alexander_Koenig
    • 5 yrs ago
    • Reported - view

    Nick is right. You can have a look at the recipes template, and print out a recipe to have an idea how it looks like.

    • mint_scissors
    • 5 yrs ago
    • Reported - view

    Many thanks for your reply, Nick. It has taken me a little while to understand what you meant, but I have got there in the end I think. This is certainly close to what I was trying to achieve, but is not perfect. Firstly, there appears to be no control over the alignment of the individual columns and secondly, as I understand it, each new record in the data table has to be individually linked to the Master table in a way that is not intuitively obvious to the user. Or do you know if this link can be created programmatically for each new record? I suspect that it must be possible but am too new to Ninox to have worked out how.

    Whilst this workaround has got me close to my goal for now, I do not think it is a 'good' solution. Inserting spurious fields and tables into a database just to print a report does not strike me as good database practice. Therefore, if anyone at Ninox reads this, I would like to know if there are any plans to make the page break, currently inserted after every record, configurable so that the user can decide whether to have all records on the same page or on separate pages.

    Thank you all for your help,

     

    John

    • Nick
    • 5 yrs ago
    • Reported - view

    Hi John

     

    can you add a "Trigger on create" in your data table so the link can be created programmatically for each new record

     

    Screen Shot 2018-10-13 at 18.17.18

     

    ...for control over the alignment of the individual columns...

     

    Screen Shot 2018-10-13 at 18.19.08

     

    I hope it helps!

     

    Let's hope Ninox people will fix that with upcoming updates.

    Nick

    • mint_scissors
    • 5 yrs ago
    • Reported - view

    Once again, many thanks Nick for your speedy and detailed reply. Your programmatic link of each new record works perfectly and I am sure has saved me several hours of reading and playing around to get it working on my own. And it has, of course, allowed me to remove the confusing linking field from the data entry form, for a much improved user interface.

    With regards to the column alignment, I'm sorry but I did not express myself very well. I was referring to the left/right/centre alignment within each column, not to the widths of the columns. Or are you suggesting that this alignment can be set in Edit columns... dialog somewhere - in the formula field for example?

     

    John

    • mint_scissors
    • 5 yrs ago
    • Reported - view

    OK, that's what I thought. I'll just have to live with it for now! Otherwise database all working fine now. Thanks again for your help.

     

    John

    • michaeltoc
    • 5 yrs ago
    • Reported - view

    I was able to do this without having to create a link to each record:

    Create a print layout with a formula field. The formula would be something like:

    let txt:="";

    for i in select 'TableToPrint' do 

    txt:=txt+rpad(i.field1,width1," ")+rpad(i.field2,width2," ")+rpad(i.field3,width3," ")+"

    ";

    end;

    txt

    (Note the last set of quotes includes a carrige return between them - this will create a new line between records)

    Make sure this field is set to courier, or another monospaced font and the rpad function will create tabular data.

    Next, create a button in the main table with the command printRecord(this, "name of print layout").

    The user can simply hit the button from any record in the table to get all records on one page.

     

    Michael

    • dan.1
    • 4 yrs ago
    • Reported - view

    Michael,

     

    How do I create a print layout and add a formula field?

    Thank you,

    Dan

Content aside

  • 4 yrs agoLast active
  • 9Replies
  • 5019Views