Print Page | Close Window

Stored Procedures

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=10791
Printed Date: 26 Apr 2024 at 9:45pm


Topic: Stored Procedures
Posted By: paulchatwin
Subject: Stored Procedures
Date Posted: 10 Aug 2010 at 6:10am
Hi All
I design my reports using the CR XI application. When I do this I connect the data source to my SQL server and pick a stored procedure.
 
Then in VB.net I want to use some code to simply print the report using data from the stored procedure with out using the CR Viewer tool, so I do this:
 

cr.Load(Application.StartupPath & "\reports\" & reportFilename)

cr.DataSourceConnections.Item(0).SetConnection(serverName, dbName, True)

cr.SetParameterValue("@STARTDATE", Format(noww, "yyyy-MM-dd 00:00"))

but when it runs it shows a message saying missing parameter values.
 
Can someone tell me what im missing please?
 
Thank you in advance



Print Page | Close Window