Showing posts with label showing. Show all posts
Showing posts with label showing. Show all posts

Friday, March 30, 2012

how to exclude time portion of datefield in a textbox?

Hello,
The datasourece in my report contains a date field, and the time portion of
this date field is showing up. Is there a format function that I can use in
the textbox or do I need to remove the time portion at the datasource level?
If there is some kind of formatting I can do in the textbox - what does that
look like? What is the syntax?
Thanks,
RichIn the textbox properties, format tab, format code, use 'd'. The format
codes are from .Net you can also use the format function if you need to
concatenate. The elipsi button shows more options.
Steve MunLeeuw
"Rich" <Rich@.discussions.microsoft.com> wrote in message
news:93FE2808-E8D0-4F74-BF11-B669FE2718D6@.microsoft.com...
> Hello,
> The datasourece in my report contains a date field, and the time portion
> of
> this date field is showing up. Is there a format function that I can use
> in
> the textbox or do I need to remove the time portion at the datasource
> level?
> If there is some kind of formatting I can do in the textbox - what does
> that
> look like? What is the syntax?
> Thanks,
> Rich|||Thanks. I will give that a try. Although, I did tweak the datasource a
little and added this which also does the trick (just not at the report level
is the thing):
convert(char(8), s.CurExpireDate, 1) CurExpireDate
which returns say - 10/18/06 format
where CurExpireDate was the datefield in my datasource.
May I ask what the syntax looks like using 'd' in the report textbox?
= ...Fields!CurExpireDate.Value
"Steve MunLeeuw" wrote:
> In the textbox properties, format tab, format code, use 'd'. The format
> codes are from .Net you can also use the format function if you need to
> concatenate. The elipsi button shows more options.
> Steve MunLeeuw
> "Rich" <Rich@.discussions.microsoft.com> wrote in message
> news:93FE2808-E8D0-4F74-BF11-B669FE2718D6@.microsoft.com...
> > Hello,
> >
> > The datasourece in my report contains a date field, and the time portion
> > of
> > this date field is showing up. Is there a format function that I can use
> > in
> > the textbox or do I need to remove the time portion at the datasource
> > level?
> >
> > If there is some kind of formatting I can do in the textbox - what does
> > that
> > look like? What is the syntax?
> >
> > Thanks,
> > Rich
>
>|||The expression in the textbox would the the same:
=Fields!CurExpireDate.Value
the textbox is applying the formatting to the contents of the textbox.
If you wanted to concatenate strings then the expression would look
something like this:
= "Generated on " & Format(Globals!ExecutionTime, "d")
Steve MunLeeuw
"Rich" <Rich@.discussions.microsoft.com> wrote in message
news:FCE38529-426A-41FC-88DD-EAF9974AB6ED@.microsoft.com...
> Thanks. I will give that a try. Although, I did tweak the datasource a
> little and added this which also does the trick (just not at the report
> level
> is the thing):
> convert(char(8), s.CurExpireDate, 1) CurExpireDate
> which returns say - 10/18/06 format
> where CurExpireDate was the datefield in my datasource.
> May I ask what the syntax looks like using 'd' in the report textbox?
> = ...Fields!CurExpireDate.Value
>
>
> "Steve MunLeeuw" wrote:
>> In the textbox properties, format tab, format code, use 'd'. The format
>> codes are from .Net you can also use the format function if you need to
>> concatenate. The elipsi button shows more options.
>> Steve MunLeeuw
>> "Rich" <Rich@.discussions.microsoft.com> wrote in message
>> news:93FE2808-E8D0-4F74-BF11-B669FE2718D6@.microsoft.com...
>> > Hello,
>> >
>> > The datasourece in my report contains a date field, and the time
>> > portion
>> > of
>> > this date field is showing up. Is there a format function that I can
>> > use
>> > in
>> > the textbox or do I need to remove the time portion at the datasource
>> > level?
>> >
>> > If there is some kind of formatting I can do in the textbox - what does
>> > that
>> > look like? What is the syntax?
>> >
>> > Thanks,
>> > Rich
>>|||Thank you for this information.
Rich
"Steve MunLeeuw" wrote:
> The expression in the textbox would the the same:
> =Fields!CurExpireDate.Value
> the textbox is applying the formatting to the contents of the textbox.
> If you wanted to concatenate strings then the expression would look
> something like this:
> = "Generated on " & Format(Globals!ExecutionTime, "d")
> Steve MunLeeuw
>
> "Rich" <Rich@.discussions.microsoft.com> wrote in message
> news:FCE38529-426A-41FC-88DD-EAF9974AB6ED@.microsoft.com...
> > Thanks. I will give that a try. Although, I did tweak the datasource a
> > little and added this which also does the trick (just not at the report
> > level
> > is the thing):
> >
> > convert(char(8), s.CurExpireDate, 1) CurExpireDate
> >
> > which returns say - 10/18/06 format
> >
> > where CurExpireDate was the datefield in my datasource.
> >
> > May I ask what the syntax looks like using 'd' in the report textbox?
> >
> > = ...Fields!CurExpireDate.Value
> >
> >
> >
> >
> > "Steve MunLeeuw" wrote:
> >
> >> In the textbox properties, format tab, format code, use 'd'. The format
> >> codes are from .Net you can also use the format function if you need to
> >> concatenate. The elipsi button shows more options.
> >>
> >> Steve MunLeeuw
> >>
> >> "Rich" <Rich@.discussions.microsoft.com> wrote in message
> >> news:93FE2808-E8D0-4F74-BF11-B669FE2718D6@.microsoft.com...
> >> > Hello,
> >> >
> >> > The datasourece in my report contains a date field, and the time
> >> > portion
> >> > of
> >> > this date field is showing up. Is there a format function that I can
> >> > use
> >> > in
> >> > the textbox or do I need to remove the time portion at the datasource
> >> > level?
> >> >
> >> > If there is some kind of formatting I can do in the textbox - what does
> >> > that
> >> > look like? What is the syntax?
> >> >
> >> > Thanks,
> >> > Rich
> >>
> >>
> >>
>
>

