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!

Parameter Passing and SubReport Hell

Status
Not open for further replies.

Guru7777

Programmer
Dec 10, 2003
331
US
I have a report that has many subreports contained in it. I passed the database logon to it and it ran fine. Then one day, after an upgrade and some backend realignment (so the exact cause is unknown), the report started prompting me for the odbc logon info. Except it doesn't want any information. Entering valid info will make it mad. All I have to do is click ok with both fields blank to get in. None of the other reports that I launch with the code ask for this info (they do not use subreports, hence my guess that that might be the culprit).

Can I make the viewer never prompt me for any information (logins, parameters, etc) that I don't give it explicitly?

I use Crystal Enterprise 9 on Windows 2000 Server. I am accessing it through RAS using Classic ASP. Thank you for any help that you can offer.

 
Try opening the report within Crystal Reports and select Database->Verify Database

If you change the backend then you're going to suffer this sort of thing.

One method of supplying an insulating layer is to generate Views or SP's for all reports, that way if the backend changes you won't need to alter the report(s) or any applications involved, instead simply CAST any changed data types back to the original data type within the View/SP and all processes will function again.

I never allow developers to use tables directly, I write a script which generates a View from each table and ALL developers use the Views to generate other Views or SP's.

-k
 
Thank you for your response..

I did what you suggested to verify the database, and it came back fine. I saved that report and uploaded it to the server and it keeps doing it. I do know that we do use views and have crystal access them to create the reports.

Does anyone know how to have it not prompt me for a param if I don't supply one? I thought that there was a property called .EnableParameterPrompting, but maybe it was for a different viewer or my head is cloudy beause I tried that and got an error about an unsupported property.

Thanks in advance for your time.
 
If you're getting prompted for parameters, then you should check the links from the main report to the subreports.

Right click on a subreport, click 'Change Subreport Links', and check to see if the links are intact. From the top of the Subreport Links window, you can use the 'For subreport:' dropdown to get to each subreport.

-dave
 
Vidru's suggestion didn't end up helping me. If it makes a difference, but I am getting prompted for ODBC Database Login credentials, not a parameter used to narrow a report down.

I had heard tale that the Crystal Enterprise Update that IT installed could cause some problems. I don't have very many details about that, but does anyone have any insight about that? This is very frustrating, since the subreports are supposed to be inheriting their database login info from the main report, and like I said earlier, it doesn't even REALLY want login information, just for you to click past some blank boxes (the real odbc connection needs both a name and password).

When I run the report from within the Crystal designer, it only asks for DB info once, which makes me fear the upgrade error.

I don't have very much Crystal experience. In fact, I've received no Crystal training at all. I don't make the reports or maintain the server. What I do is create web applications that access the reports. No one here knows how to do this at all, and I've only learned from the notoriously crappy Crystal documentation on this subject.

If anyone has ANY ideas..... I'd love to hear them.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top