Showing posts with label displaying. Show all posts
Showing posts with label displaying. Show all posts

Wednesday, March 21, 2012

Formatting in a report viewer

Hi,

I have a dataset and am able to display the result in a table in a report viewer (VS 2005) but my problem is, instead of displaying the records in a row, I want to display the result columnwise.

Can I do this?

Another Question:

I have a textbox in which in I am displaying some text but the text is long and want the text to be both right and left aligned(Justify). How can I do this?

Please help me.

HI

1) For display in the columnwise u can change in the database itself using procedure.

2) For display in the right side u just apply Styles

|||

You may be able to change your SQL to return your results as you want to display them in a table. But without knowing your data, it's hard to say whether that would work. Depending on your data, you may want to use a Matrix instead of a table.

You can use Center to justify your text right and left, but the textbox still needs to be large enough to display the largest amount of text your passing to it. If you have the CanGrow property set to True, the textbox will grow (height-wise) and wrap the text to new row(s) as needed.

|||

You may left, right, or center justify text in RS 2005. Full justification is not supported in the text box.

|||

you can use a matrix report and tie the same to a dataset or variables from your stored procedure. this is sort of pivot table like in excel.

|||

Hi,

Thank you all for your time but still have some problem.

I can't change the procedure since the same procedure is being used by 3 different report.

My report should look like this:(I have 5 players(Fixed) in each race but the number of laps may differ for different race. Result to be displayed for one race at a time)

Player_Name_1 Lap1_Time Lap2_Time Lap3_Time ......

I don't have any idea about matrix report. Please tell me the steps to follow or give me some available resource to refer.

I was looking for full justification. thanks for the information that it is not supported in text box.

|||

Hi,

From your description, it seems that you are unable to modify the stored procedure since it has been on live, right?

If so, I suggest that you can retrieve the return from the procedure and save it in a data container such as a dataset. And then re-modify the table structure and save it into another datatable, so in this way, you can regard the datatable as the new datasource to be bind to your report. Another way is that you can create a new procedure which return the new structure of the data table if you want.

For your second question, you can create a new Business Intelligence Projects and choose a Report Server Project Wizard template, and in this way you can select a Matrix table instead of a tabular one.

Thanks.

Friday, March 9, 2012

Formating Dates

