Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
I use .NET SDK to automatically create visal objects in Qlik Sense Apps.
Everything worked fine until I moved to the latest release of th library (16.2).
The methods like Sheet.CreatePivottable disappeared and I found a Sheet.CreateChild<T> where T can be Pivottable.
When I run the code,
_Sheet.SuspendLayout();
//IPivottable pvt = _Sheet.CreatePivottable(tableId, tProp);
tProp.Info.Id = tableId;
IPivottable pvt = _Sheet.CreateChild<Pivottable>(tProp);
_Sheet.ResumeLayout();
the table is created (when I run again the code the id already exists) but it is not shown.
Could you please give me some advices?
Thanks in advance
Antonio
I assumed you upgraded from a different major release of the .NET SDK? A lot of functionality emulation client behavior was removed from the SDK in that release. In your case you are probably affected by this this change:
REMOVED: Removed deprecated sheet specific overrides for DidCreateChild and DidDestroyChild. Deprecated since v15.3.0.
You will have to manually do the correct changes to the properties of the sheet object in order to make it visible in the client. Unfortunately, this part of the Qlik Sense behavior is not currently officially documented and is not considered part of the API (which is also why it's been removed from the .NET SDK). The best option to achieve what you want to do is therefore probably to reverse engineer what the client is doing.
Full release notes can be found here:
https://help.qlik.com/en-US/sense-developer/May2022/Subsystems/NetSDKAPIref/Content/ReleaseNotes.htm
Thanks Øystein_Kolsrud,
as I understand, I can check a layout of a hand-created pivot table against the program-created.
Is it what you meant?
Antonio
Yes, though you probably want to look at the properties, not the layout. And in this case you want to look at the properties of the sheet, not the pivot-table. When adding an object to a sheet, the properties of that sheet needs to be updated so that a cell contains the relevant visualization.
I typically use this tool for this type of property exploration:
https://community.qlik.com/t5/Qlik-Sense-Documents/Qlik-Explorer-for-Developers/ta-p/1949809
Thanks Øystein_Kolsrud,
I'll check
Antonio