Qlik Community

QlikView Integrations

Discussion Board for collaboration on QlikView Integration.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
cristiand
Contributor III
Contributor III

QvdNoOfRecords in Qlikview 12 - Cannot open file

Hello,

We just migrated to QV 12.1 SR8 from Qv11.2 and found that QvdNoOfRecords function doesn't work any more as it use to.

I know there was a change in how directory reference work for this function, but this is different.

On QV 11, when a qvd file didn't exist, that function just returned a null value. But now, when the qvd file doesn't exist, it just give an error and the script execution fails. Is this an expected behaviour??

We could use Filesize to know if the file exist or not, but we also need to know how many rows it has when it exist. Is it real we need to change all QvdNoOfRecords by "FileSize" AND "QvdNoOfRecords"?

Best regards,

Cristian

Cristian Dorbesi
9 Replies
diegoberriel
Contributor II
Contributor II

Hi Cristian,

We are having the same behaviour and we have opened a case for Qlik support. Will share their comments.

Thanks

Regards,

Diego

cristiand
Contributor III
Contributor III
Author

Hi Diego,
Thanks. Please, let me know if you have news (if you remember)

It was a kind of nightmare to do a last minute change to all the ELTs just in case a source qvd don't exist.

Cristian Dorbesi
novolouy
Contributor III
Contributor III

Hi Diego,

Thanks for opening a case with QlikTech.

We are also interested in a solution for this change from QV11 to QV12.

Thanks!

diegoberriel
Contributor II
Contributor II

Hi Cristian,

Please see below resolution posted by Qlik

Hope it works for you!

Currently there is no clear understanding why this script function is returning an error and not a NULL as it was before. As a workaround the following script can be added to the loading script:

IF (NOT isNull(qvdCreateTime('C:\temp\QV Data\Test.qvd'))) THEN
LET vRecords = Alt(QvdNoOfRecords('C:\temp\QV Data\Test.qvd'),0);
END IF
TRACE Records: $(vRecords);

cristiand
Contributor III
Contributor III
Author

Hi Diego, thanks for sharing the response.
We hope it is fixed in the future. We are using a similar approach to the one suggested, but instead of qvdCreateTime we are using  Filesize

Cristian Dorbesi
rwunderlich

I maintain a list of QV12 upgrade considerations to use as a companion to the Qlik Release Notes.  It covers things I've run into -- like the QvdNoRecords()  change  -- that are aren't mentioned in the Release Notes or I think need more explanation.  You can download the doc here.

http://qlikviewcookbook.com/download/qv12-upgrade-considerations/

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

cristiand
Contributor III
Contributor III
Author

Hi Rob, excelent resume, thanks!!. It is always a pleasure to read your blogs, they are very helpfull.

I think I've one more case at the item 6.

When you use an Execute command in the script with a relative path, it doesn't use the qlik document path any more.

For example, when calling Qlikview desktop from command line interface, the relative path for execute cmd is calculated from the folder where you actually are calling the QV CLI.
I experienced the same from Publisher, but haven't check what folder reference is used in that case.

Cristian Dorbesi
diegoberriel
Contributor II
Contributor II

Thanks a lot Rob!! This is very useful!

rwunderlich

Thanks for that update. I'll research that one.