Monday, March 26, 2012

How to encrypt sql statements from showing in profiler

I have seen when i run a select statement written by some devs which has
some joins,etc.. , that when i run it in profiler it hides the SQL statement
and instead shows in the textdata column text commented out that states its
encrypted.
So I am curious to know how its done ? I ran the sql statement in Query
Analyzer and then in profiler it shows something like ..
-- the text has been encrypted for security reason.
I found that magical.
Can someone tell me how its done ?
I think that having sp_password anywhere in the text (possibly in a comment) will do this. But this
trick doesn't work for 2005...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Hassan" <hassan@.hotmail.com> wrote in message news:OdWpleMzHHA.5484@.TK2MSFTNGP03.phx.gbl...
>I have seen when i run a select statement written by some devs which has some joins,etc.. , that
>when i run it in profiler it hides the SQL statement and instead shows in the textdata column text
>commented out that states its encrypted.
> So I am curious to know how its done ? I ran the sql statement in Query Analyzer and then in
> profiler it shows something like ..
> -- the text has been encrypted for security reason.
> I found that magical.
> Can someone tell me how its done ?
>
|||On Jul 23, 3:31 am, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:[vbcol=seagreen]
> I think that having sp_password anywhere in the text (possibly in a comment) will do this. But this
> trick doesn't work for 2005...
> --
> Tibor Karaszi, SQL Server MVPhttp://www.karaszi.com/sqlserver/default.asphttp://sqlblog.com/blogs/tibor_karaszi
> "Hassan" <has...@.hotmail.com> wrote in messagenews:OdWpleMzHHA.5484@.TK2MSFTNGP03.phx.gbl. ..
>
>
well anything that has --sp_addlogin does the same thing and it
*does* works in 2005

How to encrypt sql statements from showing in profiler

