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

SQL Server Subreport not working at runtime

Status
Not open for further replies.

Squeaks

MIS
Apr 25, 2003
18
GB
Hello again,

I have to write a disclaimer at this point..I'm a novice with Crystal and I'm sure the terminology and my understanding of it is poor so please forgive the longwinded explanation of my problem.

I've created a report in Crystal Reports 7 which draws the main data from an Access table but also includes two subreports..one from another access table..and the second from a SQL server connection. Now when editing the report and selecting Print Preview, the sql server prompts for a password (which is fine..we dont use trusted connections) and then the report appears to be processed and correct results returned for all three sources.

The problem is when i try the same from our application which uses the crystal runtimes...it generates the access tables and then runs the particular crystal.. it then does NOT prompt for the sql server password and shows on screen the actual report first page (a description page, no data), says it has a certain number of pages (say 1 of 12)..but when 'forwarding' to another page nothing changes and the page results return 1 of 1.

I can then go back into the original crystal report and print preview again if necessary (after once again being prompted for a sql password) but I do not understand whats happening!! (or more accurately NOT happening). Any help ? I've tried something similar in the past but instead of linking directly to sql server on the second subreport it linked to Access2k (as per the rest of the report) and setup that Access table to connect to sql server (this method DOES prompt me for the server password).

Ideas and explanations most welcome ;)

Les
 
The more I read the above the less sense it makes! Perhaps a little more relevant info...

The main report is an access table which includes an id field (which is also a Group on the main report), within this group/section there are two subreports, the first another access database (using the same driver, ive tried ado and dao, and a linked table would prolly be fine here?) and the second a sql server connection (6 tables linked together via visual linking expert). Both subreport datasources have this matching id field so thats the parameter field sent to each.

In my report designer print preview within Crystal Pro 7 this all works fine.

The report when run live will not show *any results* other than a dataless first/cover page unless i change the SQL server subreport to an on-demand report at which time the main report and the first access subreport produce correct results, hence im assuming the problem is the sql server connection sub.

Why would this run in print preview (after requesting my authentication) but not 'live' (no authentication asked for). If its relevant this is under Win2k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top