SQL Stored Procedure & Print prompt

Label printing integration (NiceWatch middleware and ActiveX programming interface)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
Erazor
Newcomer
Posts: 3
Joined: Tue Oct 20, 2020 3:49 pm

SQL Stored Procedure & Print prompt

Post by Erazor » Thu Nov 19, 2020 11:39 am

Hi everyone,

I've got a question I'm hoping someone can help me with.

I've got data stored in an MSQL database, I want to retrieve it using a stored procedure, but I also want Nice label to prompt the user to input new parameters each time they go to print.

Say you have one order with order number 123456, once that's done printing, I'd like NL to prompt the user to enter the next order number and so on.

I've used Bartender for something similar.

EXEC oGetOrderVariableDetails @WebOrderNo,@RowNo,@DetailNo,@StockOrderNo,@ArtNo,@CompanyId,@PDF_TYPE

I'd like a prompt for the below variables when going to print, these are the variables required to make my Stored procedure work.
Prompt.png
Prompt.png (9.84 KiB) Viewed 104 times
Hope this makes sense and is something that can easily be managed in Nicelabel, i'm a new user so learning as I go here!

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 666
Joined: Mon Aug 28, 2017 3:07 pm

Re: SQL Stored Procedure & Print prompt

Post by Kyleodonnell » Thu Nov 19, 2020 3:49 pm

Erazor

You would have to create a form and use edit fields to have the user type in what they are looking for and then on a button click, a stored procedure can be run. We recommend taking a look at our samples to see how a form can be created
C:\Users\Public\Documents\NiceLabel 2019\Designer\PowerForms\Samples\Solutions

Erazor
Newcomer
Posts: 3
Joined: Tue Oct 20, 2020 3:49 pm

Re: SQL Stored Procedure & Print prompt

Post by Erazor » Thu Nov 19, 2020 4:07 pm

Hey Kyleodonnell!

Thanks for the tip, I can't see to open the templates however.
It says that my current version (Pro) does not support the .nsln format, is it really necessary to upgrade just to open said files?

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 666
Joined: Mon Aug 28, 2017 3:07 pm

Re: SQL Stored Procedure & Print prompt

Post by Kyleodonnell » Thu Nov 19, 2020 6:15 pm

Erazor,

Solution files are only able to be used with powerforms and above. You could create the stored procedure using the custom SQL query in the label and then create variable prompts so the user would enter it each time. However, a form would help with better design and advanced logic and is a best practice. you may want to download the trial on another PC and look at the forms

Post Reply