Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, November 25, 2024 
 
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!
 Reporting & Notification Forums - Reporting
Forum to discuss reports for SalesLogix including Crystal, SQL Reports, etc. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to Reporting | New ThreadView:  Search:  
 Author  Thread: passing parameters to crystal reports
sowmya
Posts: 13
 
passing parameters to crystal reportsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Oct 07 3:02 AM
How to pass the date Range values in Reports section to text objects in a crystal report
Can any one please help
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: passing parameters to crystal reportsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Oct 07 9:13 AM
Take a look at this article on the subject: http://www.slxdeveloper.com/page.aspx?action=viewarticle&articleid=100

You can use this same method described in the article to pass multiple conditions to a report.
[Reply][Quote]
Susan Jack
Posts: 1
 
Re: passing parameters to crystal reportsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Feb 08 4:55 PM
After much testing and frustration it seems that when the report is run from the "Reports" window that the 'When Open' script doesn't run.
I tried using the method described in the article and things are fine if I lauch the report from a button, but when I run the report from the "Reports" window the script doesn't appear to run. I put a msgbox popup in the script and I don't see it when I run from the "Reports" window.
[Reply][Quote]
Snow Monkey
Posts: 214
 
Re: passing parameters to crystal reportsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 12 Mar 08 11:45 AM
What is t hat you want to do when the cr is opened?

You can always use app.bf.getcrystalreport and then assign that rpt object to a CRviewers datasource. But if slx security is involved , then you have to control the data with appropriate recselectionformulas i think. And this is what those slx report mv does. depending on who is logged on.

My point is if you script it out this way you can control the execution of script and do what needs to be done before calling the reports....

not sure if i am of any help here...but this is what i would try
[Reply][Quote]
drey
Posts: 16
 
Re: passing parameters to crystal reportsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 May 08 10:18 AM
I followed your instructions, but I have a problem.
I have a where clause that I created using the "Select Expert" in Crystal. I had to create this where close becase I have a lot of records. My problem is:
when I hard coded a value in the where clause, crystal ignores the condition from saleslogix, and use the hard coded value.
when I create a variable and assign to the where clause, it takes the condition from saleslogix, but ask me for the value of the variable anyway, even though, it ignores it in the report.
I need my report to take the condition from saleslogix and not ask the user for a value. Can anyone help?

thank you
[Reply][Quote]
Snow Monkey
Posts: 214
 
Re: passing parameters to crystal reportsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 May 08 4:19 PM
One line answer ....

.EnableParameterPrompting = False
[Reply][Quote]
Elaine Frank
Posts: 8
 
Re: passing parameters to crystal reportsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 May 08 11:12 AM
Will this work with version 7.2?
[Reply][Quote]
Snow Monkey
Posts: 214
 
Re: passing parameters to crystal reportsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 May 08 12:16 PM
Honestly....do not know.

But i know that 72 uses cr 11 for reporting. So get the components and open that in a object viewer and then look for yurselves if there is a methd like that. If not , search CR site for these as these are defnitely not slx methods.

Also a 2 min google search got me this code(i think this is in 11) , So yes , that should work!


' Typical Variable Declarations
dim crApp as New CRAXDRT.Application
dim crRept as New CRAXDRT.Report
dim crParamDefs as CRAXDRT.ParameterFieldDefinitions
dim crParamDef as CRAXDRT.ParameterFieldDefiniton
dim crDBTab as CRAXDRT.DatabaseTable

' Open Report File
set crRept = crApp.OpenReport("WHATEVER.RPT")

' Disable Parameter Prompting for the end user
crRep.EnableParameterPrompting = FALSE

' Gather the list of available parameters from the report
set crParamDefs = crRep.ParameterFields

' Loop through all parameters in the report by name, filling in the

appropriate parameter with the right value
foreach crParamDef in crParamDefs
select case crParamDef.ParameterFieldName
case "SubTitle"
crParamDef.SetCurrentValue "My Report Subtitle Goes Here"
case "@BeginDate"
crParamDef.SetCurrentValue datevalue(txtBeginDate)
case "@EndDate"
crParamDef.SetCurrentValue datevalue(txtEndDate)
case "@IntegerParam"
crParamDef.SetCurrentValue val(int(txtIntegerParam))
end select
next

crViewer1.ReportSource = crRept
crViewer1.viewReport

[Reply][Quote]
 Page 1 of 1 
  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!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/25/2024 12:30:29 PM