when i run my report in vb it does not have an option to refresh my report is there a way where i could get it to prompt me for new paramters every time its run.
thanks
You can also set up your VB app to prompt for the parameters. For example, if you have several reports that require a date to be entered as the parameter, you can add radial buttons to a form with the report names for each. Add a data entry control to the form for the user to enter the date (ie. a masked edit box or a month view with dtpicker). And then a command button to execute the report. Add a Crystal Report to your app for each report that is linked to the radial button. Then when the user selects a report by selecting the radial button, enters a date and clicks the command button the app will determine which report to generate, evaulate the date entered and pass it to the report as the parameter.
Here is an example of code you might use:
dim sDate
"Report".ReportFileName = Path & "\ReportName.rpt"
"Report".ParameterFields(0) = "Date;" & sDate & ";TRUE"
'If you have multiple parameters, make sure they are listed in the same order as they are in Crystal and that you use the same name too.
' Print report to window
"Report".Destination = crptToWindow
' Show the Print button on the viewer
"Report".WindowShowPrintBtn = True
' Show the Export button on the viewer
"Report".WindowShowExportBtn = True
' Show the Refresh button on the viewer
"Report".WindowShowRefreshBtn = True
' Print the report to the window
"Report".Action = 1
You might also want to check out the FAQ on the Saved Data Trap ( faq766-1006 ) Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.