Crystal Reports with WCF Web Service as a Data Source

I have the following two objects: Assignment and Billing

enter image description here The GetAssignments method returns a list of Assignments , and I want to get Billing for each Assignment . GetBillingByAssignmentId takes an integer AssignmentId as a parameter.

From what I read from various sources, is that it is not supported by CR. So I changed GetBillingByAssignmentId to take a list of integers as a parameter.

Now the problem is how to pass the list of integers as a parameter to GetBillingByAssignmentId from GetBillingByAssignmentId .

Is it even doable? If so, please call me in the right direction.

+6
source share
2 answers

No feedback was received, so I came up with a job to solve my problem. This is not an elegant solution, but it works.

First, I combined the Assignment and Billing Objects into one Master object so that all the information is contained in one object called Assignment.

Secondly, I changed the GetAssignments method parameter to take a string, not a list of integers. And then from Crystal Reports, when the user is prompted to enter a value, the user can enter a comma in a separate list of destination identifiers. The web service breaks the Assignmend identifiers and returns List of Assignment objects.

The "Allow multiple values" option in the "Edit Parameters" window in the Crystal Report Viewer is unavailable / not supported / always false when using web services as a data source.

0
source

Due to my reputation, I cannot add a comment, so the answer is here.

Please check How to pass a list of values ​​to a crystal report , this may be useful for you ...

0
source

Source: https://habr.com/ru/post/1013908/


All Articles