Qlik Community

QlikView Integration

Discussion Board for collaboration on QlikView Integration.

cristiand
New Contributor II

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

9 Replies
diegoberriel
New Contributor II

Re: QvdNoOfRecords in Qlikview 12 - Cannot open file

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
New Contributor II

Re: QvdNoOfRecords in Qlikview 12 - Cannot open file

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.

novolouy
New Contributor II

Re: QvdNoOfRecords in Qlikview 12 - Cannot open file

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
New Contributor II

Re: QvdNoOfRecords in Qlikview 12 - Cannot open file

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
New Contributor II

Re: QvdNoOfRecords in Qlikview 12 - Cannot open file

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

Re: QvdNoOfRecords in Qlikview 12 - Cannot open file

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
New Contributor II

Re: QvdNoOfRecords in Qlikview 12 - Cannot open file

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.

diegoberriel
New Contributor II

Re: QvdNoOfRecords in Qlikview 12 - Cannot open file

Thanks a lot Rob!! This is very useful!

Re: QvdNoOfRecords in Qlikview 12 - Cannot open file

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