Showing posts with label box. Show all posts
Showing posts with label box. Show all posts

Friday, March 9, 2012

don't want to hard-code the base URL in the RDL

We need to have links in a report that point to a web application that is located on the same box as the SSRS web service. We don't want to hard-code the base URL in the RDL because this will change from development to staging to production. Where can we store this base URL? Can an RDL access a config file?


Hi !


YOu could use a custom component for this, but this is for me a classical thing of storing the information in a database and pulling it out to a textbox which displays the data.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

don't want to hard-code base URL

We need to have links in a report that point to a web application that is
located on the same box as the SSRS web service. We don't want to hard-code
the base URL in the RDL because this will change from development to staging
to production. Where can we store this base URL? Can an RDL access a config
file?All you have to do is create a "config" table in a database then create a
datasource to read the data from the table.
hth
"Jason Camp" <JasonCamp@.discussions.microsoft.com> wrote in message
news:B2BBCFDC-BCCA-499B-9DFB-2A8936A206A8@.microsoft.com...
> We need to have links in a report that point to a web application that is
> located on the same box as the SSRS web service. We don't want to
> hard-code
> the base URL in the RDL because this will change from development to
> staging
> to production. Where can we store this base URL? Can an RDL access a
> config
> file?|||can you keep it in a view'
-Aaron
Michael Morisoli wrote:
> All you have to do is create a "config" table in a database then create a
> datasource to read the data from the table.
> hth
> "Jason Camp" <JasonCamp@.discussions.microsoft.com> wrote in message
> news:B2BBCFDC-BCCA-499B-9DFB-2A8936A206A8@.microsoft.com...
> > We need to have links in a report that point to a web application that is
> > located on the same box as the SSRS web service. We don't want to
> > hard-code
> > the base URL in the RDL because this will change from development to
> > staging
> > to production. Where can we store this base URL? Can an RDL access a
> > config
> > file?

Sunday, February 26, 2012

Dont display address if its not there!

hi there, i have a invoice template that when printed has a box for the users address (which there always will be) and a box for their delivery address if they are having the items delivered. However sometimes they dont have things delivered and so the record in the delivery table does not exist. In this case it will throw an error, how can i avoid this. the code im using i have posted below

string sql ="SELECT [del_address], [del_post_code], [del_date], [del_time] From tbl_del WHERE order_ID = " + intOrderID;

//This creates a sql command which executes the sql statement.

SqlCommand sqlCmd =newSqlCommand(sql, myConn);

myConn.Open();

SqlDataReader dr = sqlCmd.ExecuteReader();

//This reads the first result from the sqlReader

dr.Read();

try

{

//string strDel_Address = dr["del_address"].ToString();

if (Convert.ToString(dr["del_charge"].ToString()) !=null)

{

//delivery items

lblDelAddy.Text = dr["del_address"].ToString();

lblDelPCode.Text = dr["del_post_code"].ToString();

Instead of "dr.Read();" use "while (dr.Read())" If there is no record it wont even try to fill the items

while (dr.Read()){//Do something}
|||

ah thank you, the problem though is that there is this line

if (Convert.ToString(dr["del_charge"].ToString()) !=null)

and several lines like it below which rely on it bringing something back, how could i change it so if it dosnt exist almost to not do anything?

|||

When you usewhile (dr.Read()) if there are no records it will not go into that block of code. This will solve your problem, give it a try.

Friday, February 24, 2012

domain password policy on 2005

Hi! How do we enforce Sql authenticated logins, the domain password policy?
It looks like by default (once you check the enforce policy box during new
login creation) it uses password policy of local machine, not the domain
policy. My server is in the domain and its running Windows 2003 sp1 and has
sql 2005 sp1 installed and not sure how to enforce the domain policy rather
than local machine policy.
Thanks in advance.the feature is not available at this time.
--
-oj
"james" <kush@.brandes.com> wrote in message
news:%235TtLS4mGHA.4208@.TK2MSFTNGP04.phx.gbl...
> Hi! How do we enforce Sql authenticated logins, the domain password
> policy?
> It looks like by default (once you check the enforce policy box during new
> login creation) it uses password policy of local machine, not the domain
> policy. My server is in the domain and its running Windows 2003 sp1 and
> has sql 2005 sp1 installed and not sure how to enforce the domain policy
> rather than local machine policy.
> Thanks in advance.
>

domain password policy on 2005

Hi! How do we enforce Sql authenticated logins, the domain password policy?
It looks like by default (once you check the enforce policy box during new
login creation) it uses password policy of local machine, not the domain
policy. My server is in the domain and its running Windows 2003 sp1 and has
sql 2005 sp1 installed and not sure how to enforce the domain policy rather
than local machine policy.
Thanks in advance.the feature is not available at this time.
-oj
"james" <kush@.brandes.com> wrote in message
news:%235TtLS4mGHA.4208@.TK2MSFTNGP04.phx.gbl...
> Hi! How do we enforce Sql authenticated logins, the domain password
> policy?
> It looks like by default (once you check the enforce policy box during new
> login creation) it uses password policy of local machine, not the domain
> policy. My server is in the domain and its running Windows 2003 sp1 and
> has sql 2005 sp1 installed and not sure how to enforce the domain policy
> rather than local machine policy.
> Thanks in advance.
>