Solved

Custom Report data not filtering according to given parameters

  • 1 February 2023
  • 8 replies
  • 222 views

Userlevel 3
Badge

Hi,

I have customized a new screen for Proforma invoices and now I need to add data to a custom report and print according to the given parameters. First I created the custom report using report designer without adding any parameters and included in the customization project.

then I created an action called Print Report to print the report when clicked on the button. 

*Destination screen is the Pro Forma Invoice Report which is the report screen (PI302000.rpx)

 

 

After publishing the customization project , my customized screen is shown as below.

 

 

Now I clicked on the print report button and first it navigated me to the PI302000 screen and when I run the report it gives me the report with all data without any issue.

 

Then I Modified the report with a parameter (refnbr) and included into the customization project again and modified the action with the parameter also.

Report designer schema builder

 

Action properties of customization project

Now I Published the customization project and clicked on the print report but this time it gives me the same output which I got without any parameter. And also when I clicked on the print report button, It doesn’t navigate me to the Pro forma Invoice report screen (The screen of the report) and even I’m not allowed to add parameters. But I searched for the pro forma invoice screen through the link then it opens the report screen and there is a field to add parameters as shown below.

 

 

Now I passed the parameter into this field but it gives me the same report output with all data without filtering according to the given parameter.

 

 

 

I need to allow the user to add parameter and print the report by filtering data whenever clicked on the print report button on the custom screen.

Can someone give me the solution on this issue please?

Thank you.

icon

Best answer by chris49 1 February 2023, 09:03

View original

8 replies

Userlevel 4
Badge

Hi @oshadarodrigo64 ,

I might be wrong here, but worth a shot. Can you double check that you’ve setup the filter conditions on the parameter you’ve introduced? It should be added to the Filters tab on the Build Scema popup of the report designer. 

 

Userlevel 3
Badge

Hi @chris49,

thank you for the response, previously I have not added my parameters to the filters so I added now and checked in the report designer but now it shows nothing, below screenshot for your reference.

Added parameter to the Filters

Preview of the report,

report designer preview

How can I solve this now then?

Thank you.

Userlevel 2
Badge

In the schema builder screen, under parameter tab you have to provide view Name. Please see attachment

Userlevel 4
Badge

Hey @oshadarodrigo64 ,

Ok, that looks like progress 👌🏻 Now we should determine whether the parameter is making it through to the report engine. 

Lets test in the following 2 ways:

Add a random text field to the top section of the report, somewhere close to that ‘Pro forma Invoice’ section. The value of the text field should be set to your parameter value:

 

After publishing the report, and run it, you should expect to see the parameter value pulling through.

As another way to check the underlying SQL that is run, enable the request profiler before you run the report. Identify the correct SQL query which is run, and then you will see whether your parameter has been passed through as an argument. 

 

After running the report, you can go back to the request profiler screen, and check out the SQL queries:

  1. Click Refresh Results
  2. Locate the LongRun-Report request type and select it
  3. Click on the View SQL button

This will show all of the SQL that was executed during your request. In this case I just ran a Lot/Serial report with a specific warehouse as filtered parameter, and as you can see, there’s several ocurances of the parameter value in the queries. This way we know that we’re definitely getting that data across, and executing the correct SQL queries.

Let me know your results/findings.

Userlevel 4
Badge

In the schema builder screen, under parameter tab you have to provide view Name. Please see attachment

I thought this was the case, and was heading there! Thanks @sd79 

Userlevel 3
Badge

Hi @chris49 ,

thank you for your solution I tested all the above steps and now the report is working much better than previous. I have attached the screenshots of the results.

 

 

printed report

now it gives the result according to the ref number. Fine. But below screenshot shows the report screen (PI302000) and there is a field to add parameters. so if I need to navigate the user to this screen when clicked on the print report button and allow the user to pass parameters and run the report , is there any suggestion to do that?

 

Thank You.

Userlevel 4
Badge

That’s very interesting. Did you remove the Parameter from the Schema Builder in the report designer, or did you perhaps untick the visible tick box?

Userlevel 3
Badge

Hi @chris49 ,

thank you for the response . Actually, as I’m new to acumatica developing, I double checked the report and the schema builder but the parameter is still available and also visible box is checked. I have also added this parameter to print report action in the customization project editor as shown below. 

 

Action properties of customization project editor

sorry for late reply.

thank you.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved