×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Facing problem at Sub Report

Facing problem at Sub Report

Facing problem at Sub Report

(OP)


  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



 
      

RE: Facing problem at Sub Report

The login in the code has to be done for BOTH the main report and the subreport.

Ken Hamady
http://www.kenhamady.com/
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.

RE: Facing problem at Sub Report

(OP)
How can i pass the information for two reports from VB, below is my code with which i using to connect the reports.

ora1 ="odbc;dsn='';"
ora2 ="uid='';pwd=''"

CrystalReport1.ReportFileName ="*.rpt"
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



RE: Facing problem at Sub Report

(OP)
Found !............


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



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

---Rajan

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close