Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlik Server vs Desktop

Question - We have a qlikview server in Germany that another team manages.  I developed a dashboard on my local computer and sent them the qvw and qvd files to upload which they have done many times for me before without any hitches.  This time my dashboard was a little more complex and had the below routine to generate a calendar and then another line to create a common calendar.  This worked with no issues on my local copy but the published version shows no results.

Anyone have any ideas why it would be different on the server vs a local version of qlik? 

//===================================================

// Subroutine to Generate Calendar.

//===================================================

SUB CalendarFromField(_field, _calendar, _prefix)

[$(_calendar)]:

// Generate Final Calendar

LOAD

  [$(_field)]

  ,year([$(_field)]) as [$(_prefix)Year]

  ,month([$(_field)]) as [$(_prefix)Month]

  ,day([$(_field)]) as [$(_prefix)Day]

  ,weekday([$(_field)]) as [$(_prefix)Weekday]

;

// Generate range of dates between min and max.

LOAD

  date(DateMin + IterNo()) as [$(_field)] // Link Field

WHILE DateMin + IterNo() <= DateMax

;

// Find min and max of date field values.

LOAD

  min(datefield)-1 as DateMin

  ,max(datefield) as DateMax

;

// Load date field values.

LOAD

  FieldValue('$(_field)', RecNo()) as datefield

AutoGenerate FieldValueCount('$(_field)');

END SUB

Then CALL CalendarFromField('Date', 'CommonCalendar', '');  to generate the the actual "Common calendar"

16 Replies
Gysbert_Wassenaar

but the published version shows no results.

Perhaps the previous version is still loaded in memory? Did you reload the document?


talk is cheap, supply exceeds demand
Not applicable
Author

I did reload the document once published to the server.  If you go to the table view and look at the common calendar table it shows no data on the server except the date field in mm/yyyy format but on the local copy it does separate the mm/yyyy into Month names and year numbers.

Gysbert_Wassenaar

Just to be sure, do your two copies load from exactly the same source files and tables?


talk is cheap, supply exceeds demand
Not applicable
Author

Yes they both load from the same source.  They both pull the dates into the date MM/YYYY format but on the server the script above seems to not strip the month numbers out as month names and the years do not populate either.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Servers and Desktop/Laptop machines may have different system settings to represent date & time values. In a QlikView script, both are usually set to a fixed value. Is that also the case in the two environments? Are there anyconflicts between date/time values you get from the OS?

Peter

Gysbert_Wassenaar

Does the document use any include statements for script code that is loaded from external files? The subroutine you posted looks like part of the Qlikview Components library. If code is loaded with include statements can these files be found in the same place on the server as on your local computer?

Are the MM/YYYY dates real dates in both documents? Or does the server copy contain text values in that field?


talk is cheap, supply exceeds demand
Not applicable
Author

So I am still a newbie to Qlik, I am getting better but still a newb.

On the Server these are the set functions that I thought drove that stuff.

let project = 'IT_Segment';

SET ThousandSep=',';

SET DecimalSep='.';

SET MoneyThousandSep=',';

SET MoneyDecimalSep='.';

SET MoneyFormat='$#,##0.00;($#,##0.00)';

SET TimeFormat='h:mm:ss TT';

SET DateFormat='M/D/YYYY';

SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';

Then on the client side it looks like this.

SET ThousandSep=',';

SET DecimalSep='.';

SET MoneyThousandSep=',';

SET MoneyDecimalSep='.';

SET MoneyFormat='$#,##0.00;($#,##0.00)';

SET TimeFormat='h:mm:ss TT';

SET DateFormat='M/D/YYYY';

SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';

Both are the same except for the "let project" statement.  Other than that the only difference to date and time looks to be the time zone.

Not applicable
Author

No I do not have any include statements in either document.  I got that subroutine from a qlikview post talking about conical dates and it helped me create that common calendar. 

Yes both dates are real, they are gathered from about 6 different tables..

Not applicable
Author

You know, maybe I over thought this whole thing.  I pull all the dates into another table called "Date Link" and then this sub routine was used so that I could generate this table called "Common Calendar" but TBH I really do not understand exactly what it does.  Now I am thinking I could get away with the following.  Just adding Year(Date) as Year and then Month(Date) as Month seems to give me the exact same results...All of the dates are pulled into the date link and at least I understand what this is doing....

It still does not explain what is the difference between the server side and the client side but I have a meeting scheduled with the qlik admin on Monday and if we can isolate the issue I will post the resolution on here.

Directory;

LOAD Segment,

     Date,

     DateType,

     Year(Date) as Year,

     Month(Date) as Month

FROM

Datelink.qvd

(qvd);