Reputation: 63
I am not using VB, C# or ASP, that being said I want to pass a parameter directly to Crystal Reports XI R2. For example:
click 'Start'
type 'Run' then Enter
'MyReport.rpt 12345'
(12345) is the parameter that I want to pass in, or perhaps I could type
'MyReport.rpt?parameter1=12345'
Most of the examples that I have found while doing research are discussing VB or ASP, that is NOT what I want.
Thanks in advance!
Upvotes: 0
Views: 7919
Reputation: 86
Just found this today: http://www.rainforestnet.com/crystal-reports-exporter/
It is a command line tool which does all the work (takes the params, credentials and has export possibilities)
simply create a .cmd file per report and gather all the difficult values from external sources like powershell
Upvotes: 6
Reputation: 26272
The RPT file is not an executable, so it won't accept command-line arguments.
What you want to do is something like crw32.exe -u:"file:///path/to/file.rpt -p0:12345"
. Unfortunately, crw32.exe doesn't accept command-line arguments.
You will need to write an EXE that accepts and parses arguments from the command line, opens the report, sets the parameters' values, executes the report (you'll need to pass DB credentials), and finally show the viewer.
Upvotes: 1