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

Changinn SQL-String for Database Acces in CR 10.0 2

Status
Not open for further replies.

bidra

Programmer
Feb 28, 2002
31
DE
Hello,

I worked with CR 8.5 and now with CR 10.0.
In the 8.5 Version I could use the main menue option Database/Show SQL-String to show the SQL string, change it and store the new string.
In CR 10.0 I can only show the SQL-string but not change it (the background is grey instead of white).
Is there anything missing in the installation or why is CR 10.0 behaving that different?

Thanx in advance
bidra
 
No, it is behaving correctly. In CR 9.0, they made the SQL Query read only.

They did introduce new functionality in the SQL Command. You can now write your own SQL, paste it into a SQL Command, and then use it as a datasource to your report. This would be the functionality that you need to use.

To Add a SQL Command, open the Database Expert, and under any valid connections, you should see "Add Command". Highlight Add Command and click the left arrow to add it to the list on the right side. You can then add your SQL to the Command.

~Brian
 
Hello Brian,

thank for your valuable advice.
But now how can I get rid of the original SQL Query of the report. With the option Database/Show SQL-String I still see the old query.

Bidra
 
Hi,
after creating the new sql in the command object, use the set location option to 'point' the report to the new source .

[profile]
 
You would need to remove the existing datasource(s) form the report then add the SQL Command to the report. It is a pain in the neck if you are trying to retrofit an exisitng report since you have to piece it back together.

~Brian
 
Yes, Turkbear's post would probably be better since it will allow you to lose less of your fields. The problem is that if you use multiple tables in your current report, you can only set one of them to the SQL Command. I guess the best bet would be to set it to the table that has the largest number of fields on the report.

~Brian
 
Hi Turkbear and Brian,

thanks for your help, your advices sound very promising.
Can try it not before monday but I'll let you know if it works.

Bidra
 
Hi,

I've tried and it does work.

Thanx!

Bidra
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top