We have a report that uses a dynamic pick list to allow the user to select values from a list loaded from the database. When I run the report in the designer, I get prompted with a pick list. We run this report in a web UI and on one server we get the list and on another where the list is supposed to be we get a free-form text entry field that allows me to type in anything at all.
There is zero feedback from CR about what, if anything, went wrong. No event log entries, no dialog boxes, nothing. I have absolutely no idea where to even begin looking for a solution.
The non-working server is using the 64 bit runtime engine for .Net 4, 13.0.3.612 and the working one is running 13.0.2.469. I don't see anything in the release notes suggesting that the was anything "fixed" in the newer version that would break dynamic pick lists.
Request clarification before answering.
Hello Colin
Picture being worth a thousand words, could you send a screenshot of what you are seeing?
- Ludek
Follow us on Twitter
Got Enhancement ideas? Try the SAP Idea Place
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's either incorrect version of the viewer or the viewer is not configured correctly.
Use Process Monitor on both the working and non working computer. In the logs look for the crystalreportsviewer13. The non working computer should show you the same "stuff" (path, name, etc.)as the working one.
- Ludek
There has been no "configuration" of the viewer. The example I provided was just a test with my local dev installation and one of our staging servers. A better example is we have 2 staging servers both running the same OS and both having had our application and CR runtime installed from the same installer binaries and both have identical versions of the CR runtime. One server is able to properly display the dynamic pick list, the other is not. In both cases all other parts of CR are working, and on the one that cannot display the dynamic pick lists, it gives me a free-form text entry field and if I enter something in there and use the button to send it to the selected values list, it will run the report with the typed values.
Monitoring with procmon results in 1864 entries on the non-working server and 2788 entries on the working server, but they are all registry access. The only other CR entries I've noticed are for CSS files.
It turns out that I was missing few events earlier (I cleared the log before launching the report, but I think IIS may have cached the CR runtime). I ran iisreset and started logging, then logged into the site and navigated to the report view. Now I see a few more entries of type QueryDirectory (that mostly result in "no such file") in addition to the thousands of registry access entries when I filter by path contains "crystal" or details contains "crystal." The final 2 QueryDirectory entries succeed, and both (working and non-working) are looking for:
C:\Windows\assembly\GAC_MSIL\CrystalDecisions.Shared\13.0.2000.0__692fbea5521e1304\CrystalDecisions.Shared.dll
C:\Windows\assembly\GAC_MSIL\CrystalDecisions.Shared\13.0.2000.0__692fbea5521e1304\CrystalDecisions.Shared.dll
Note that I have different versions of crystal installed on both machines, 13.0.3 on the non-working and 13.0.2 on the working. It appears as though the wrong file is being looked for, although it is succeeding in both cases.
I have opened a tech support incident with SAP. We've created a reproduction using a RPT file with Excel data sources. I'd attach it here, but that doesn't appear to be possible.
So, the issue appears to be only when the website is hosted in IIS, and the CR runtime components were installed correctly (or at least the 32 bit ones were). Unfortunately CR is not logging any messages I am aware of that would provide any clues about where or why things are going wrong.
Colin, are you using any CR viewer events?
Have a look at this post: http://scn.sap.com/thread/3325885
What's the incident ID?
- Ludek
No events being used. The incident is 1148125/2013.
This is the entire code in my sample:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ConfigureCrystalReports();
}
}
private void ConfigureCrystalReports()
{
var connectionInfo1 = new ConnectionInfo()
{
DatabaseName = Server.MapPath("~/AccountID.xls")
};
var connectionInfo2 = new ConnectionInfo()
{
DatabaseName = Server.MapPath("~/AccountType.xls")
};
var reportDoc = new ReportDocument();
reportDoc.Load(Server.MapPath("~/DynamicPickListFromExcelFile.rpt"));
SetDBLogonForReport(connectionInfo1, connectionInfo2, reportDoc);
CrystalReportViewer1.ReportSource = reportDoc;
}
private void SetDBLogonForReport(ConnectionInfo connectionInfo1, ConnectionInfo connectionInfo2, ReportDocument reportDocument)
{
Tables tables = reportDocument.Database.Tables;
foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)
{
TableLogOnInfo tableLogonInfo = table.LogOnInfo;
switch (table.Name)
{
case "Sheet1_":
tableLogonInfo.ConnectionInfo = connectionInfo2;
break;
case "ID_":
tableLogonInfo.ConnectionInfo = connectionInfo1;
break;
}
table.ApplyLogOnInfo(tableLogonInfo);
}
}
Colin, please tell Vinit that you are also working on the issue here - just so he knows.
Two things:
1) Process Monitor logs should show you that the app is accessing the folder; crystalreportsviewer13
Do you see that folder being accessed?
2) Both servers are using hte same OS and IIS?
3) I'd like you to "dum" things down a bit:
1) Run the report first and ensure it has "saved data" as this is what we will be working with
2) New app
3) Viewer on a form
4) One line of code: CrystalReportsviewer1.ReportSource = <path to the "saved data report from (1)">
5) Deploy this app to the problem server - default app pool
6) Run
7) Hit the refresh button - this should give you a screen asking if you want to use current of new parameter(s). Choose 'new'. What does this parameter screen look like?
- Ludek
I previously emailed Vinit a link to this discussion. He has been able to reproduce it apparently. I tried your steps, but I do not get prompted about using current or new parameters. I ran the report in designer and saved it with data.
I will check procmon tomorrow, but IIRC there was access to that folder. The OS is not the same in all cases:
Windows 7/64 bit: not working
Windows 2008 R2: working
Windows 2008 R2: not working
That's kind of the point. We've got one 2008 R2 server that is working and one that isn't. Both were installed using the same binary installer package which uses a bootstrap to download the same CR runtime version on each installation. Both are reporting the same CR runtime versions. Both are VMs. The only difference is one is hosted in our production environment and one in our test/staging environment.
Interesting. I asked Vinit for the same app he tested with and created a brand new image; VS2010, no CR. Installed the 32 bit MSI for CRVS. Installed Vinit's app and the parameter came up the same as it did on a development computer.
I have just sent an email to Vinit to share his image with me so I can take a look at possible differences, run a few utilities, etc.
- Ludek
"Inside" Visual Studio (i.e. using the 32 bit Cassini web server) it runs fine. Outside, using IIS in a 64 bit app pool it fails. I think it's an issue with the 64 bit code. Two releases ago was 32 bit, and was extensively tested and we did not see any issues. The last release we converted to 64 bit, and the dynamic parameters were probably not tested as extensively (just that they worked, probably on a QA server) and since the problem appears to be somewhat sporadic, we did not notice until recently.
| User | Count |
|---|---|
| 10 | |
| 5 | |
| 5 | |
| 5 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.