Skip to main content
Solved

Database location of label printing data

  • January 19, 2021
  • 5 replies
  • 300 views

Forum|alt.badge.img+14

Hi all,

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

 

Best answer by Tomas Ruderfelt

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.

This topic has been closed for replies.

5 replies

tobese
Hero (Employee)
Forum|alt.badge.img+7
  • Hero (Employee)
  • January 19, 2021

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.


Forum|alt.badge.img+21
  • Superhero (Employee)
  • January 19, 2021

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.


Forum|alt.badge.img+14
  • Author
  • Hero (Partner)
  • January 19, 2021

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


Forum|alt.badge.img+21
  • Superhero (Employee)
  • Answer
  • January 19, 2021

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.


Forum|alt.badge.img+14
  • Author
  • Hero (Partner)
  • January 20, 2021

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

Thanks.