Forum Discussion

WadeMyers1's avatar
WadeMyers1
Qrew Member
2 years ago

Trouble Printing

I have a from using IFV=1 to limit standard controls. I want the user to be able to print before they submit the form, and when I start this process the record is in edit mode.

Here's how I attempted it:

var text URL = URLRoot() & "db/" & Dbid() & "?a=dr&ifv=1&printr=&rid=" &[DSR ID#];

"<a class='Vibrant Primary SaveBeforeNavigating' data-replaceRid=true \nstyle=\"text-decoration:none; background: #0863f5; border-radius: 5px; color: #FFFFFF; display: inline-block; padding: 4px 4px 4px 4px; width:140px; \ntext-align: center; \ntext-shadow: none; \nborder: 2px solid #0863f5; \nfont-size: 12px \"href='"
& $URL
& "'>Print DSR</a>"

I tried putting the printr function towards the front like this, and it says "access denied" 
var text URL = URLRoot() & "db/" & Dbid() & "?a=printr&dr&ifv=1&rid=" &[DSR ID#]

It does the same with display record first.
var text URL = URLRoot() & "db/" & Dbid() & "?a=dr&printr&ifv=1&rid=" &[DSR ID#]

If I remove the DR& entirely like this it prints to PDF, but the associated report details disappear and  I get an output like the attached Printout-.pdf 
var text URL = URLRoot() & "db/" & Dbid() & "?a=printr&ifv=1&rid=" &[DSR ID#]

Does anyone have a suggestion how to change from edit to display while retaining the IFRAME mode and still launch it into print mode?

------------------------------
Wade Myers
------------------------------

1 Reply

  • HI Wade,
    Thanks for posting this , I was able to learn that this is possible now !


    https://resources.quickbase.com/db/bq8meiyhh?a=dr&key=-1

    var text rid =
    If([Record ID#]>0,
    ToText([Record ID#]), // Record ID already exists
    "%%rid%%" // New record, no Record ID exists yet
    )
    ;
    var text url = URLRoot() & "db/" &Dbid() &"?a=printr&rid="& $rid;

    "<a class='Vibrant Primary SaveBeforeNavigating' data-replaceRid=true href='" & $url & "'>Save & PRINT THIS</a>"

    ------------------------------
    Prashant Maheshwari
    ------------------------------