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

why we used views in crystal reports ?

Status
Not open for further replies.

ub1234567

Programmer
Dec 4, 2008
69
US
hi members,

i know the concepts and definition of veiws but
i do not understand why peoples used views in crystal report ?

because query defined under view , that we can also write in command of CR.

so what is the advantage of using views in CR and why peoples used in that ?

thanks.
 
Hi,
While views and the Command are similar, Views can be accessed outside of CR, for one thing.

Secondly, Views, since they are part of the database, can be backed up and restored if lost...once you lose the CR that has the command, you will have to hope you remember what it was.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Hi,
Another point ( and maybe the most important one) is that using views the Database Admin can restrict access to the underlying tables and only grant users access to the views,



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
It's also cleaner (or at least can be) to look at. When a view is properly constructed it should contain only those columns which are human readable and relevant to the report(s) (or application code) in question. Any ID fields, key fields or irrelevant fields can be suppressed. The resulting view, when place into CR is then displayed in a clear and concise manner in a single list (there aren't multiple objects to select columns from).

-- Jason
"It's Just Ones and Zeros
 
Hi all, Thanks for reply.

i also heared that when we make views, it is aleady compile on server.

so because of that reports runs fast ..is it right ?

thanks.
 
Hi,
Nope..although that is a common misunderstanding.
A View is just a query stored in the database's dictionary.
( May be somewhat database dependent,but in most, like Oracle, that is where they are kept).

Views also allow for the joins between tables to be hidden and pre-tested by the admins or expert users. ( Bad join decisions can lead to cartesian products and bring down a database or at least seriously affect its performance.)





[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top