Crystal report developed and executes successfully outside of IFS.
Report is using a custom developed IAL as its data source (access granted to appropriate permission sets)
When copy Crystal Report to server and try to preview in IFS an error is presented:
Server was unable to process request. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Ifs_ReportService.GetSavedPDFReport(String FileName, String ParameterValues, String LangCode) in c:\inetpub\wwwroot\IFSCRWebSetupIFST_3\App_Code\Service.cs:line 244
--- End of inner exception stack trace ---
No actions were executed.
Other Crystal reports work fine which would rule out issues with the IFS Crystal Web Service.
Does anyone have any suggestions to overcome this error?
Thanks in advance
Shaun
Page 1 / 1
Hi Shaun,
Are you using any CFVs in the IAL?
Best Regards, Binura
Hi
The IAL comprises of the following views joined:
ifsapp.purchase_order_print_rep
ifsapp.purchase_order
ifsapp.purchase_order_line_all
ifsapp.work_order_requis_purch
ifsapp.active_separate
within the Select there is a call to a custom API/Function but this again is looking at a core IFS view.
Regards
Shaun
I hope you are getting this issue in an operational report and not in a quick report.
There can be several causes for this issue. You can enable crystal logging to get the more detailed information regarding this error.
If you are getting this issue in an operational report, one reason for this issue can be the IAL view not being granted to the user IFSPRINT.
@binura92 Yes this is an operational report. It is the purchase order report we are replacing with a Crystal.
How do you enable crystal logging?
I ensured IAL was granted to IFSPRINT but still get error
Can you use IALs in operational reports as I have read you can only use report table i.e PURCHASE_ORDER_PRINT_REP?
As you can imagine, we need to bring supplier, purchase order, linked project and work order information onto to the document.
@SHAUN_KERSLAKE
Hi Shaun ,
May I know what is application and the UPD version ?
As you have mentioned, with Crystal Operational Reports we do not support other views than the report views (_REP suffixed views). However, it is still possible to create reports with IALs and we have seen some instances where customers have created reports using IALs. However, it is not recommended.
Sometimes, in your case, the IAL object’s grants might have removed from the IAL user ‘IFSINFO’. So, you can try granting that IAL object to the IFSINFO user.
You can use below code block to grant permissions to the IFSINFO user.
BEGIN
Database_SYS.Grant_All_Objects_Ial('IFSINFO');
END;
@binura92 URL doesnt work for me. It prompts for a login which doesn't accept my customer login.
If you are only able to use the _REP suffixed views, how do you add supplementary and key information to the document?! The _REP views are limited in the data held within.
Tried grant to IFSINFO but this too didn't work.
Try looking through the attached PDF - It has some useful tips
I don’t fully agree with everything which is written in it:
For example it states you cannot use SQL expressions when you use CR_WEB_INIT - which is incorrect as you can do the SQL expressions and then add in the CR_WEB_INIT at the end.
Also there is a comment which states you cannot use Commands - which you can
It also shows the views being aliased with \ and \\ but you could only actually develop with these if you apply a registry fix to the PC - so I use _A for views and _I for IALS.
I haven’t touched crystal reports in a while - But I always thought IALS didn't work for Operational Reports so I always converted them into views which is shown in section 1.10 in the PDF.
Regards, Callum
Below is how it is mentioned in the IFS documentation regarding enabling crystal logs.
Enabling Crystal Web Service logs
After Crystal Web Service version 90.00.0001 release, the Crystal Web Service Instances can be configured to write logs in different levels. The CR_Web_Log.exe which can be found in the Web Service instance folder could be used to configure logs for that particular instance. Once the logs are configured, you should make sure that the Windows security group IIS_IUSR has read, write and modify access the logging folder that you specify under "Log File Location".
You can choose “HIGH” option to have more detailed logs.
However, this feature is only enabled from Apps8 SP2 onwards.
Actually for APPs 8, this crystal reports logging functionality introduced sometimes later along with a patch. So there is a possibility that this logging functionality would not be available unless this patch is applied or it is Apps8 SP2.
Probably this could be an issue with grant problem. But it's always better to check the logs for issues like this.
Are there any CFVs in your crystal report?
The IFSPRINT user connects to the database through the crystal web service for operational reports. This user only has access rights for the reports(_REP) views. IFSPRINT does not have access to CFV views by default. I have seen that you mentioned that you have manually granted these views to IFSPRINT. But you can make sure the views whether they got this grants to the IFSPRINT user.
Another possibility is that when a new custom field is added the old CFV is dropped and recreated. So that previous grants could be removed. If you choose to still use CFVs in an IAL, the workaround is to manually grant access to the IAL user. Note that you will have to run this each time after creating a new Custom Field.
First you could run following select statement to make sure the IAL owner. Most of the time, it is IFSINFO.
select VALUE from FND_SETTING_TAB t where parameter = 'IAL_USER';
Then... @binura92 also provided this script,
BEGIN Database_SYS.Grant_All_Objects_Ial('IFSINFO'); END;
or maybe you can try the following as well if you can identify a particular view. Ex: grant select on SUPPLIER_INFO_CFV to IFSINFO;
For example it states you cannot use SQL expressions when you use CR_WEB_INIT - which is incorrect as you can do the SQL expressions and then add in the CR_WEB_INIT at the end.
Also there is a comment which states you cannot use Commands - which you can
If you add CR_WEB_INIT after adding SQL fields, you can’t edit the SQL fields without first ripping it back out. It makes the report harder to edit and harder to understand for a future developer who might inherit the report.
I recommend creating custom views and referencing those on your Crystal reports instead of the IFS views. If the name is obviously custom, then this can be EASIER to manage, in my opinion, depending on how you structure your source code repository. (SQL is a far more common and portable skill set than Crystal.) This approach allows you to use any SQL you’d like, and I find the syntax easier to manage for things like joins and groups. If you reference _CFV views, this is especially useful for avoiding the chore of updating all the Crystal files whenever you add a custom field.