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!
|
|
Crystal Parameter Defaults
Posted: 12 Oct 06 9:12 AM
|
fiogf49gjkf0d Hi
SLX 6.2.4 and Crystal 8.5
I can't figure out how to create a Crystal Parameter where the default values pull from the database rather than the default list. I have a field that is constantly being updated and each time a new value goes into SLX I have to check out the report, update the def. values and re-release the report. Anyone have any ideas?
Zeph |
|
|
|
Re: Crystal Parameter Defaults
Posted: 12 Oct 06 9:36 AM
|
fiogf49gjkf0d I just found online that this functionality won't be available until we upgrade as it's new to Crystal XI. (*#)!!! Anyone came across this issue and found a workaround?
Thanks in advance. |
|
|
|
Re: Crystal Parameter Defaults
Posted: 12 Oct 06 10:42 AM
|
fiogf49gjkf0d I found a workaround if anyone is interested. In Architect, when managing the report there is the "Execution" tab which can launch all kinds of great stuff. For my case, i'm creating a form where the user can select what they want in the report, and then i'm using the BasicFunctions.ReportAddCondition function to pass the criteria to crystal.
Zeph |
|
|
|
Re: Crystal Parameter Defaults
Posted: 13 Oct 06 8:36 AM
|
fiogf49gjkf0d Thats a good work around. I'd start using it but since 7 is now using CRXI and it has the ability to have dynamic list parameters, I'll just wait til I can get our system upgraded. One caveat I've seen using this CRXI feature outside of SLX is the larger the number of values contained in the database field, the longer it takes to actually show the parameter list. So it goes to say that you have to be careful where you use this feature so you're not sending the report into oblivion gathering the dynamic list data. Users will complain and most likely start to End Task on the application.
John G. |
|
|
|
Re: Crystal Parameter Defaults
Posted: 16 Nov 06 12:21 PM
|
fiogf49gjkf0d Does anyone know the functions that you can use to add parameters to crystal reports in Legacy code?
I'm still on v5.2 but want to dynamically populate my parameter fields.
Thanks!
|
|
|
|
Re: Crystal Parameter Defaults
Posted: 16 Nov 06 3:41 PM
|
fiogf49gjkf0d I'm trying to use "ReportAddCondition", "ReportSetConditions", "ReportGetConditions" but I'm having no luck....Are these IQ reporting functions? Developer's reference doesn't specify, but I'm beginning to think they are. |
|
|
|
Re: Crystal Parameter Defaults
Posted: 17 Nov 06 9:16 AM
|
fiogf49gjkf0d I definatly don't know about v5 but i figured id give you the syntax for 6.2 just in case it helps. application.BasicFunctions.ReportAddCondition fieldname, operator, restrictvalue, datatype, and/or (as it relates to previous condition)
For a main table you can use table:field Application.BasicFunctions.ReportAddCondition "CONTACT:ACCOUNTID","=",strAccount,"STRING","OR"
For a sub-table you would have to specify the join to the main table i.e. Application.BasicFunctions.ReportAddCondition "CONTACT:ACCOUNTID=ACCOUNTID.PARENT!PARENT_ACCOUNT_ID","=",lueParent.LookupID,"STRING","OR"
Zeph |
|
|
|
Re: Crystal Parameter Defaults
Posted: 17 Nov 06 10:19 AM
|
fiogf49gjkf0d These functions do work for Crystal reports as well. However, it does matter where these are used from. You have to use these in a script tied to the reports WhenOpen event. From a script that launches the report set any variables as globals to pass, then pick those up in a script tied to the WhenOpen event of the report and use the ReportAddCondition function to set them for the report. |
|
|
|
Re: Crystal Parameter Defaults
Posted: 11 Feb 09 12:07 PM
|
Ryan,
Is it possible to use the IN operator and pass a string of IDs using the.reportaddcondition? I've tried what I thought should work, but without being able to see what that function is generating, hard to debug
Michael |
|
|
|
Re: Crystal Parameter Defaults
Posted: 12 Feb 09 5:05 AM
|
You can use in. You need to put the spaces around in in the quotes so the operator is shown as " IN ". It has been a while since I did it and now I can't find where, but I recall I had to build the list of values completely before passing it into the reportaddcondition so it looked like "('value1', 'value2', 'etc')" |
|
|
|