How to print current user name and db name on report?
I don't know exactly where this request should go, but anyway.
I want to print the current user name and db name at the foot of every
report page. In sql server, the functions are "SELECT USER_NAME()" AND
"SELECT DB_NAME()". I'm very new to sql and reportbuilder so any tips are
appreciated.
I want to print the current user name and db name at the foot of every
report page. In sql server, the functions are "SELECT USER_NAME()" AND
"SELECT DB_NAME()". I'm very new to sql and reportbuilder so any tips are
appreciated.
This discussion has been closed.
Comments
By default, a Report object will find every instance of a DataPipeline on
your form (or in DADE) and allow you to access the data from it. Since the
query you describe below probably only returns one record there is no need
to traverse any data so you could simply place the query inside a TADOQuery
object, then access the data directly from a pipeline connected to that
query. Inside the report you can show these values using a DBText or DBMemo
component. Below is how the data flow works in ReportBuilder when working
with ADO (using BDE is very similar)
TADOConnector --> TADOQuery --> TDataSource --> TppDBPipeline --> TppReport
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com