Solved

Could I used IFS APIs in Crystal report? or Do I need to create only IAL?

  • 20 August 2021
  • 2 replies
  • 461 views

Userlevel 6
Badge +14

I am new to Crystal Reports.

Could I call APIs functions to create Crystal Reports or build my own custom API and call it in a Crystal report? or  do I need to build only IAL?

 

Another quick question. Our system has many IALs built by our old developer.

 

How could I see the SQL written to build the IAL?

 

 When I access the IAL Object Developer I cannot populate the code. See screenshot 1 for more details.

Screenshot1.-

 

However, I can see in IAL Configuration that we have 89 IALs. How could I see the code for each one of the IALs? See Screenshot 2

 

Screenshot 2

 

icon

Best answer by Charith Epitawatta 20 August 2021, 07:37

View original

This topic has been closed for comments

2 replies

Userlevel 7
Badge +31

Hi @ZTC ZTC JGOTA,

You are supposed you use only _REP suffixed views with Crystal reports. You cannot use custom SQL query commands either as they are not supported by the framework, according to documentation.

This is mentioned in Crystal Report Development Guide here:

https://docs.ifs.com/techdocs/foundation1/050_development/025_operational_reporting/200_cr_as_operationalreport/default.htm

However, you can use IAL views and also views like CFV views(custom field views) in your Crystal reports. You just need to make sure to manually grant SELECT privileges on those views to IFSSYS and IFSPRINT users. 

There are many standards that you need to adhere to when developing Crystal reports for IFS. If these are not met, the reports may not work. Therefore it is advisable to go through this guide thoroughly when developing Crystal reports. 

Regarding the SQL code for IAL Objects, you cannot see the SQL code from IAL Objects Developer window. When you create an IAL Object using IAL Object Developer, you have the option to export it to a file. Therefore please check whether you can find those stored somewhere. They end with the extension “.ial”. You cannot populate the window to find the objects. 

Otherwise, you would have to manually look for the view definition from database side under IFSINFO schema. 

You can find the IAL Object development guide here:

https://docs.ifs.com/techdocs/foundation1/050_development/026_br_and_a/040_information_access_layer/default.htm

Hope this helps!

Userlevel 7
Badge +19

I can add that you find the SQL from the installed IAL’s by looking in following data dictionary view:

  1. If logged on as IAL user, normally called IFSINFO use view USER_VIEWS.
  2. If logged in as appowner use view DBA_VIEWS.

Example:

SELECT *
FROM user_views
WHERE view_name LIKE '<NAME_OF_YOUR_IAL>%'

 

There you will find two views. One which ends with IAL, there you have the SQL statement. The other view, without IAL at the end, is the view you shall use in your report. That is described here in the section “Implementation”: 

https://docs.ifs.com/techdocs/foundation1/010_overview/255_br_and_a/070_information_access_layer/default.htm