In my chart report, my x-axis date is displaying as 9/1/05, 10/1/05, etc. I
would like to display the date as 9/05, 10/05, etc, is it possible?
Thanks,
JimmyTry the value in the format tab if the list provides the format select it .
otherwise try giving dd/mm in the text box of the format tab.
Amarnath
"jcl_tw" wrote:
> In my chart report, my x-axis date is displaying as 9/1/05, 10/1/05, etc. I
> would like to display the date as 9/05, 10/05, etc, is it possible?
> Thanks,
> Jimmy|||Amarnath,
Tried using "mm/yy" in the Format Code field. The date shows up as 00/05
for all the months.
Jimmy
"Amarnath" wrote:
> Try the value in the format tab if the list provides the format select it .
> otherwise try giving dd/mm in the text box of the format tab.
> Amarnath
> "jcl_tw" wrote:
> > In my chart report, my x-axis date is displaying as 9/1/05, 10/1/05, etc. I
> > would like to display the date as 9/05, 10/05, etc, is it possible?
> >
> > Thanks,
> > Jimmy|||Try using instr function to seperate the mm/yy ofcourse use date to string
convertion.
Amarnath
"jcl_tw" wrote:
> Amarnath,
> Tried using "mm/yy" in the Format Code field. The date shows up as 00/05
> for all the months.
> Jimmy
> "Amarnath" wrote:
> > Try the value in the format tab if the list provides the format select it .
> > otherwise try giving dd/mm in the text box of the format tab.
> >
> > Amarnath
> >
> > "jcl_tw" wrote:
> >
> > > In my chart report, my x-axis date is displaying as 9/1/05, 10/1/05, etc. I
> > > would like to display the date as 9/05, 10/05, etc, is it possible?
> > >
> > > Thanks,
> > > Jimmy|||Jimmy,
Why dont you try this
=Format(DatePart("D",Fields!Date.Value),"#0") & "\" &
Format(Datepart("M",Fields!Date.Value),"#0")
jcl_tw wrote:
> Amarnath,
> Tried using "mm/yy" in the Format Code field. The date shows up as 00/05
> for all the months.
> Jimmy
> "Amarnath" wrote:
> > Try the value in the format tab if the list provides the format select it .
> > otherwise try giving dd/mm in the text box of the format tab.
> >
> > Amarnath
> >
> > "jcl_tw" wrote:
> >
> > > In my chart report, my x-axis date is displaying as 9/1/05, 10/1/05, etc. I
> > > would like to display the date as 9/05, 10/05, etc, is it possible?
> > >
> > > Thanks,
> > > Jimmy|||RajDeep,
Try your solution but unfortunately, the "Format Code" field under "Show
Labels" in the chart doesn't allows that many characters.
Jimmy
"RajDeep" wrote:
> Jimmy,
> Why dont you try this
> =Format(DatePart("D",Fields!Date.Value),"#0") & "\" &
> Format(Datepart("M",Fields!Date.Value),"#0")
> jcl_tw wrote:
> > Amarnath,
> >
> > Tried using "mm/yy" in the Format Code field. The date shows up as 00/05
> > for all the months.
> >
> > Jimmy
> >
> > "Amarnath" wrote:
> >
> > > Try the value in the format tab if the list provides the format select it .
> > > otherwise try giving dd/mm in the text box of the format tab.
> > >
> > > Amarnath
> > >
> > > "jcl_tw" wrote:
> > >
> > > > In my chart report, my x-axis date is displaying as 9/1/05, 10/1/05, etc. I
> > > > would like to display the date as 9/05, 10/05, etc, is it possible?
> > > >
> > > > Thanks,
> > > > Jimmy
>|||use MM/yy
mm refers to minutes, MM to month.
jcl_tw wrote:
> RajDeep,
> Try your solution but unfortunately, the "Format Code" field under "Show
> Labels" in the chart doesn't allows that many characters.
> Jimmy
> "RajDeep" wrote:
> > Jimmy,
> >
> > Why dont you try this
> >
> > =Format(DatePart("D",Fields!Date.Value),"#0") & "\" &
> > Format(Datepart("M",Fields!Date.Value),"#0")
> >
> > jcl_tw wrote:
> > > Amarnath,
> > >
> > > Tried using "mm/yy" in the Format Code field. The date shows up as 00/05
> > > for all the months.
> > >
> > > Jimmy
> > >
> > > "Amarnath" wrote:
> > >
> > > > Try the value in the format tab if the list provides the format select it .
> > > > otherwise try giving dd/mm in the text box of the format tab.
> > > >
> > > > Amarnath
> > > >
> > > > "jcl_tw" wrote:
> > > >
> > > > > In my chart report, my x-axis date is displaying as 9/1/05, 10/1/05, etc. I
> > > > > would like to display the date as 9/05, 10/05, etc, is it possible?
> > > > >
> > > > > Thanks,
> > > > > Jimmy
> >
> >|||Jen,
It works!
Thanks,
Jimmy
"Jen" wrote:
> use MM/yy
> mm refers to minutes, MM to month.
> jcl_tw wrote:
> > RajDeep,
> >
> > Try your solution but unfortunately, the "Format Code" field under "Show
> > Labels" in the chart doesn't allows that many characters.
> >
> > Jimmy
> >
> > "RajDeep" wrote:
> >
> > > Jimmy,
> > >
> > > Why dont you try this
> > >
> > > =Format(DatePart("D",Fields!Date.Value),"#0") & "\" &
> > > Format(Datepart("M",Fields!Date.Value),"#0")
> > >
> > > jcl_tw wrote:
> > > > Amarnath,
> > > >
> > > > Tried using "mm/yy" in the Format Code field. The date shows up as 00/05
> > > > for all the months.
> > > >
> > > > Jimmy
> > > >
> > > > "Amarnath" wrote:
> > > >
> > > > > Try the value in the format tab if the list provides the format select it .
> > > > > otherwise try giving dd/mm in the text box of the format tab.
> > > > >
> > > > > Amarnath
> > > > >
> > > > > "jcl_tw" wrote:
> > > > >
> > > > > > In my chart report, my x-axis date is displaying as 9/1/05, 10/1/05, etc. I
> > > > > > would like to display the date as 9/05, 10/05, etc, is it possible?
> > > > > >
> > > > > > Thanks,
> > > > > > Jimmy
> > >
> > >
>|||you dont need to mention anything in the format code,for value you will
have Fields!Date.Value and under that if you can see some thing like
label,write the expression posted there.
even though you got the solution ,it will be useful when it is
important
Regards
Raj Deep.A
jcl_tw wrote:
> RajDeep,
> Try your solution but unfortunately, the "Format Code" field under "Show
> Labels" in the chart doesn't allows that many characters.
> Jimmy
> "RajDeep" wrote:
> > Jimmy,
> >
> > Why dont you try this
> >
> > =Format(DatePart("D",Fields!Date.Value),"#0") & "\" &
> > Format(Datepart("M",Fields!Date.Value),"#0")
> >
> > jcl_tw wrote:
> > > Amarnath,
> > >
> > > Tried using "mm/yy" in the Format Code field. The date shows up as 00/05
> > > for all the months.
> > >
> > > Jimmy
> > >
> > > "Amarnath" wrote:
> > >
> > > > Try the value in the format tab if the list provides the format select it .
> > > > otherwise try giving dd/mm in the text box of the format tab.
> > > >
> > > > Amarnath
> > > >
> > > > "jcl_tw" wrote:
> > > >
> > > > > In my chart report, my x-axis date is displaying as 9/1/05, 10/1/05, etc. I
> > > > > would like to display the date as 9/05, 10/05, etc, is it possible?
> > > > >
> > > > > Thanks,
> > > > > Jimmy
> >
> >

