Solved

Adding command with parameter for accessing SQL Quick report

  • 11 January 2024
  • 4 replies
  • 61 views

Badge +2
  • Do Gooder (Partner)
  • 6 replies

Hi,

I'm currently trying to add new command to the Suppliers page, which leads to SQL quick report based on this entity. I need the quick report to run just on the selected suppliers. Is there a way to do it? There is a possibility to add parameter when creating the command, but I cannot figure out how to make it work.

Adding SQL Quick report command parameter

I believe that selection should be based on SupplierId from the selected supplier(s). So I put it into the “Context value” on the right. But what should go into “Destination Attribute field?

Also - is there necessary WHERE clause in the Quick Report SQL statement, or should I leave it without it?

 

icon

Best answer by Marcel.Ausan 11 January 2024, 14:11

View original

4 replies

Userlevel 6
Badge +15

@zila the destination attribute is the filtering condition from your where statement in the Quick Report.

In my example I have a quick report where I can filter by Project ID

 

Then you will see your Quick Report parameters in the Destination Attributes:

 

In my case, the relation is like this:

 

And when I run the command, the Quick report is executing and implicitly filtering for the project id 1210 where I’m at:

 

So, what you’re missing is the filtering attribute in the Quick Report.

and a.project_id = '&Project_Id'

 

I hope this helps!

Badge +2

@Marcel.Ausan It works! Thanks a lot! I have a sub-question though. Is there a way how to pass multiple selections? For now it works just for one selected supplier.

Userlevel 6
Badge +15

@zila from the documentation it doesn’t say if this is possible. I assume it’s not.

https://docs.ifs.com/techdocs/23r1/040_tailoring/225_configuration/200_client_configurations/300_commands/#adding_an_executequickreport_type_command

Badge +2

@Marcel.Ausan  Ok. In that case I will check with the client if this solution works for them. If not, I can try to create new entity with the necessary data and page with list from this entity. This solution should provide requested functionality. Thank you very much for your help!

Reply