I have seen when i run a select statement written by some devs which has
some joins,etc.. , that when i run it in profiler it hides the SQL statement
and instead shows in the textdata column text commented out that states its
encrypted.
So I am curious to know how its done ? I ran the sql statement in Query
Analyzer and then in profiler it shows something like ..
-- the text has been encrypted for security reason.
I found that magical.
Can someone tell me how its done ?I think that having sp_password anywhere in the text (possibly in a comment) will do this. But this
trick doesn't work for 2005...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Hassan" <hassan@.hotmail.com> wrote in message news:OdWpleMzHHA.5484@.TK2MSFTNGP03.phx.gbl...
>I have seen when i run a select statement written by some devs which has some joins,etc.. , that
>when i run it in profiler it hides the SQL statement and instead shows in the textdata column text
>commented out that states its encrypted.
> So I am curious to know how its done ? I ran the sql statement in Query Analyzer and then in
> profiler it shows something like ..
> -- the text has been encrypted for security reason.
> I found that magical.
> Can someone tell me how its done ?
>|||On Jul 23, 3:31 am, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:
> I think that having sp_password anywhere in the text (possibly in a comment) will do this. But this
> trick doesn't work for 2005...
> --
> Tibor Karaszi, SQL Server MVPhttp://www.karaszi.com/sqlserver/default.asphttp://sqlblog.com/blogs/tibor_karaszi
> "Hassan" <has...@.hotmail.com> wrote in messagenews:OdWpleMzHHA.5484@.TK2MSFTNGP03.phx.gbl...
> >I have seen when i run a select statement written by some devs which has some joins,etc.. , that
> >when i run it in profiler it hides the SQL statement and instead shows in the textdata column text
> >commented out that states its encrypted.
> > So I am curious to know how its done ? I ran the sql statement in Query Analyzer and then in
> > profiler it shows something like ..
> > -- the text has been encrypted for security reason.
> > I found that magical.
> > Can someone tell me how its done ?
well anything that has --sp_addlogin does the same thing and it
*does* works in 2005sql

How to encrypt sql statements from showing in profiler

I have seen when i run a select statement written by some devs which has
some joins,etc.. , that when i run it in profiler it hides the SQL statement
and instead shows in the textdata column text commented out that states its
encrypted.
So I am curious to know how its done ? I ran the sql statement in Query
Analyzer and then in profiler it shows something like ..
-- the text has been encrypted for security reason.
I found that magical.
Can someone tell me how its done ?I think that having sp_password anywhere in the text (possibly in a comment)
will do this. But this
trick doesn't work for 2005...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Hassan" <hassan@.hotmail.com> wrote in message news:OdWpleMzHHA.5484@.TK2MSFTNGP03.phx.gbl...

>I have seen when i run a select statement written by some devs which has so
me joins,etc.. , that
>when i run it in profiler it hides the SQL statement and instead shows in t
he textdata column text
>commented out that states its encrypted.
> So I am curious to know how its done ? I ran the sql statement in Query An
alyzer and then in
> profiler it shows something like ..
> -- the text has been encrypted for security reason.
> I found that magical.
> Can someone tell me how its done ?
>|||On Jul 23, 3:31 am, "Tibor Karaszi"
<tibor_please.no.email_kara...@.hotmail.nomail.com> wrote:[vbcol=seagreen]
> I think that having sp_password anywhere in the text (possibly in a commen
t) will do this. But this
> trick doesn't work for 2005...
> --
> Tibor Karaszi, SQL Server MVPhttp://www.karaszi.com/sqlserver/default.asph
ttp://sqlblog.com/blogs/tibor_karaszi
> "Hassan" <has...@.hotmail.com> wrote in messagenews:OdWpleMzHHA.5484@.TK2MSF
TNGP03.phx.gbl...
>
>
>
>
well anything that has --sp_addlogin does the same thing and it
*does* works in 2005

Monday, March 19, 2012

How to dynamically change width?

Folks,

We have some reports that have optional columns. We have them working very nicely, with the column showing or hiding based on values in the report -- works great.

Except -- when the columns are present, the report spans onto two pages, when exported to PDF, in width. That's understandable, as there's a lot of extra data, and exactly what we want. However, when the columns are not present, we get empty pages instead, because the report doesn't automatically contract back onto the size that fits on one page.

Changing the report to a Matrix won't work, as the hidden columns on some of these come as sets of three, where each column in the three has different formatting (different widths, format codes, etc).

Thanks!

--randy

We have the same problem, columns thats hidden or not based och which parameters user used when the report is rendered. Everything is fine exept for when printing it... then the report is as wide as in design mode even if the columns is not visible, ending up with lots of blank pages. Is there anyway I can set width during runtime? It would be nice to be able to set the width to the sum of all shown column widths.

