Last post Jan 18, 2011 01:47 AM by tracylandy
Mar 21, 2010 03:51 AM|deenindia|LINK
I need to link 2 stored procedure in crystal report, passing same parameter id, i tried but getting error
"Unable to connect: incorrect log on parameters."
in this way i'm creating report.
1) Create Dataset(myTable.xsd) in App_Code folder
2) Create a blank Crystal Report, Field Explorer getting Database Fields, from Database Expert (ADO.Dataset Objects), selecting the
3) Drag the fields in Crystal Report n Execute
any solution plz for my scenario.
Mar 21, 2010 05:32 AM|Das.Sandeep|LINK
Similar post :
Mar 21, 2010 11:41 PM|deenindia|LINK
no its not the same issue, actually for me its connect to DB if there is one table, issue is if i add one more table
then exception thrown....
i think in passing parameter, but i can't figure out...
Mar 22, 2010 02:58 AM|kamanashish|LINK
Create a store procedure with parameters for fetching data. Execute the sp (pass parameters here) and set this fetching data (datatable/dataset) as Report data source.
Or You can directly use query(with parameters) for design the report and then pass the parameters in runtime.
Mar 22, 2010 05:21 AM|deenindia|LINK
already i'm using the stored procedure only....
Mar 22, 2010 09:02 AM|kamanashish|LINK
How are you setting report source and passing parameters? Actually it is not clear to me how you are trying to do this. There are several of techniques to perform this.
You can follow the steps:
Mar 23, 2010 04:12 AM|deenindia|LINK
s already i'm doing same way u mentioned but i can't get result.... i created 2 dataset with parameter, but the parameter is same
@awID for both and also i created only one parameter in crystal report passing value through code.
hope you understand..
Mar 23, 2010 07:17 AM|kamanashish|LINK
Your passing parameter in crystal report is looking ok. How do you Set DataSource in report document?
Mar 24, 2010 01:03 AM|deenindia|LINK
using DataTable, here is my code
Dim custormerReport as ReportDocument
MyCommand.Connection = strConn
MyCommand.CommandText = "spCustomer" 'Stored Procedure
MyCommand.CommandType = CommandType.StoredProcedure
Dim SqlParam(0) As SqlParameter
SqlParam(0) = MyCommand.Parameters.Add("@CustomerID", SqlDbType.BigInt)
SqlParam(0).Direction = ParameterDirection.Input
SqlParam(0).Value = variableCustomerID
Dim MyDA As New SqlDataAdapter
MyDA.SelectCommand = MyCommand
Dim MyDataTable As New DataTable
custormerReport .SetParameterValue("customerID", variableCustomerID)
strConn = Nothing
Mar 24, 2010 03:16 AM|kamanashish|LINK
Do you use CrystalReportViewer for showing your report?
After set parameter use
CrystalReportViewer1.ReportSource = custormerReport;
Mar 25, 2010 01:24 AM|deenindia|LINK
No i'm not using crystal report viewer, directly open in PDF. Actually i found the solution for the issue, i just use the Sub report
in my report....
Thanks for replies....
Oct 12, 2010 01:11 PM|Nilla2010|LINK
I am working in the same situaltion . My question is ,I have a dataset and stored procedure. In the field explorer my using the Storeprocedure and dragging the fields from there.Is that correct or i have to use dataset in the field explorer.
I need to use more than one dataset/Storeprocedure is the Subreport is the solution ?
Jan 18, 2011 01:47 AM|tracylandy|LINK
Spire.DataExport publishes a new free version to export data to Excel, Word, PDF and other format file. You can try to download it from