on 07-31-2014 3:00 PM
We have an application created in .NET 2 on VS 2005 that uses Crystal Reports. After upgrading the application in VS 2013 to use .NET 4, the Crystal Report quit working properly. The report has 3 parameters, and one of them is being ignored -- like it isn't even there. The report runs, but acts like the third parameter doesn't exist. When I click refresh on the report, it prompts me to enter 2 of the parameters, but not the 3rd ignored one...it is missing. But when I run the report in preview mode, it prompts for all 3 parameters and runs properly.
I installed the latest release of Crystal for .NET (v. 10) this morning, but nothing changed.
Thanks!!
Joe
Apparently, after running the report on a computer that runs it correctly, I see it is actually ALL the parameters that are being ignored.
I am sorry I didn't know this at the start. But I wasn't aware as I do not run this report myself.
Anyway, wanted to add that important fact...
Joe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Joe,
I'm not sure if this will help but it was recommended to me about a month ago by Ludek and it worked for me. In my scenario, the two parameters that were prompted were in fact displayed on the report, the last was only used in the RecordSelectionFormula and was not prompted until I made the changes in the document Ludek referred to me.
Officially it was my head on the nail until Ludek Uher sent me to that solution. I spent the hours back in July trying to figure it out. For me I think it was introduced when I upgraded the engine.
Glad I could help out. Everyone here has been helping me quite a bit lately as I do more complex things, so I am glad I could pass it back along.
I embedded the parameter value into the visible part of the report, and it is displayed correctly as "C", so it is being passed to the report. However, the report data is supposed to be limited to where a field in the query (DEPT_TYPE) is equal to "C" only (see extract below taken from the Select Expert - Record in Crystal). But the data being displayed in the report is data for all DEPT_TYPE's (T and C). So the parameter is passed okay, but ignored in the query when it runs.
{V_LEI_GT_TOOLLOOKUP.DEPT_TYPE} = {?Type1} and
{V_LEI_GT_TOOLLOOKUP.REQ_CAL} = "Y" and
{V_LEI_GT_TOOLLOOKUP.STATUS} = "Active" and
{LEI_GT_CAL.NEXT_CALIB} >={?StartDate} and
{LEI_GT_CAL.NEXT_CALIB} <={?EndDate}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joe,
What type of parameter is it? SP or Crystal Parameter?
Can you attach your report so we can see how it's designed and I'll test it also. Use the Advanced Editor and rename the file to *.txt
How are you setting the parameter in code?
What DB are you using and how are you connecting, ODBC, OLE DB, etc.?
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Don,
I have not used CR a lot, so I am not sure about your question "SP or Crystal Parameter?" The data for the report comes from several tables and views setup in the Database Expert with links between them. The parameters are setup into "where" clauses in the query, which runs against an Oracle DB.
The parameters are set using the following code:
for (int z = 0; z < GlobalSubs.reportParmName.Count; z++)
{
GlobalSubs.DailyReport.SetParameterValue(GlobalSubs.reportParmName[z].ToString(), GlobalSubs.reportParmValue[z].ToString());
}
// GlobalSubs.DailyReport.SetParameterValue("StartDate","1/1/1900");
//GlobalSubs.DailyReport.SetParameterValue("EndDate","1/1/2019");
//GlobalSubs.DailyReport.SetParameterValue("Type", "T");
this.Crystal_ReportViewer.ReportSource = GlobalSubs.DailyReport;
I have verified the above code passes the parameter names and values as expected. I have even tested with hardcoded parameter names and values (as you can see from the commented lines) and no difference. The last parameter (named Type) is ignored completely.
Again, ALL of this code and report worked fine before the upgrade. NOTHING was changed in the code or report...just the upgrade to .NET 4 and CR supporting VS 2013.
Report is attached...
Thanks!
Joe
By "v 10" do you mean SAP Crystal Reports for Visual Studio SP 10 (version 13.x assemblies) or do you mean the older version of Crystal for .NET that worked with VS 2008 (version 10.x assemblies)?
If it's the version 13.x assemblies, take a look at the report design in VS. In particular, look at the Parameters in the Field Explorer. Does the parameter that's not appearing have an icon that is just a blue question mark (no green check or yellow cylinder in the icon)? If so then the parameter is not being used in the report. In this case, the newer version of the SDK will not even display the parameter because it's not used.
-Dell
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joe,
Thanks but it works for me:
Same in both CR Designer and my Windows Form app. And nothing unique in the parameter type.
Check your references, make sure they are all version 13.x.xxxx.xx
If you open it in CR Designer can you change the order, try setting it to be the first one, I also added an A to the name to see if it made any difference also:
Another thought, may be ODBC driver related, who's Oracle ODBC driver are you using in your DSN? CR support the Oracle client directly alsom Set Location and use the Oracle Native Driver and see it that works.
Don
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.