Solved

How to create layout definition entry when deploying new reports

  • 4 January 2023
  • 5 replies
  • 368 views

Userlevel 4
Badge +11

I’m working in IFS Developer Studio in a Cloud 21.2.9 environment deploying new operational reports and uplifting existing custom operational reports.  In my .rdf, there is a place for the report definition which uses Report_Sys to create the Report Definition in the application.  I’d like to create the report layout entry at the same time so it doesn’t need to be created manually in the application.  I realize that I’ll still need to import the actual layout in the application but I’m trying to skip the step of having someone manually create the layout entry after the report is delivered to the various customer instances.

I’m looking for advice on what the best practice is to accomplish this.  I did find that there is a Report_SYS.Define_Report_Layout_  procedure which I can put in the report definition section of my .rdf and which will create the layout entry.  The only issue is that it creates the entry with Design Time  set to TRUE.  I’ve found that this makes it impossible to delete the layout if there’s an issue with it.  The only option is to set the layout to disabled once Design Time is set to TRUE.  That’s not ideal since I’m working with a customer and don’t want to leave disabled junk in their instances if I make a mistake.

I’ve found another API called Report_Layout_Definition_Api which also has procedures to create the layout entry, but this API doesn’t have the same check to see if the layout already exists and is designed to throw an error on duplicate entries.  Of course, that won’t work for Cloud deployments.

Not to muddy the waters, but I should mention that some of the layout entries will be .rpl’s if there is an alternate SSRS layout.  I’m thinking this shouldn’t matter since all I want to do is create the line in the Layout Definitions that lives beneath the Report Definition. 

icon

Best answer by kavinduxo 3 February 2023, 04:28

View original

5 replies

Badge +2

hi, i have similar question. How do we deploy the report definition to other environments where we dont have database access (Aurena cloud)

Userlevel 3
Badge +8

I’m working in IFS Developer Studio in a Cloud 21.2.9 environment deploying new operational reports and uplifting existing custom operational reports.  In my .rdf, there is a place for the report definition which uses Report_Sys to create the Report Definition in the application.  I’d like to create the report layout entry at the same time so it doesn’t need to be created manually in the application.  I realize that I’ll still need to import the actual layout in the application but I’m trying to skip the step of having someone manually create the layout entry after the report is delivered to the various customer instances.

I’m looking for advice on what the best practice is to accomplish this.  I did find that there is a Report_SYS.Define_Report_Layout_  procedure which I can put in the report definition section of my .rdf and which will create the layout entry.  The only issue is that it creates the entry with Design Time  set to TRUE.  I’ve found that this makes it impossible to delete the layout if there’s an issue with it.  The only option is to set the layout to disabled once Design Time is set to TRUE.  That’s not ideal since I’m working with a customer and don’t want to leave disabled junk in their instances if I make a mistake.

I’ve found another API called Report_Layout_Definition_Api which also has procedures to create the layout entry, but this API doesn’t have the same check to see if the layout already exists and is designed to throw an error on duplicate entries.  Of course, that won’t work for Cloud deployments.

Not to muddy the waters, but I should mention that some of the layout entries will be .rpl’s if there is an alternate SSRS layout.  I’m thinking this shouldn’t matter since all I want to do is create the line in the Layout Definitions that lives beneath the Report Definition. 

Hi,

Please check with the following thread. RnD also added some comments on this.

BR,

Kavindu

Badge +2

hi Kavindu,

 

My question is how do you create the report definition in QA and Prod cloud environments as we don’t have the database credentials to execute the code Report_SYS.Define_Report…. ?

 

Thanks,

Saurabh

Userlevel 4
Badge +11

@kavinduxo Thanks for the link, it’s always interesting to see someone else trying to solve the same issue.

I did some more testing with Report_SYS.Define_Report_Layout_ and found that in addition to creating the layout with Design Time  set to TRUE, it was also incrementing my layout order each time I deployed. So that wasn’t going to work for me.

I ended up using a check to see if the layout existed and then just manually adding the attributes.  I don’t know if this is the “right” approach, but it seems to work for me.

   IF NOT report_layout_definition_api.exists(report_id_,layout_name_)

   client_sys.add_to_attr(….)

   Report_Layout_Definition_API.Add_Report_Layout_Definition(attr_)

Badge +2

hi Tracy, how did you migrate your Report definition to QA or Prod? Do you have have database access to create the report definition or execute the rdf file or did you use Developer studio to migrate ? We are able to create report definition and layout in sandbox instances as we have database access. However, for QA and prod, database access is not given and unable to create a new report definition. Is it something that can be done using solution manager? Thanks

Reply