This is|||I'm also experiencing the same problem. The width of the column does not automatically adjust depending on the content of the report. Anyone who know's how to fix this? thanks.|||i have the same problem,somebody helps,and i also have a question how to dynamically set item'position.re|||

I too spend half a day trying to come up with a solution and found that no matter what is hidden, if the size of the table, list, matrix was outside the page width boudaries in design/layout mode the printed report would cross over.

I eventually came up with having two or more replica tables in the report that showed the different width columns in each table. For example, table one had financial information and based on a toggle the visbility would switch to table two that had the contact information, or the same information bar on eor two columns were different. The effect to the user is that a toggle can switch the between columns or column size without the boudaries being exceeded.

Rgds

Darrenh

|||I am having the same problem. Looks like MS should address this one.|||

Hi,

i have not faced such prob so far. but wat i feel is to make the width of all the columns to "0" and set the "Can Grow" property of the columns to "True" so that the columns expands horizontally based on the content it holds.

plz let me know if works fine.

Thanks.

|||I have experienced same problem also. Hope Microsoft addresses this.|||

But the CanGrow property does'nt seenm to have any effect.

I have dynamically changed the column widths in code according to a particular scenario.

|||

hi vaidyak,

"can grow" property should be set to true for all the textboxes of the row.

|||"CanGrow" doesn't seem to have any visible effect in this instance, even with all other textboxes in the row set to "CanGrow".

How to dynamically change width?

Folks,

We have some reports that have optional columns. We have them working very nicely, with the column showing or hiding based on values in the report -- works great.

Except -- when the columns are present, the report spans onto two pages, when exported to PDF, in width. That's understandable, as there's a lot of extra data, and exactly what we want. However, when the columns are not present, we get empty pages instead, because the report doesn't automatically contract back onto the size that fits on one page.

Changing the report to a Matrix won't work, as the hidden columns on some of these come as sets of three, where each column in the three has different formatting (different widths, format codes, etc).

Thanks!

--randy

We have the same problem, columns thats hidden or not based och which parameters user used when the report is rendered. Everything is fine exept for when printing it... then the report is as wide as in design mode even if the columns is not visible, ending up with lots of blank pages. Is there anyway I can set width during runtime? It would be nice to be able to set the width to the sum of all shown column widths.

This is|||I'm also experiencing the same problem. The width of the column does not automatically adjust depending on the content of the report. Anyone who know's how to fix this? thanks.|||i have the same problem,somebody helps,and i also have a question how to dynamically set item'position.re|||

I too spend half a day trying to come up with a solution and found that no matter what is hidden, if the size of the table, list, matrix was outside the page width boudaries in design/layout mode the printed report would cross over.

I eventually came up with having two or more replica tables in the report that showed the different width columns in each table. For example, table one had financial information and based on a toggle the visbility would switch to table two that had the contact information, or the same information bar on eor two columns were different. The effect to the user is that a toggle can switch the between columns or column size without the boudaries being exceeded.

Rgds

Darrenh

|||I am having the same problem. Looks like MS should address this one.|||

Hi,

i have not faced such prob so far. but wat i feel is to make the width of all the columns to "0" and set the "Can Grow" property of the columns to "True" so that the columns expands horizontally based on the content it holds.

plz let me know if works fine.

Thanks.

|||I have experienced same problem also. Hope Microsoft addresses this.|||

But the CanGrow property does'nt seenm to have any effect.

I have dynamically changed the column widths in code according to a particular scenario.

|||

hi vaidyak,

"can grow" property should be set to true for all the textboxes of the row.

|||"CanGrow" doesn't seem to have any visible effect in this instance, even with all other textboxes in the row set to "CanGrow".

How to dynamically change width?

Folks,

We have some reports that have optional columns. We have them working very nicely, with the column showing or hiding based on values in the report -- works great.

Except -- when the columns are present, the report spans onto two pages, when exported to PDF, in width. That's understandable, as there's a lot of extra data, and exactly what we want. However, when the columns are not present, we get empty pages instead, because the report doesn't automatically contract back onto the size that fits on one page.

