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

Can I use a shared variable inside a SQL command in a Crystal Report?

Status
Not open for further replies.

css1015

Programmer
Oct 29, 2003
20
0
0
US
Hi,

Here is the situation:

I have to pass a field value from the main report to a sub-report. I do not want to use a parameter in the sub-report to store the value of the main report field. Also, I use a command in the sub-report that has a field that can be equated to the main report field, that solution leads to bad performance since the database is HUGE.

My thought was to use a shared variable to obtain the value of the field in the main report and see if I can use it in the SQL command in the sub-report. Can that be done? If yes, what would be the syntax?

Thanks in advance.

Chad
 
No. A SQL command is drawing directly from the database, and a variable that you have created does not reside there. I think using a parameter is your best bet. The speed issue is likely a result of the fact that you are using a subreport. Maybe there is another way, if you provide more info about your report.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top