Page 1 of 1

Passing Job Number to Service Manager Job Report

PostPosted: Fri Jan 19, 2018 4:58 pm
by Trevor.Doble
Hi

I have created my own Job Sheet which is working perfectly, but I am just unsure how to pass the current JobNo to the report. I looked at the standard Jiwa report but it is using a stored procedure, I have used a SQL query within the Crystal report as my data source.

Currently the report returns every Job Sheet, does anyone know how I can restrict it to the currently loaded Job Sheet?

Thanks in advance
Trevor

Re: Passing Job Number to Service Manager Job Report  Topic is solved

PostPosted: Sat Jan 20, 2018 3:03 pm
by Mike.Sheen
Trevor.Doble wrote:I have created my own Job Sheet which is working perfectly, but I am just unsure how to pass the current JobNo to the report. I looked at the standard Jiwa report but it is using a stored procedure, I have used a SQL query within the Crystal report as my data source.

Currently the report returns every Job Sheet, does anyone know how I can restrict it to the currently loaded Job Sheet?


Hi Trevor,

When printing a report from the Service Manager Job Maintenance form, the form will open the report and look at the forumulas to see if there is a "Pass_SP_StartingJobNo" or "Pass_SP_StartingTaskNo" formula - if they are present, those formula values are set appropriately - if they are not found, it assumes this is not a stored procedure based report and instead sets the record selection formula to be:

Code: Select all
{SM_Jobs.RecID} = 'XXX'

Where XXX above is replaced with the SM_Jobs.RecID of the current job.

So, as long as you have the SM_Jobs table linked in the report and as also do not have the formulas Pass_SP_StartingJobNo or Pass_SP_StartingTaskNo, it should "just work".

If you've complied with the above, and it still is not working, then try making sure the report returns the expected results when run from the Crystal Reports designer - just modify the report selection formula to be:
Code: Select all
{SM_Jobs.RecID} = 'XXX'

Where XXX above is replaced with the SM_Jobs.RecID of a known Job ID.

If that does not work either, then there is an issue with the report SQL - and we'd need to take a look at the report to work out the issue.

Mike