Changing the report to a Matrix won't work, as the hidden columns on some of these come as sets of three, where each column in the three has different formatting (different widths, format codes, etc).

Thanks!

--randy

We have the same problem, columns thats hidden or not based och which parameters user used when the report is rendered. Everything is fine exept for when printing it... then the report is as wide as in design mode even if the columns is not visible, ending up with lots of blank pages. Is there anyway I can set width during runtime? It would be nice to be able to set the width to the sum of all shown column widths.

This is|||I'm also experiencing the same problem. The width of the column does not automatically adjust depending on the content of the report. Anyone who know's how to fix this? thanks.|||i have the same problem,somebody helps,and i also have a question how to dynamically set item'position.re|||

I too spend half a day trying to come up with a solution and found that no matter what is hidden, if the size of the table, list, matrix was outside the page width boudaries in design/layout mode the printed report would cross over.

I eventually came up with having two or more replica tables in the report that showed the different width columns in each table. For example, table one had financial information and based on a toggle the visbility would switch to table two that had the contact information, or the same information bar on eor two columns were different. The effect to the user is that a toggle can switch the between columns or column size without the boudaries being exceeded.

Rgds

Darrenh

|||I am having the same problem. Looks like MS should address this one.|||

Hi,

i have not faced such prob so far. but wat i feel is to make the width of all the columns to "0" and set the "Can Grow" property of the columns to "True" so that the columns expands horizontally based on the content it holds.

plz let me know if works fine.

Thanks.

|||I have experienced same problem also. Hope Microsoft addresses this.|||

But the CanGrow property does'nt seenm to have any effect.

I have dynamically changed the column widths in code according to a particular scenario.

|||

hi vaidyak,

"can grow" property should be set to true for all the textboxes of the row.

|||"CanGrow" doesn't seem to have any visible effect in this instance, even with all other textboxes in the row set to "CanGrow".

How to dynamically change width?

Folks,

We have some reports that have optional columns. We have them working very nicely, with the column showing or hiding based on values in the report -- works great.

Except -- when the columns are present, the report spans onto two pages, when exported to PDF, in width. That's understandable, as there's a lot of extra data, and exactly what we want. However, when the columns are not present, we get empty pages instead, because the report doesn't automatically contract back onto the size that fits on one page.

Changing the report to a Matrix won't work, as the hidden columns on some of these come as sets of three, where each column in the three has different formatting (different widths, format codes, etc).

Thanks!

--randy

We have the same problem, columns thats hidden or not based och which parameters user used when the report is rendered. Everything is fine exept for when printing it... then the report is as wide as in design mode even if the columns is not visible, ending up with lots of blank pages. Is there anyway I can set width during runtime? It would be nice to be able to set the width to the sum of all shown column widths.

This is|||I'm also experiencing the same problem. The width of the column does not automatically adjust depending on the content of the report. Anyone who know's how to fix this? thanks.|||i have the same problem,somebody helps,and i also have a question how to dynamically set item'position.re|||

I too spend half a day trying to come up with a solution and found that no matter what is hidden, if the size of the table, list, matrix was outside the page width boudaries in design/layout mode the printed report would cross over.

I eventually came up with having two or more replica tables in the report that showed the different width columns in each table. For example, table one had financial information and based on a toggle the visbility would switch to table two that had the contact information, or the same information bar on eor two columns were different. The effect to the user is that a toggle can switch the between columns or column size without the boudaries being exceeded.

Rgds

Darrenh

|||I am having the same problem. Looks like MS should address this one.|||

Hi,

i have not faced such prob so far. but wat i feel is to make the width of all the columns to "0" and set the "Can Grow" property of the columns to "True" so that the columns expands horizontally based on the content it holds.

plz let me know if works fine.

Thanks.

|||I have experienced same problem also. Hope Microsoft addresses this.|||

But the CanGrow property does'nt seenm to have any effect.

I have dynamically changed the column widths in code according to a particular scenario.

|||

hi vaidyak,

"can grow" property should be set to true for all the textboxes of the row.

|||"CanGrow" doesn't seem to have any visible effect in this instance, even with all other textboxes in the row set to "CanGrow".