Showing posts with label expression. Show all posts
Showing posts with label expression. Show all posts

Monday, March 19, 2012

Add txt file in report

I want to know with expression that how to add a txt file in report design so
when report is viewed text of txt file can also be viewed in Browser.
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-reporting/200704/1On Apr 12, 12:53 am, "asharma via SQLMonster.com" <u8315@.uwe> wrote:
> I want to know with expression that how to add a txt file in report design so
> when report is viewed text of txt file can also be viewed in Browser.
> --
> Message posted via SQLMonster.comhttp://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-reporting/200704/1
As far as I know, there is not a way to do this directly; however, you
could try converting the text file to an HTML page and using the Jump
to URL property of a control to point to the HTML file on the Web
Server. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant

Sunday, March 11, 2012

Add spaces to a string value in a cell

Hi,

I am trying to add spaces to a string value in a cell but when I run the report the value is trimmed.
Any ideas?
Here is the expression I am using:
=Fields!strVal.Value & " "

Thanks,
Igor

Igor,

Try using a calculated field on your dataset, In the expression, use =" number of spaces wanted" save field name like Space5. You can then use this field in your expressions.

Ham

|||I tried and it still comes out trimmed.|||

Igor,

Can you wrap a LEN around your expression? I used this to verify that the spaces where actually there. If the spaces are there then you made have some other issue.

Ham

|||the Len function returns the correct number of characters (including the empty spaces) but the spaces just don't show up.|||

Igor,

What type of formatting are you trying to accomplish? Are you trying to align text, columns?

Ham

|||I am trying to move some of the values a little to the left but still keeping them right-justified.|||
Igor,
You can try a couple of different things (what you have should work, but if not I can only suggest these)....

=Cstr(Fields!strVal.Value) & Space(5)
or
=Cstr(Fields!strVal.Value) + Space(5)

In Data you could try Cast or Convert on the field to force it to a certain number of characters as well.|||

Igor,

Why not use your "Left-Alignment" properties on your textbox?

Ham

|||

Hello Igor,

Can you try something like this in your field's expression:

=Fields!FIELD1.Value & StrDup(5, " ")

Hope this helps.

Jarret

Thursday, February 16, 2012

Add AM or PM to date in text box

How do i add eith AM or PM at the end of the date in the expression of a
textbox
this is what i currently have
format(Globals!ExecutionTime, "dd/MM/yy hh:mm")
but i want it to output 02/08/06 5:02 PM
thanks in advanceTango wrote:
> How do i add eith AM or PM at the end of the date in the expression of a
> textbox
> this is what i currently have
> format(Globals!ExecutionTime, "dd/MM/yy hh:mm")
> but i want it to output 02/08/06 5:02 PM
> thanks in advance
Remove the Format and just give Globals!ExecutionTime.it will do what
you want
Regards
Raj Deep.A|||Thanks
but the date is round the wrong way, its outputting 02/08/06 5:02 PM (ie
MM/dd/yy)
"RajDeep" wrote:
> Tango wrote:
> > How do i add eith AM or PM at the end of the date in the expression of a
> > textbox
> >
> > this is what i currently have
> >
> > format(Globals!ExecutionTime, "dd/MM/yy hh:mm")
> >
> > but i want it to output 02/08/06 5:02 PM
> >
> > thanks in advance
> Remove the Format and just give Globals!ExecutionTime.it will do what
> you want
> Regards
> Raj Deep.A
>|||Oh Sorry,
You can achieve that by format(Globals!ExecutionTime, "dd/MM/yy
hh:mm:ss tt")
regards
Raj Deep.A
Tango wrote:
> Thanks
> but the date is round the wrong way, its outputting 02/08/06 5:02 PM (ie
> MM/dd/yy)
> "RajDeep" wrote:
> >
> > Tango wrote:
> > > How do i add eith AM or PM at the end of the date in the expression of a
> > > textbox
> > >
> > > this is what i currently have
> > >
> > > format(Globals!ExecutionTime, "dd/MM/yy hh:mm")
> > >
> > > but i want it to output 02/08/06 5:02 PM
> > >
> > > thanks in advance
> >
> > Remove the Format and just give Globals!ExecutionTime.it will do what
> > you want
> >
> > Regards
> > Raj Deep.A
> >
> >|||Thanks heaps Raj.
"RajDeep" wrote:
> Oh Sorry,
> You can achieve that by format(Globals!ExecutionTime, "dd/MM/yy
> hh:mm:ss tt")
> regards
> Raj Deep.A
> Tango wrote:
> > Thanks
> >
> > but the date is round the wrong way, its outputting 02/08/06 5:02 PM (ie
> > MM/dd/yy)
> >
> > "RajDeep" wrote:
> >
> > >
> > > Tango wrote:
> > > > How do i add eith AM or PM at the end of the date in the expression of a
> > > > textbox
> > > >
> > > > this is what i currently have
> > > >
> > > > format(Globals!ExecutionTime, "dd/MM/yy hh:mm")
> > > >
> > > > but i want it to output 02/08/06 5:02 PM
> > > >
> > > > thanks in advance
> > >
> > > Remove the Format and just give Globals!ExecutionTime.it will do what
> > > you want
> > >
> > > Regards
> > > Raj Deep.A
> > >
> > >
>