on 2014 Jul 16 9:39 PM
So I am getting the below error.
I have verified the database in my report several times and reset the datasource location. The report run a preview just fine. So that seems to tell me that it has no problem connecting to the database and running the sql query.
I am loading and sending parameters to the report as follows...
parmPCname = Session("pcname")
parmReportDate = Session("productionDate")
reportPath = Server.MapPath("MakingDuration.rpt")
newMakingDuration.ReportDocument.Load(reportPath)
newMakingDuration.ReportDocument.SetDatabaseLogon(username, password, server, database)
newMakingDuration.ReportDocument.SetParameterValue("pcname", parmPCname)
I am using CR version 13 patch 10 in VS2013
Anyone have any ideas on the above error message?
thanks
doug
Request clarification before answering.
The place to start is the database documentation. Database Vendor Code messages are being passed through the CR engine unmodified so they do not mean anything to us.
You do mention that the report runs fine... but were? The designer?
See if simplifying will help;
Comment out all code except:
newMakingDuration.ReportDocument.Load(reportPath)
Then of course view or export or print code (that part of the code is missing in your post (e.g.; I'm not sure what you are attempting to do with the report)). E.g.; if viewing:
newMakingDuration.ReportDocument.Load(reportPath)
CrystalReportViewer1.ReportSource = <the report you loaded>
This will force the report to load and prompt for the parameters and db logon. Fill those out and see what happens.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try formatting the parameter using this way or what ever type it is:
newMakingDuration.SetParameterValue("pcname", Convert.ToString(parmPCname));
The error means you are not formatting the value properly or the log on info is incorrect. CR is simply passing the error from the Client to you.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Don and Ludek for the assistance.
I was able to get past this by recreating the report from scratch and creating a stored procedure in my SQL Server 2012 db. Before I simply was using a SQL query command in the report and I think something to do with how I created the parameter was causing the query to not run. It works great with a stored procedure.
thanks again
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 7 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.