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!

Accessing Subreport field

Status
Not open for further replies.

Yiyi

Programmer
May 31, 2001
13
CA
Hi I am brand new to Crystal Reports (few days) and have a problem. I need a number in my main report wich I get from another database, the only way I have found right know to get this is thru a subreport but know that I have the value there how can I access the number in my main report so I can pass it to some formulas??<br><br>In another environment I would just write an sql sentenced execute and store the value in a variable, is there somewhere in CR where I can just put in a sql query????
 
Crystal reports comes with it's own query writer '32-bit Crystal SQL Designer.&nbsp;&nbsp;You can write your own sql code or let the wizard do it for you.&nbsp;&nbsp;You then feed the query to your Crystal Report. <p>LindaC<br><a href=mailto:lcastner@co.orange.ny.us>lcastner@co.orange.ny.us</a><br><a href= > </a><br>
 
Can you do this even if you choose Oracle as your datasource and let's say I choose tables A, B for my report but I need one data from table D wich doesn't have much of a relation with the other two can you give me an example on how I will do it.
 
yiyi,<br>I have found stored procedures to work well for doing that kind of stuff, as you have more flexibility with using variables, temp tables, etc. <p>Malcolm Wynden<br><a href=mailto:wynden@island.dot.net>wynden@island.dot.net</a><br><a href= > </a><br>
 
yiyi,<br>&nbsp;&nbsp;&nbsp;&nbsp;There is no way to link Table D to Table A or B?&nbsp;&nbsp;If that is the case maybe a subreport is the best bet.&nbsp;&nbsp;You still have to link the tables in a Query, unless, you know of a way to program it using SQL.&nbsp;&nbsp;I am not familiar with SQL besides the basics.&nbsp;&nbsp;Check the CR Help files.&nbsp;&nbsp;Go in help and choose search.&nbsp;&nbsp;Type in 'subreports', choose 'Subreports Topics Index'.&nbsp;&nbsp;A list will be displayed.&nbsp;&nbsp;I saw 'How to use subreports w/&quot;unlinkable&quot; data.&nbsp;&nbsp;Maybe that will help.<br><br>Now, I have a question about Malcolm's answer.&nbsp;&nbsp;What is a stored procedure?&nbsp;&nbsp;Do you have to have a certain kind of database to use that function?&nbsp;&nbsp;I found it on the database dropdown menu but it is grayed out. <p>LindaC<br><a href=mailto:lcastner@co.orange.ny.us>lcastner@co.orange.ny.us</a><br><a href= > </a><br>
 
If you plan to make your report available over the web, be careful basing your report on Crystal queries.&nbsp;&nbsp;I found that this caused the Web server that served up the reports to crash when there were multiple people accessing the report.&nbsp;&nbsp;<br><br>A new connection to the database was created for each Crystal query running until the maximum number of SQL Server connections were used up and no one else could log in.&nbsp;&nbsp;Then the Crystal Web Server would lock up and had to be rebooted.&nbsp;&nbsp;We are using Domino, but I believe I tested this on IIS.<br><br>Mary<br>
 
Stored procedures are a precompiled collection of SQL statements stored under a name and processed as a unit.&nbsp;&nbsp;They are available in most client server databases, although the means of creating them varies.&nbsp;&nbsp;Check your database documentation for more info on how to roll your own. <p>Malcolm Wynden<br><a href=mailto:wynden@island.dot.net>wynden@island.dot.net</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top