Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have created a PixelPerfect report in which I have added 3 images from a local folder. I would like the images to be shown or hidden based on the value of the field LANGUAGE in the QlikSense application.
I have tried the process described by @Daniel_Jenkins in the post "How to define a PixelPerfect DetailReport Visibility via Script (NPrinting)?" without success.
In the QS app I have created the variable vSQSlogo_french =if(LANGUAGE='French', 0, 1). I added it to the NPrinting report's variables objects. I dropped it in the Detail1 section of the report template.
I created a Formatting Rule with the condition "Iif([vSQSlogo_french] = 0, True , False)" and the Visible = True. I set the Data Member as the location level I need in the template.
I added a picture box to the template and selected from a folder the desired image I want to display when the language is French in the QS app.
I applied the rule to the Detail1 and/or to the picture box, with Visible set as No.
No matter what variations I try, they don't work.
Do you have an idea what could go wrong?
Thank you in advance for your help.
Dear all,
I finally found the solution to my problem using the method described in “How to add dynamic images in a Qlik NPrinting PixelPerfect template with Qlik Sense data”
Here are the steps I followed, if it can help someone else:
1. A container NPrinting can read from was created on our test server and productive server. I saved the images in.
2. In the QS application's script I added a part that combine the different fields and return the relevant path to the image in a new field (ex 1: if(wildmatch(ComputerName(), '*Xx*') = 1,
if(LanguageField = 'English' and CountryField = 'Abc', '\\Container\ReleventImage.JPG' as DiskImage_logo) (ex 2: if(wildmatch(ComputerName(),'*Xx*') = 1, '\\Container\' & LocationField &'_'& PurgeChar(ProductField, '\/:?"<>|') & '.jpg' as DiskImage)
3. In the front end I created a table with the field new created fields which contains the images' path.
4. In NP designer I followed “How to add dynamic images in a Qlik NPrinting PixelPerfect template with Qlik Sense data” using the object table ID as level in NP pixel report, add a Picture Box, in the properties, Data, expand (Data Bindings), expand Image URL, Binding drop down menu, expand the object in the level and select the DiskImage column.
5. In the QS app I created a container with two On-demand reporting objects in a container (show condition based on ComputerName) set up for the PDF report. The end users will use it to generate their report.
Thank you all for your time helping me!
@Loreline looks there we are couple of 'gotcha's found in the comments did you follow those as well? Are you on May 2022?
You can make it where a filter (selection) changes a level to render 1 or 0 values effectively causing a show/hide for content between the levels tag. See above post.
Same principles as @JonnyPoole presented for excel but this is for pixel perfect - https://community.qlik.com/t5/Member-Articles/How-to-Manage-PixelPerfect-Conditional-Output-Formats-...
EDIT: just focus on template side of things as rest is part of NPrinting 16 which is older brother, no longer supported having different interface.
cheers
Hello @David_Friend, if you are referring to setting a Data Member yes I did, and having the variable in the report as opposed to just in the variables list yes I did in a label box. Also the variable has the "=" sign in the QS app.
For the Data Member I choose the same level I what I use in the template which is the location field, as shown in my print-screens.
Did I miss something else?
Hello @Lech_Miszkiewicz, thank you for the link. In the article a table from the QlikSense app is used as a level in the NP report. In my case I already use the field location as a level in my template, could it be the problem? If yes what should I use instead?
Because the rest of the process explained looks the same as what I followed (creating a formatting rule, setting the level as not visible etc.).
I have applied the rule to the DetailReport with the location field with the image box visible and also tested not visible but it doesn't work. When I set the default visibility of the image Yes it is always shown in the report, no matter if the variable is 0 or 1. And vice versa if I set the default visibility of the image to No it is not shown in the report, no matter if the variable is 0 or 1.
Hello @JonnyPoole, I am testing your technique in a new report. It works with each field as a level and the relevant image in each level. But I want the image to be at the same place on the generated report. Is it possible?
Thank you
Is it moving around vertically? Perhaps a <deleterow> tag is needed? Or include an extra row? If you have a screenshot of the movement feel free to share.
I attached a first screenshot of the template in the designer with each image in a different level. And a second screenshot of two reports.
I would lik ethe logo to be at the same space no matter the langague chosse. But I cannot overlay the two images in the designer and be in different levels.
I don't know a lot about PixelPerfect, how could I use a <deleterow> tag here?
Thanks
I think <deleterow> is only available for excel templates actually. I don't design a lot with pixelperfect. I'll try to reproduce the problem and come up with a workaround.