I am using the time clock implementation by @Jesse
Any time clock reports (either detailed or individual employee) when save or print, they are blank except for the header. Viewing the report in SambaPOS is fine. See below example of report saved to XPS format:
I have checked, all other reports (built in and custom reports I created) work fine, for save and print). Only those associated with time clock are blank.
That tutorial is old it used Table view… I do not use that anymore because V5 supports better tags to get the totals. Previously in v4 I had to use table view to get the totals of columns. Ill post the new reports for you in a bit.
But to print your report you can enable Visual Printing from within the report editor. All Table view or Pivot Table view reports have to have Visual Printing enabled from the report editor.
Table View and Pivot Table view for reports is a graphical representation of the report. The extra columns etc does not actually exist in the report. Your basically turning it into a graphic. I used Table view in the old reports because back then we did not have tags for the totals columns etc. Now we do and we also have scripting so we dont have to define names in the reports either for the users or entities.
@{CALL:SA.getusers()}
[$1:1,.8,.8,.6,.6, .5, .5, .5]
>Employee|In Date|Out Date|PunchIn|PunchOut|Hours|Pay Rate|Wages
{REPORT ENTITY STATE DETAILS:L.EntityName,L.StartDate,L.EndDate,L.StartTime,L.EndTime,=F([L.Hours]),CD.Pay Rate,=([CD.Pay Rate])*F([L.Hours]):(ELSN=TCStatus) AND EntityStateLog.GetHours()>0 AND (ELSS=PunchIn) AND (ELEN=$1)}
>||||||Total Wages: ${REPORT ENTITY STATE DETAILS:([CD.Pay Rate])*([L.Hours]).Sum:(ELSN=TCStatus) AND EntityStateLog.GetHours()>0 AND (ELSS=PunchIn) AND (ELEN=$1)}
Here is script:
Handler:SA
function getusers(){
var qry = "SELECT [Name] FROM [Users]";
var r = sql.Query(qry).Join(',');
return r;
}
Try the report I showed above with the script I think you will like it. If your just using entities not users I can show the script for that as well the report would be same.
I tried just enabling Visual Printing without changing the original reports, but still the XPS file saved is blank. Did I misunderstand that alone it is not enough?
I will recreate the reports based on what you said when I get a chance later.
Your linking them right? I’ll give you an improved script more specific to your use in few minutes.
Try this script instead of the one above. Its more precise.
function getusers(){
var qry = "SELECT e.[Name] FROM [Entities] e JOIN [EntityTypes] et on et.[Id]=e.[EntityTypeId] WHERE et.[Name] = 'Employees' ORDER BY e.[Name]";
var r = sql.Query(qry).Join(',');
return r;
}
No no that question was more for me. I was trying to tailor a script for you. My thread above the new script try it instead. This means you wont have to hardcode names into individual reports… One report will work for all employees and new employees will automatically generate on the report.
Visual Reports may not export correctly to a XPS file…I have not tested that but it makes sense they would not. They are really meant just for a way to customize a report for viewing not really for saving or printing that view. Its better to get the desired look via regular report if you plan to save them.
Like I said the only reason I even used the visual reports options was because at the time we could not total up those columns with report tags. Now we can.
[Detailed Wages:1,.8,.8,.6,.6, .5, .5, .5]
@{ENTITY STATE ENTITY LIST:(ELSN=TCStatus) AND (ELSS=PunchIn)}
>Employee|In Date|Out Date|PunchIn|PunchOut|Hours|Pay Rate|Wages
{REPORT ENTITY STATE DETAILS:L.EntityName,L.StartDate,L.EndDate,L.StartTime,L.EndTime,=F([L.Hours]),CD.Pay Rate,=([CD.Pay Rate])*F([L.Hours]):(ELSN=TCStatus) AND EntityStateLog.GetHours()>0 AND (ELSS=PunchIn) AND (ELEN=$1)}
>>Total Wages: ${REPORT ENTITY STATE DETAILS:([CD.Pay Rate])*([L.Hours]).Sum:(ELSN=TCStatus) AND EntityStateLog.GetHours()>0 AND (ELSS=PunchIn) AND (ELEN=$1)}
[Detailed Wages:1,.8,.8,.6,.6, .5, .5, .5]
@{ENTITY STATE ENTITY LIST:(ELSN=TCStatus) AND (ELSS=PunchIn)}
>Employee|In Date|Out Date|PunchIn|PunchOut|Hours|Pay Rate|Wages
{REPORT ENTITY STATE DETAILS:L.EntityName,L.StartDate,L.EndDate,L.StartTime,L.EndTime,=F([L.Hours]),CD.Pay Rate,=([CD.Pay Rate])*F([L.Hours]):(ELSN=TCStatus) AND EntityStateLog.GetHours()>0 AND (ELSS=PunchIn) AND (ELEN=$1)}
>>Total Wages: ${REPORT ENTITY STATE DETAILS:([CD.Pay Rate])*([L.Hours]).Sum:(ELSN=TCStatus) AND EntityStateLog.GetHours()>0 AND (ELSS=PunchIn)}
[Detailed Wages:1,.8,.8,.6,.6, .5, .5, .5]
@{ENTITY STATE ENTITY LIST:(ELSN=TCStatus) AND (ELSS=PunchIn)}
>Employee|In Date|Out Date|PunchIn|PunchOut|Hours|Pay Rate|Wages
{REPORT ENTITY STATE DETAILS:L.EntityName,L.StartDate,L.EndDate,L.StartTime,L.EndTime,=F([L.Hours]),CD.Pay Rate,=([CD.Pay Rate])*F([L.Hours]):(ELSN=TCStatus) AND EntityStateLog.GetHours()>0 AND (ELSS=PunchIn) AND (ELEN=$1)}
>>|||||{REPORT ENTITY STATE DETAILS:L.Hours.Sum,CD.Pay Rate.average,([CD.Pay Rate])*([L.Hours]).Sum:(ELSN=TCStatus) AND EntityStateLog.GetHours()>0 AND (ELSS=PunchIn)}