Are those 10 labels all identical, or do they have a unique value on them. In the latter case it might be a matter of simply defining a Level and a page-filling area in your Excel to let NPrinting loop through your unique field values and create a page per label. That should work even if your data only contains 2 or 6 or 100 unique numbers.
I don't think you can make a template dynamically selectable on the Report level in the current version of NPrinting, but I'm not sure. What you can try is to integrate the content of different templates into a single one and add some template code to change the layout depending on QlikView fields and/or variables.
Hi Peter, thanks for your reply
so basically if the customer order consists of:
ProductA x 10
ProductB x 4
ProductC x 1
the details of each product are the same.
so what i want is an output to include
10 labels of ProductA - all with the same details
4 labels of ProductB - all with the same details
1 label of ProductC
so i then click print once and i get 15 labels printed off from the label printer.
i have a QTY field in QV so i QV would know that the customer has ordered 10 of productA etc.
i dont think NPrinting can look at a QTY field and produce multiple labels based on that field but i just wanted to ask some experts
i was also wondering if i could maybe use a macro to do this, but from what i know, NP would run the macro in the template straight away before any data is fetched from QV?? or am i wrong? and then when it does the 2nd label the macro wouldnt run again to pick up the QTY and produce the correct amount of labels.
Sharing a sample QVW will help.
I am curious to know how you have achieved that in QlikView. As NPrinting essentially uses filters to emulate selections, I would first figure out (if you haven't already) how to achieve the following in QlikView (without involving NPrinting just yet):
1. There are n number of products. I assume n is not a fixed number and can potentially be quite large.
2. I gather that you want the user to select the quantity of labels to print for each product. If that is the case, there should be n number of variables, each to hold the quantity of labels to print for each product. Since n is not fixed, how have you done that? You mention
ProductA x 10
ProductB x 4
ProductC x 1
...for a total of 15 labels. Of course that number would change if the user wants a different product/qty combination.
I would suggest that if you can make selections in a QlikView document to populate a straight table with the data and number of rows required to generate the report, you should be able to use NPrinting On-demand to achieve what you want. https://help.qlik.com/en-US/nprinting/September2017/Content/On-Demand/Create-Report-On-Demand.htm
- Create the report using the straight table as the source. Make sure the report is On-demand enabled
- The user makes the appropriate selections on the QVW in the AccessPoint and generates the report using On-demand.
HTH - Daniel.
thanks for your reply.
so currently i have a QVW which holds sales order data, the user then selects a single order which then populates a straight table with the order details. this straight table then populates cells in an excel NP template (which is set up as a label). At the moment the QTY field isnt being used, even though its in the straight table in QV, so when the NP report is run, a single label per page is produced for each line item on the order. this means that if the user needs 10 of item 1 then they have to change the print dialogue to only print page 1 and change the print qty to 10. then they have to do the same for item 2 etc. obviously this can be time consuming if the order has 20+ items on it.
so i now need to use the QTY field to produce the correct QTY of labels per item so the user just has to click PRINT once.
I have changed this from using NP17.4 to NP 16 so that i can use an IF statement on the report button to pick up the correct label template based on the customer as some customers have different formats to others (there are 15 different label templates). i can't see a way of doing this in np17.
so i can now get a sample set up and attach the files later today if thats ok?
You can achieve what you want using the PixelPerfect report type and some C# code.
- Create the PixelPerfect report as you normally would. QlikView NPrinting 16 Tutorials - PixelPerfect Reports
- You will need to add an unbound DetailReport band because you need to manipulate the
DetailCountOnEmptyDataSource property that is of course not available for a data bound DetailReport band
- The C# script in the BeforePrint event stores the value of the Units column and sets that to the DetailCountOnEmptyDataSource property
This way you can make any selection (or none) and trigger the On-demand report to generate the required labels
- You will need to set the page size to custom and adjust as required
- As you have different label content for different customers, you will need to create all formats and conditionally show/hide based on some field value (Customer?). How to Manage PixelPerfect Conditional Output Formats Using the Formatting Rules Editor
HTH - Daniel.
CH_Proj.zip 186.9 K