Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't Populate Crystal fields with Store Procedures 1

Status
Not open for further replies.

clydejones

Programmer
Jan 11, 2001
153
US
Hi,

I have written a Store Procedure that counts the records of a field that has the value let's say "B" in it. I know the count of the records that has "B in them is 25 for this field. However, when I lay the store procedure on the crystal form, I don't get a value. Can anyone tell me what I may be doing wrong?

Thanks In Adavance,
Calvin
 
What do you mean by "lay the store procedure on the crystal form"? Malcolm
 
MalcomW,

Thanks for your response. What I meant by laying the store procedure on the Crystal form is: I obtained the store procedure from the Field Explorer box and placed it on the Crystal form that I am creating(this is how I lay data base fields on the Crystal form). I must be doing something wrong because this store porcedure should be showing a value of 25. It does when I run the SQL in the SQL Server Query Analyzer and I've physically counted the number of records I'm querying in the data base for this field to be 25. Any help would be appreciated.

Thanks In Advance,
Clyde
 
Interesting. How did the Stored procedure get to be listed in the field explorer? It isn't a field. Did you make it somehow into a column of your data table or Query? Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
actually ken im working with him on this one and after you create the stored procedure on our ms sql database, when you go back into crystal 8 you select add database field and it is in there as if it is a field
 
Does every report shows every stored procedure in the list, or do you have to add the SP as a table first (Which would require a link to any other tables)? Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
I'm REALLY curious about this. Are you using an output parameter?
Linking wouldn't be required if there was only one row/column in the data set.
Could you mail me some sample code for the sp?
wynden@island.net
I using SQL Server 7, SCR v8 Malcolm
 
The part that puzzles me is that I am only aware of CR treating SPs as tables, not fields.

So either you are using a field from the output of the SP, or you are doing something that I have never seen.

Did you get it working? Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
ken,

I think we were using the field of the SP output. However, we decided to go with a VB route because we could not figure out how to pass parameters to the SP with CR. Hey, can you group your detail section like AAA BBB CCC instead of ABC ABC ABC. Thanks for your comments and time.

Clyde
 
I don't think so but I am not sure exactly what you mean. You can't revisit the same records again and again without using a subreport.

Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Ken,
Thanks for your reply. Prior to your reply, that's what I thought and actually created some sub reports to go into my main report and I got the format I was looking for. Thanks again for your replys. They were helpful.

Calvin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top