8/29/2025 9:31:18 AM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
|
|
|
|
passing multiple parameters to Crystal Reports
Posted: 15 May 09 10:38 AM
|
I am trying to pass two conditions to a report The two conditions work if they are done independently, and run togther should return data.
In the order I have the conditions below, I get the error "no rowset was returned for this table, query, or procedure" If I swap the conditions around, the report runs, but only the first condition is processed
Syntax:
with application.basicfunctions.reportclearconditions application.basicfunctions.reportaddcondition "Curtis_contract_header:accountid","=","'" & application.globalinfo("curtis_print_contract_run_for_cust") & "'", "string", "" application.basicfunctions.reportaddcondition "Curtis_contract_header:curtis_contract_headerid=curtis_contract_headerid.curtis_contract_detail!end_date","<",now(), "string", "and" application.basicfunctions.globalinfoclear "curtis_print_contract_run_for_cust" end with I have tried several variations, but cannot get this to work |
|
|
|
Re: passing multiple parameters to Crystal Reports
Posted: 11 Aug 09 7:48 AM
|
This may not be the best ever solution, but it appears that the second line has no Saleslogix dependent variables...
application.basicfunctions.reportaddcondition "Curtis_contract_header:curtis_contract_headerid=curtis_contract_headerid.curtis_contract_detail!end_date","<",now(), "string", "and"
... as such, you could add this as part of the record selection criteria hard-coded inside the crystal report.
Then, in order to run it you would need to get rid of the "reportclearconditions" statement, and simply have...
application.basicfunctions.reportaddcondition "Curtis_contract_header:accountid","=","'" & application.globalinfo("curtis_print_contract_run_for_cust") & "'", "string", "and"
This will work, but isn't ideal if you do not want to hard-code the "date < now()" record selection into Crystal.
The only other way I can think to get around this would be to use the ReportAddConditionEx instead of ReportAddCondition. This way you can use your date value as a literal in the "IsLiteral" argument. This may work better for you....
ReportAddConditionEx Function Provides full support for query conditions. Adds a condition to the current report using sub-properties to set up the condition that is added.
Object Application.BasicFunctions.ReportAddConditionEx Syntax ReportAddConditionEx (datapath, operator, value, type, connector, CaseInSensitive, IsLiteral, Negated)
Parameters Datapath {string} - name of the field in the database.
Operator {string} - comparison operator.
Value {string} - value to compare.
Type {string} - data type of the field.
Connector {string} - The connector property is always blank for the first condition. For additional conditions, the connector property refers to how the condition relates to the previous condition in the list.
CaseInSensitive {Boolean} - indicates whether comparisons should be made using case sensitivity. False indicates that the comparison should be case sensitive. True indicates that the comparison should be case insensitive.
IsLiteral {Boolean} - True indicates that the value supplied should be taken as a literal. Useful for date comparisons such as, ‘03/01/1998’. False indicates that the value supplied is used by the Query Manager to derive a comparison value (for example; within the next xxx days).
Negated {Boolean} - True indicates that the result set should be negated (for example; all rows that do not match the condition are returned). False indicates that the result set should not be negated (for example; all rows that match the condition should be returned). |
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|