Wednesday, March 7, 2012

Format on text box not working as expected

I have a table in a report that is displaying some call duration data. I
have a field that averages the results and displays them. My issue is the
result is often a number with many decimal places (example 15.888883) and I
would like the field to display a whole number (example 15).
In report designer I right click on the cell in the table I wish to alter
and choose properties. In the Textbox Properties window under Format I
select Number and then 1234 (custom code D0) and click OK. I then preview
the report and the number still shows a bunch of decimal places.
When I go back to check the properties of the cell the Format is often reset
back to 'Default' as if it didn't save my select. I've tried using the
Standard and Custom radio buttons under Format but nothing I do seems to
change the display of the number to a nondecimal type. I'm sure I can run a
function that rounds the number but I'd much rather do it in the display as
it seems you should be able to do.
Any help would be appreciated!
Peace,
DanDan,
I'm not aware of this as a bug but if it is try setting it in the
properties window (not the same as right-click|properties) if you can't
see it, press F4. You will see a 'Format' property, set that to d0 or
alternatively try n0 (puts a comma in as a thousands seperator).
Chris
Dan Christjohn wrote:
> I have a table in a report that is displaying some call duration
> data. I have a field that averages the results and displays them. My
> issue is the result is often a number with many decimal places
> (example 15.888883) and I would like the field to display a whole
> number (example 15).
> In report designer I right click on the cell in the table I wish to
> alter and choose properties. In the Textbox Properties window under
> Format I select Number and then 1234 (custom code D0) and click OK. I
> then preview the report and the number still shows a bunch of decimal
> places.
> When I go back to check the properties of the cell the Format is
> often reset back to 'Default' as if it didn't save my select. I've
> tried using the Standard and Custom radio buttons under Format but
> nothing I do seems to change the display of the number to a
> nondecimal type. I'm sure I can run a function that rounds the number
> but I'd much rather do it in the display as it seems you should be
> able to do.
> Any help would be appreciated!
> Peace,
> Dan|||Chris,
Thank you for your reply. d0 did not work and that was a value for format
that I had already tried. n0 however worked great and change the display
from 8.333333336 to 8 exactly the way I want it. Weird how that's not one of
the choices when you rightclick/format and it shows the standard formatting.
Oh well it works, thanks much!
Peace,
Dan
"Chris McGuigan" <chris.mcguigan@.zycko.com> wrote in message
news:ez03hkRiFHA.1204@.TK2MSFTNGP12.phx.gbl...
> Dan,
> I'm not aware of this as a bug but if it is try setting it in the
> properties window (not the same as right-click|properties) if you can't
> see it, press F4. You will see a 'Format' property, set that to d0 or
> alternatively try n0 (puts a comma in as a thousands seperator).
> Chris
>
> Dan Christjohn wrote:
>> I have a table in a report that is displaying some call duration
>> data. I have a field that averages the results and displays them. My
>> issue is the result is often a number with many decimal places
>> (example 15.888883) and I would like the field to display a whole
>> number (example 15).
>> In report designer I right click on the cell in the table I wish to
>> alter and choose properties. In the Textbox Properties window under
>> Format I select Number and then 1234 (custom code D0) and click OK. I
>> then preview the report and the number still shows a bunch of decimal
>> places.
>> When I go back to check the properties of the cell the Format is
>> often reset back to 'Default' as if it didn't save my select. I've
>> tried using the Standard and Custom radio buttons under Format but
>> nothing I do seems to change the display of the number to a
>> nondecimal type. I'm sure I can run a function that rounds the number
>> but I'd much rather do it in the display as it seems you should be
>> able to do.
>> Any help would be appreciated!
>> Peace,
>> Dan
>|||Hi,
I just had the exact same problem. Choosing D0 does not work, but N0
does. This behaviour is weird and should be fixed because N0 puts a
comma in there.
e.g.
source = 2793.333333
D0 = 2793.333333
N0 = 2,793
When what I really want is 2793!! I think this is a bug. Internally,
the casting from float (with decimal) places is not being converted to
integeter properly.|||I think n with no zero will remove the comma but I'd have to test it to be
sure.
"Roy Assaly" <royassaly@.gmail.com> wrote in message
news:1121885650.591601.179260@.g43g2000cwa.googlegroups.com...
> Hi,
> I just had the exact same problem. Choosing D0 does not work, but N0
> does. This behaviour is weird and should be fixed because N0 puts a
> comma in there.
> e.g.
> source = 2793.333333
> D0 = 2793.333333
> N0 = 2,793
> When what I really want is 2793!! I think this is a bug. Internally,
> the casting from float (with decimal) places is not being converted to
> integeter properly.
>|||Hi Dan,
Just tested it:
source = 2793.333333
n = 2793.33
N = 2793.33
No difference. I still believe that D0 is the problem and that it's a
bug.|||'n' on it's own will always default to 2 decimal places.
I think the 'D' issue is because d or D is also a date format code it
may be getting confused!?!
You may want to consider custom format codes.
#0 or ## will give you 2793 with no commas. Using this you can specify
different formatting for positive, negative and zero numbers.
i.e. a format code of #,#;(#,#);"zero" would produce
2793 = 2,793
-2793 = (2,793)
0 = zero
Look up custom format codes in msdn vb help.
Chris
Roy Assaly wrote:
> Hi Dan,
> Just tested it:
> source = 2793.333333
> n = 2793.33
> N = 2793.33
> No difference. I still believe that D0 is the problem and that it's a
> bug.

