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: 
mikecrengland
Creator III
Creator III

Possible to use a formula for an Excel tab name (NPrinting)?

Morning -

Is it possible to use a formula or variable for a tab name for an Excel sheet with NPrinting? I'm trying to base the name based on the day the report is run:

=If(Only({1<FullDate = {'$(=Today())'}>}Cal.DayNameAbbr) = 'Mon','Last Week', 'Week to Date')

I've tried it as both a formula and a variable using <tab>  but without luck.

I'm using NPrinting 16.6.

Thanks!

mike

1 Solution

Accepted Solutions
Ruggero_Piccoli
Support
Support

Hi,

No, you cannot use Formulas or Variables in Excel report tabs.

Qlik NPrinting 16.6 supports VBA macros (in the meaning that the VBA source code is copied from the template to all the generated reports) so you could drag and drop a Formula or a Variable in a hidden worksheet, write a macro that copy the value in the tab and trigger that macro on file opening.

I have not tested this solution, so I'm not 100% sure that it works.

Best Regards,

Ruggero

---------------------------------------------

When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.

View solution in original post

4 Replies
Ruggero_Piccoli
Support
Support

Hi,

No, you cannot use Formulas or Variables in Excel report tabs.

Qlik NPrinting 16.6 supports VBA macros (in the meaning that the VBA source code is copied from the template to all the generated reports) so you could drag and drop a Formula or a Variable in a hidden worksheet, write a macro that copy the value in the tab and trigger that macro on file opening.

I have not tested this solution, so I'm not 100% sure that it works.

Best Regards,

Ruggero

---------------------------------------------

When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
mikecrengland
Creator III
Creator III
Author

Thanks, Ruggero!

plhiwndkro
Partner - Contributor
Partner - Contributor

Hello

A little late but just found out:

It is also a possibility to create a field which only contains 1 value for the data you want to visualise in Nprinting. You can then use this field to create a Page in Nprinting (upper left). Because the field only contains 1 value, it will only create 1 sheet with this value as name.

Kind regards

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

@plhiwndkro 

your method is usually also my approach.

You just need to be careful on large datamodels as you may end up extending your overall report generation time especially if you use it with cycle reports or reports with user based filters.

It has an overhead of recalculating whole datamodel in QlikView/Qlik Sense once selection is applied on it therefore building report may take more time, but it provides you with the solution you need.

always loving workarounds 🙂

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.