Solved

Database location of label printing data

  • 19 January 2021
  • 5 replies
  • 222 views

Userlevel 6
Badge +14

Hi all,

Is there anywhere in the database where I can find these 2 values?

 

icon

Best answer by Tomas Ruderfelt 19 January 2021, 14:59

View original

This topic has been closed for comments

5 replies

Userlevel 3
Badge +7

I’m not sure if the System Info plugin shows info for dialogs, but you can try.

RMB on the bottom toolbar to show it, then click in a field.

Userlevel 7
Badge +19

Looking at the code the values are hardcoded to 1 in the client if you open the dialog from places like “Inventory Part In Stock”, “Receive inventory Part” etc.

That means that you can not change the values.

Userlevel 6
Badge +14

Ok, I did not make myself clear.

I am not looking for the default values, but values the user type in when printing the labels. 

Her is some horrible code that nearly do it. There most be a cleaner way?

select 
print_job_api.Get_User_Name(con.print_job_id) as user_name,
extractvalue(xmltype(xmlData.data), '//BARCODE_LINES/BARCODE_LINE[1]/ORIGIN_PACK_SIZE/text()') as pack_size,
extractvalue(xmltype(xmlData.data), '//BARCODE_LINES/BARCODE_LINE[1]/PART_NO/text()') as par_no,
extractvalue(xmltype(xmlData.data), '//BARCODE_LINES/BARCODE_LINE[1]/LOT_BATCH_NO/text()') as lot_batch_no,
extractvalue(xmltype(xmlData.data), '//BARCODE_LINES/BARCODE_LINE[1]/WAIV_DEV_REJ_NO/text()') as waiv_dev_rej_no,
extractvalue(xmltype(xmlData.data), '//BARCODE_LINES/BARCODE_LINE[1]/CONFIGURATION_ID/text()') as configuration_id,
extractvalue(xmltype(xmlData.data), '//BARCODE_LINES/BARCODE_LINE[1]/PROJECT_ID/text()') as project_id,
extractvalue(xmltype(xmlData.data), '//BARCODE_LINES/BARCODE_LINE[1]/SERIAL_NO/text()') as serial_no,
regexp_substr(client_sys.Get_Key_Reference_Value(con.instance_attr,'OPTIONS'),'\d+') as no_of_copies,
regexp_count(data, '?</BARCODE_ID>?') as no_of_labels_in_total
from print_job_contents con inner join xml_report_data xmlData on con.result_key= xmlData.result_key
where con.result_key= 95680

Userlevel 7
Badge +19

Aha, you need to se the parameters the user entered.

Here is another SQL you can use:

SELECT MIN(origin_pack_size) pack_size,
COUNT(DISTINCT barcode_id) number_of_labels,
COUNT(*) / COUNT(DISTINCT barcode_id) number_of_copies
FROM inventory_part_barcode_rep
WHERE result_key = 15503

Since the pack size is same on all lines in the report you can use min or max to get one of them.

Userlevel 6
Badge +14

inventory_part_barcode_rep... just in front of me :confounded:

Thanks.