Label printing with custom SQL and multiple parameters is painfully slow 关注
I have created a label that uses a relatively simple custom SQL query with 2 Query Prompts.
Select P.Partnum, P.PartDescription, P.BaseColor_c, P.Size_c, P.TypeCode, U.ProdCode from part P
Join erp.PartPC U on U.Company = P.Company and U.PartNum = P.PartNum
where P.company = 'GRZ' and P.Size_c = '?Size' and P.BaseColor_c = '?Color' and P.Typecode ='P' and U.PCType = 'UPC-12' and P.Inactive = 0 and P.Custom_c = ''
The query prompts have been linked to fields on a Data Entry form so the user can select from a pre-defined list of Sizes and Colors.
There is a performance issue that I'm trying to resolve. It seems like there is a delay when the label is initially opened and I suspect that this delay is caused by the query running without the parameters being set. There is also a delay after selecting the first parameter before I can select the second and then another delay between selecting the second and being able to set the number of copies with a third input on the data entry form. Is there any way to prevent the execution of the query until all parameters have been set?