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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

log on to subreport

Status
Not open for further replies.

Jacob438

Programmer
Jul 27, 2001
69
US
I have two .rpt files that I created using crystal report. They were automated with VB6 to run every week (i used the RDC method). I am running Crystal 8.5. Anyways, they were always ran together, so we finally just combined them by making them both subreports under a blank report. Therefore, we basically get two reports in one file.

Now I'm having problems with the automation part. I linked all the parameters (basically the same in both), and I'm not having any problem with that, but I'm having a problem getting the second subreport to connect to the database (that's my guess, because it shows up blank when the first one works correctly). How do I get the second supreport to log on to the database? The database info is the same for both, here's my log on code now:

Set Report = crxApplication.OpenReport(strReportName, 1)
crxApplication.LogOnServer "pdsodbc.dll", strServer, strTable, strUser, strPwd

It's the same code I used when I had one report... and it seems to work for the first subreport, but not the second, thanks in advance,

Jacob438
 
this is very frustrating...I can get it to work for a little while, then it quits working. Whether from VB or the actual reports designer itself. When I first place the reports in a blank report as subreports... it works. After a while, the first subreport quits working. It's like it's not connecting to the database. Once I get it to work, I start changing options one at a time and then try to see what causes it to not work anymore.

When I check the "re-import on opening" and then it'll quit working. So then when I uncheck that and run it again... you would think it would work again... but it doesn't. However, this itself doesn't happen all the time either, ARGH!

thanks in advance,

Jacob438
 
You need to provide logon informations to each report no matter it's main report or subreport. Just go through previous posts, it should be addressed lots of times already.

Btw: I use logonserver long time ago. Can't remember what's the syntax.

Cheers!

Ted
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top