Format of date parameters

It seems quite easy to format date parameters any way we like when displaying
a report, but how do we set the date format to use when entering that date -
as an input parameter. Everything works fine with if we accept the default
US style (MM/dd/yyyy) but we need to use dd/MM/yyyy.
Can we force the system to use this format or do we have to manipulate a
string parameter and live with it?It would be nice if there were a calendar drop down when a datetime parameter
is specified.
"Stuart" wrote:
> It seems quite easy to format date parameters any way we like when displaying
> a report, but how do we set the date format to use when entering that date -
> as an input parameter. Everything works fine with if we accept the default
> US style (MM/dd/yyyy) but we need to use dd/MM/yyyy.
> Can we force the system to use this format or do we have to manipulate a
> string parameter and live with it?
>

Friday, February 24, 2012

Format date with leading zeros

Right now we're displaying dates like this: 2/6/2006
We'd like to display them like this: 02/06/2006
Currently we have two types of dates we're dealing with. In the first
case
we have a datetime and we're doing this:
=FormatDateTime(Code.GetStartDate(),vbShortDate)
in the second we just have a date, and we set the format code to 'd'
by selecting one of three date formats that are offered when we hit the
... button
on the Format tab.
Anyway, in each case we want the leading zeros.
TIA,
JimLet me refine that.
I've solved this to a point by using mm/dd/yyyy in the format. But
it's entirely possible
that this will be used where we would want dd/mm/yyyy.
So I would want a format that will adapt to regional settings, but will
also show leading zeros.
But only if it's simple ;)|||Hi,
If I have understood your problem correctly, the "d" format code will do
this, according to the language property of the report.
E.g. if the date '8 Jan 2006 23:15:58' would display as '08/01/2006' if
format was set to "d" and Language to 'English(United Kingdom).
If Language was set to 'English(United States), it would display as
'01/08/2006'.
If Language was set to '=User.Language', it would display in whatever format
was set on the client machine.
I hope this helps.
Ed Allison
<jhcorey@.yahoo.com> wrote in message
news:1140125197.767867.274710@.g43g2000cwa.googlegroups.com...
> Let me refine that.
> I've solved this to a point by using mm/dd/yyyy in the format. But
> it's entirely possible
> that this will be used where we would want dd/mm/yyyy.
> So I would want a format that will adapt to regional settings, but will
> also show leading zeros.
> But only if it's simple ;)
>|||I probably should have added that that is what we were using
originally, and while it no doubt handles the different regional
formats, it would not display the leading zeros.|||Really? It does for me. Sorry not to have been of more help.
<jhcorey@.yahoo.com> wrote in message
news:1140194093.511041.100970@.z14g2000cwz.googlegroups.com...
>I probably should have added that that is what we were using
> originally, and while it no doubt handles the different regional
> formats, it would not display the leading zeros.
>|||Hmm...
This made me think that it has to do with the regional settings on my
machine.
So I went in there and changed the short date format to mm/dd/yyyy.
But that didn't do it. I'm running everything local (I think). But I
think I'm on a track.