Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Facing problem at Sub Report

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0


We have a Main report which contains a sub report.

When we run this report thru CRystall Report Designer tool ,it runs fine,It asks for authentication twice (i,e) one for main report and another for sub report.

But we try to invoke this report thru VB Application(Crystall control).It throws an error <20599: Cannot open sql Server>.
We have cross cheked the followings :-
1.we have the ensured Server is on(oracle)
2.We are passing proper authentication(only one
time) to this report by control.connect='param'
**** 3.If we suppress the sub - report,it works fine.

What could be the problem? Kindly advice me
We have one doubt that whether we have to pass two times authentication to the report,as we have sub-report.
If so kindly suggest me, how to pass twice the authentication.


Thanx in Advance
---Rajan




 
The login in the code has to be done for BOTH the main report and the subreport. Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
How can i pass the information for two reports from VB, below is my code with which i using to connect the reports.

ora1 =&quot;odbc;dsn='';&quot;
ora2 =&quot;uid='';pwd=''&quot;

CrystalReport1.ReportFileName =&quot;*.rpt&quot;
CrystalReport1.Connect = ora1 + ora2
CrystalReport1.SelectionFormula=''
CrystalReport1.Destination = crptToScreen
CrystalReport1.Action = 1

The main report and subreport are of same database(using same odbc). The subreport is a linked subreport.

Help me how to login in the code for BOTH the main report and the subreport.

thanks
---Rajan



 
Found !............


CrystalReport1.ReportFileName =&quot;*.rpt&quot;
CrystalReport1.Connect = ora1 + ora2
CrystalReport1.SelectionFormula=''
CrystalReport1.SubreportToChange = CrystalReport1.GetNthSubreportName(0)
CrystalReport1.Connect = ora1 + ora2
CrystalReport1.Destination = crptToScreen
CrystalReport1.Action = 1



Thanks..............

---Rajan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top