Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to define a PixelPerfect DetailReport Visibility via Script (NPrinting)?

Hello folks,

i have a problem with my PixelPerfect-Report. I want to make my DetailReports dynamic visible with the help of a QlikView variable. So i thought, this could be possible with the Script-Language (e.g. VB) in NPrinting where i can create/define my PixelPerfect-Report. The problem is, that i have no idea how to set the settings for this issue. I know there is a Visible-Boolean in the Property Grid but how can i use it in the Detail-Report? Is there a API or something?

Or can i directly use a if-method where i check my QlikView-Variable and then set Visible=True or False?

1 Solution

Accepted Solutions
Daniel_Jenkins
Specialist III
Specialist III

Hi Florian,

Yes you can add the variable into the PixelPerfect report and hide/show based on it's value using a rule.

In the attached project I have a QlikView variable vHideDetail

0 = Show (any other value = hide)

Steps:

(i). Add the variable to the report template

(ii). Hide the detail report by default

(iii). Create and apply this conditional rule on the detail report

Output based on the value of vHideDetail:

Extract to folder C:\Temp\Community\065 or change the paths used in the NSQ.

HTH - Daniel.

View solution in original post

11 Replies
Daniel_Jenkins
Specialist III
Specialist III

Hi Florian,

Yes you can add the variable into the PixelPerfect report and hide/show based on it's value using a rule.

In the attached project I have a QlikView variable vHideDetail

0 = Show (any other value = hide)

Steps:

(i). Add the variable to the report template

(ii). Hide the detail report by default

(iii). Create and apply this conditional rule on the detail report

Output based on the value of vHideDetail:

Extract to folder C:\Temp\Community\065 or change the paths used in the NSQ.

HTH - Daniel.

Anonymous
Not applicable
Author

Awesome, thank you very much!

Easier than i thought

Not applicable
Author

HI Daniel

I am using your exact logic yet the conditional rule is not working.  I double checked against your sample.  What am I missing.

I have the variable in QV

I set the object default to No for Visible

I used your exact syntax with my variable name in the conditional rule logic yet when I run it, it defaults to not show for all, even where the variable = 1 in my case.

I am using Version 16.0.0.1

Not applicable
Author

AH HA.  One step missing.  You must make sure you have a Data Member assigned!  Walla!  All good now.

I am just learning the pixel perfect reports.  I don't yet understand the point of the Data Member.

Not applicable
Author

And, another step.  You MUST have the variable actually in the report as opposed to just in the field list area. 🙂

Daniel_Jenkins
Specialist III
Specialist III

Hi Deborah,

Glad you got that working. And yes, you need to have the variable somewhere on the actual report, although you can of course hide it. Good catch!

Daniel.

mstoler
Partner - Specialist
Partner - Specialist

Hello,

Does this work with the current version (Nov 2020) of NPrinting?

 

Thanks,

 

Michael

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @mstoler 

yes - it does. Keep in mind though that variables work differently so you must have "=" sign in front of variable formula as explained below:

https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/Troubleshooting/Variables-dont-expan...

 cheers

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
mstoler
Partner - Specialist
Partner - Specialist

Hello,

Yes it does work but it does not appear in the variable section below. 

I assume this is correct that the variables are not listed?

Thanks for your help!

Michael

 

mstoler_1-1640528475454.png