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

How do I changing a column a field is bound to? 1

Status
Not open for further replies.

Kliot

Programmer
Jan 10, 2003
622
US
I'm using CR X1 with Vs.net 2005, I have a field bound to a column in a sql server database. How do I change the column that the field is bound to? It seems like this sould be easy to do but I'm not seeing it. I want to use a different table in the report and I don't want to have to delete and replace the fields, I just want to change what table they are bound to.

Thanks

 
If you are changing all of the columns to the new table/view you can do this by going to your database menu, set datasource location.

In the upper dialog you find the current information, whatever view/table you are currently attached to that you are changing. In the lower part of the dialog you find the new view/table you want to change to.

Once you have the two selected, you click the update button. This switches the two. HOWEVER throughout your report the old table will still look like it is present because it is actually an alias of the true source not the real source.

To fix this:

Once you have completed the switch, you can rename the alias throughout the report. To do this go to 'Database'/'Database Expert'. Your old table name will be in the right side under selected tables.

Click on it, and press F2. You should be able to rename this to whatever you need it to be. There are special character limitations and things like that, but those are as you would expect.

If you just want to change the source of a single column, you can't really do that. The best way to set up your report to reduce this problem is to put the fields into formulas and THEN if you have to modify or change you can just do it in the single location. I never put a field on the canvas, I always wrap it in a formula first. But I'm probably in the minority on that.

If you want to keep your current data source and get data from a different column in a different table/view you can either bring in the other table and do a join or build a new data source in SQL on the server.

Hopefully that answered your question.

 
Thank you for the detailed and thorough explination, it was quite helpful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top