I'm having a bear of a time getting reports with subreports to function correctly.
I have followed all of the directions for logonInfo updates.
The original report running under v9 only has to have the first four parameters filled, from there 9 other linked parameters are supposed to be filled.
I started with code that we have in production (v9). This code ran fine when running against the server that the report was designed against. But when compiled in CR .net 2005 the linked parameter values kept prompting.
Then I tried to hack my way through that problem and set all of the parameters (13) instead of just the 4 we normally send. Still no go. It will run fine against the original dev database. But not against any other database server/name with identical schema.
This happened with either a local report document load and access or a web service load and access (although with the web service it was impossible to get the prompting to stop)
Is there any guidance on resolving this issue. Seems like with every CR release we have had to deal with the logon problems with subreports. Why isn't this getting any better. Will it require all of our v9 reports to be converted to XI If so is there any shortcut to doing this We have about 120 different reports and I don't want to have to convert all of them manually.
HELP!!

LogonInfo, linked parameters, different databases, subreports, Oh My
Thomas82
matt_uk
It is not the parameters being passed in that are not set, it is the linked parameters which are prompting when run. So somehow the linked parameter values are not getting propagated to the subreports. And since they are linked parameters I have no way to set the values externally.
Can I ask you how you performed your testing What versions of CR did you have on your test machine I currently have 9.2, 10.2 on the machines that I have been testing from. Did you switch database contexts
As I said previously with this particular report even after I validate the database it is still prompting me for the linked parameter values
Mehfuz Hossain
I tried the same type of subreport link as your report and cannot reproduce the problem. I notice you use index to set the parameter value in this fundtion repDoc.SetParameterValue(1, 0);. Can you please try to use the parameter name instead The index number for parameter may not be same after the report updated to the new version. If you still have problem, please check this site http://support.businessobjects.com/programs/lifecycle/assist.asp to contact our TS. They will help you in detail.
Thanks
MP0401
Thanks
Manjunath.H.A
When I run the report against either the new server or the original server I am prompted for the linked parameters on the subreport.
Unfortunately it appears that the issues are going from bad to worse for our 8->9->10 converted reports
Richard Grant
shajahan
BTW, I can enter any values when I'm prompted for parameters but report uses parameter's value I set in code.
Many people have different problems with CR in VS 2005 and ask for help in this forum and forum at Business Objects' site. But specialists from BO either don't respond or redirect to other forum.
I'm sorry if I was too blunt but this problem does not allow me use VS 2005 for development.
Mubarak
I ask this because I know once the have a solution they will not file it in such a way that it will be retrievable when I call and ask the exact same question.
It will then trigger a trip through Crystal support's 9 circles of hell to find the answer, again.
DonnyK
sogod
Would it have anything to do with this report being upgraded from 8->9->10
I did try the same code with one of the xtreme database samples (upsized to a mssql database to two seperate servers) with a sub report. I added another subreport with a sp and linked parameter from the main report and it worked fine after switching database contexts.
But I can't get this report or other of our reports (with subreports and sp parameters) to work after changing the database location. They all prompt for the linked parameters. That is why I wonder if it is a report conversion from 8->9->10 issue.
BTW the code
crTable.Location.Substring(crTable.Location.LastIndexOf(".") > 0 crTable.Location.LastIndexOf(".") : 0);
is incorrect it should be
crTable.Location.Substring(crTable.Location.LastIndexOf(".") > 0 crTable.Location.LastIndexOf(".") +1: 0);
DotNetFireball
Once again the code performs fine under v9 when switching databases but does not appear to be initializing the linked parameters for the subreports under CR.Net 2005 when run against a database other than the original database (it does run fine against the source database for which the report was designed).
If I type in all of the linked parameters for the subreports at the prompts when running against the new database it does render correctly.
This report was originally a version 9 report and I resaved it after a database verify on the original source database using version 10.2 (CR.Net 2005). The v9 test was run with the original v9 report.
Any suggestions
here is class containing the method to return the ReportDocument:
using
System;using
System.Collections.Generic;using
System.Text;using
CrystalDecisions.Shared;using
CrystalDecisions.CrystalReports.Engine;namespace
WindowsApplication2{
/// <summary> /// Test class for crystal reports.net 2005 /// </summary> public class ExportReport{
public ReportDocument getDocument(){
ReportDocument repDoc = new ReportDocument(); ReportDocument subRepDoc = new ReportDocument(); Sections crSections; ReportObjects crReportObjects; SubreportObject crSubreportObject; Database crDatabase; Tables crTables; TableLogOnInfo crLogOnInfo; ConnectionInfo crConnInfo = new ConnectionInfo();repDoc.Load(
"report.rpt");
/* developed report connectionrepDoc.SetParameterValue(0, 1);
repDoc.SetParameterValue(1,0);
repDoc.SetParameterValue(2,97099);
repDoc.SetParameterValue(3,1033);
repDoc.SetParameterValue(4,27640);
string dbserver = "originalserver";
string dbname = "original datbase";
*/
/* new connection*/
repDoc.SetParameterValue(0, 1);
repDoc.SetParameterValue(1, 0);
repDoc.SetParameterValue(2, 61124);
repDoc.SetParameterValue(3, 1033);
repDoc.SetParameterValue(4, 14988);
string dbserver = "newserver"; string dbname = "newdatabase"; string dbuser = "newuser"; string dbpwd = "newpassword";crDatabase = repDoc.Database;
crTables = crDatabase.Tables;
foreach (Table crTable in crTables){
crConnInfo.ServerName = dbserver;
crConnInfo.DatabaseName = dbname;
crConnInfo.UserID = dbuser;
crConnInfo.Password = dbpwd;
crLogOnInfo = crTable.LogOnInfo;
crLogOnInfo.ConnectionInfo = crConnInfo;
crTable.ApplyLogOnInfo(crLogOnInfo);
crTable.Location = dbname +
".dbo." + crTable.Location.Substring(crTable.Location.LastIndexOf(".") > 0 crTable.Location.LastIndexOf(".") : 0);}
crSections = repDoc.ReportDefinition.Sections;
foreach(Section crSection in crSections){
crReportObjects = crSection.ReportObjects;
foreach (ReportObject crReportObject in crReportObjects){
if (crReportObject.Kind == ReportObjectKind.SubreportObject){
crSubreportObject = (
SubreportObject)crReportObject;subRepDoc = crSubreportObject.OpenSubreport(crSubreportObject.SubreportName);
crDatabase = subRepDoc.Database;
crTables = crDatabase.Tables;
foreach(Table crTable in crTables){
crConnInfo.ServerName = dbserver;
crConnInfo.DatabaseName = dbname;
crConnInfo.UserID = dbuser;
crConnInfo.Password = dbpwd;
crLogOnInfo = crTable.LogOnInfo;
crLogOnInfo.ConnectionInfo = crConnInfo;
crTable.ApplyLogOnInfo(crLogOnInfo);
crTable.Location = dbname +
".dbo." + crTable.Location.Substring(crTable.Location.LastIndexOf(".") > 0 crTable.Location.LastIndexOf(".") : 0);}
}
}
}
return repDoc;}
}
}
CJ_
I would prefer that the sample be in c# and I don't see anything that it is doing that I'm not already doing except it is not setting parameters.
Lakshan Fernando
I just don't understand how they can release a product that 'breaks' so regularly from version to version.
If anyone out there has a fix for this problem I would love to here it.
Thanks,
Todd Sparks
brunic
[begin rant]
We went through all of this when 9 was released and it brought down our servers and tooks us 2 months of support from Crystal so they could point out it was Microsoft's problem (spinlock problem with strcomp). (this after endless hours of defining test procedures so Crystal could recreate the problem).
It was as hard now as it was then to believe that an issue which is simple to duplicate on various machines/servers could be so difficult for Crystal to identify and reproduce. Or that they could have overlooked the issue in testing (assuming that they do test/use their own product).
And now that v9 is finally stable and we are happy with it's functionality we are being FORCED to adopt a new version which will not reproduce the functionality we enjoyed in the past version (since you can no longer obtain Crystal Advanced Server v9 through distribution channels and Crystal does not provide the functionality that Advanced Server provided unless you plop down a significant chunk of change for their 'new' buggy product).
I had hoped that when Business Objects purchased Crystal that support/troubleshooting/quality would improve. I'm not sure that it hasn't gotten worse. I most certainly know that it has not gotten better.
If we were not completely locked into the product by the number of reports that we would have to convert we would look for another vendor. I'm not saying that won't happen anyway since it appears that we will have to redevelop our v9 reports to use with v10 or v11. Word to the wise, if you are starting a new development project look to another direction for your reporting needs.
There must be less painful alternatives out there whose companies don't abuse their customers with the marketing and quality problems that Crystal exhibits.
[end rant]