Skip to main content

Search

Search

Dynamic filter printing with SQL query

Comments

5 comments

  • Avatar
    Peter Thane

    You could try this:

    • Adjust the queried records on the File>Print screen to All
    • In the Database Connection setup add a Filter that searches the Carton_Number field and link this to Query Prompt 1. You can configure the Query Prompt settings at this point if you want to or else amend these on the Data Entry Form
    • On the Data Entry Form, go into the Properties of your Entry Box and use the Linked option in the column on the left and connect this entry field to Query Prompt 1 on the right.
    0
  • Avatar
    Adrian Sokorski

    Thank you! I think I'm almost there. I added to my query:

    AND
    Carton_number = ?QueryPrompt1

    I also created the Text Input Box on the Data Entry Form and connected it to Query Prompt 1.

    The problem is that when I click Print in the Print screen, I get an error message saying "missing expression" in dutch (system default language):

     

    If I delete the Text Input Box on the Data Entry Form, after pressing Print I'll get below window:

    but when I enter a carton code, I get another error saying "invalid ID":

    Could you help?

    0
  • Avatar
    Peter Thane

    You may want to go back a step as it looks like something isnt right with the filter. 

    In the filter click on the blue field name to get the list of fields to find the column where the scanned variable will be coming from, in your case the carton_number select this and leave the Equals as it is but then click in drop down box. You should see an number of your carton numbers listed in here as well as a New Query Prompt which you should select which should take you to a screen like this. 

    You may want to amend the Text Label to something appropriate and then click Ok. 

    If you now click on the Record Browser it should ask you to enter a carton number and if you do this and that works then you should be okay.

     

     

     

    0
  • Avatar
    Adrian Sokorski

    Thank you!

    It works now. I added to my query:

    AND
    Carton_number = ?QueryPrompt1

    and then made sure that the Query Prompt is configured correctly

    0
  • Avatar
    Peter Thane

    Great, I am glad you are up and running

    0

Please sign in to leave a comment.