Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Crystal reports
Message
From
26/07/2011 11:44:11
 
 
To
26/07/2011 11:34:57
General information
Forum:
Microsoft SQL Server
Category:
Reporting Services
Title:
Miscellaneous
Thread ID:
01519045
Message ID:
01519207
Views:
19
Hi Craig

I think I may not have been clear enough.

I only have access to CR developer for this. The site don't use visual studio .

I've since been told from another forum that it can't be done.

___________________________________________________________________________________________________________
You cannot pass parameters to a stored procedure from report objects. The stored procedure will respond to CR Designer when you first reference the SP when you define the report. CR creates links to stored procedure parameters from the data source interface only, not from the report.

You will see an entry in the Parameters objects, but it will be read-only -- you can place it in the display section, but you cannot set it from report formulas, passed values, etc. Using formulas to process data before calling the stored procedure will not work, nor will trying to pass data through subreport links from the main report.

Using other design tools, you can have code that controls the data source interface, and processes data that is passed in parameters, but in CR Designer, you are pretty much left with the bare minimum options. You can right-click on the parameter and do things like set default values, set prompting text, set a pattern / mask for the format, but that's about it.
_____________________________________________________________________________________________________________

The problem that I had was to exclude some records from a sub report .
I wanted to use a subquery
SELECT WHERE NOT IN
etc but you can't do that either in Crystal. Neither can you add and conditions to a left join. So then I thought I could use a stored procedure but came up against this parameter problem.

I have to say at the moment I feel Crystal is fairly useless unless being driven from a application that can control it properly.

This may be me just not 'getting it'

Thanks though

Nick
.


>You treat the subreport as another report. You have to get a reference to the report object FOR THE SUBREPORT. Then you can set the parameters for it's parameter object.
>
>>Hi Craig
>>
>>not quite sure what you mean by that.
>>
>>I'm creating the report in crystal. (Version 11)
>>
>>The main report asks for start and end date and an organisation code as a parameter.
>>
>>I want to use the same values in the sub report stored procedure.
>>
>>I've added the stored procedure as as the data source for the sub report but I can't find where I can pass across and set the parameters for the stored procedure so I'm getting asked twice.
>>
>>Thanks
>>
>>(enjoy you holiday. I hope you're doing something nice.)
>>
>>Nick
Previous
Reply
Map
View

Click here to load this message in the networking platform