Showing posts with label header. Show all posts
Showing posts with label header. Show all posts

Tuesday, March 20, 2012

Placing Sub Total Coulmn to the left of the coulumn in Matrix report

Hi,

If I am taking a Matrix and right clicking on the column header and click on the SubTotal then it always place that column on the right of it .If I want to place that column to the left of my original column then I can't do it.

Adding manual column and then puuting the Expresstion =Sum(Fields!MyCol.Value) is not halping as it will give me the same value that is there in the column instead of giving me the column

-Thanks,

Digs

Putting the same expression in the Row Group Header would give you some sort of a SubTotal to the left of your Data Column. However, this will obviously only give you only the sum and will not follow the same formatting & properties etc. as that in the Data Column.

HTH.

-Aayush

Monday, March 12, 2012

Placing data field on the report Header

I have the problem palcing the field from my Stored proc on the header.
Depending on the user name, I have to dynamically change the department name
that comes from the stored proc.
But, RS is not allowing me to put any expression (with fields) on header.
Any ideas how to do that ?I think the solution to this is to place the data into a field within the
body of the report, then set the hidden property to true. You can then set
the value of the Header textbox "=ReportItems!Fieldname.Value" This is
because you cannot reference datasets within the header or footer, they are
out of scope.
"Sujay" <Sujay@.discussions.microsoft.com> wrote in message
news:F18343A1-29A9-4BC8-B877-EB74B96495BB@.microsoft.com...
>I have the problem palcing the field from my Stored proc on the header.
> Depending on the user name, I have to dynamically change the department
> name
> that comes from the stored proc.
> But, RS is not allowing me to put any expression (with fields) on header.
> Any ideas how to do that ?|||Sujay,
I am actually doing this. I have a 2 stored procs (header and details).
These are separate datasets. In the table header you can put a dataset value
into it. For example, =First(Fields!Header1.Value, "HeaderDataSet")
HTH
"Sujay" wrote:
> I have the problem palcing the field from my Stored proc on the header.
> Depending on the user name, I have to dynamically change the department name
> that comes from the stored proc.
> But, RS is not allowing me to put any expression (with fields) on header.
> Any ideas how to do that ?|||Rich,
I did exactly as you said. But, since the Body of the field value is being
displayed on the first page only, even the header text box is visible only on
first page.
It displays blank on other pages.
If I place a field value at the bottom of Body section then, I see header
only on the last page.
So, even that doesn't seem to be working.
I haven't tried Neo's solution yet.
"Rich Millman" wrote:
> I think the solution to this is to place the data into a field within the
> body of the report, then set the hidden property to true. You can then set
> the value of the Header textbox "=ReportItems!Fieldname.Value" This is
> because you cannot reference datasets within the header or footer, they are
> out of scope.
> "Sujay" <Sujay@.discussions.microsoft.com> wrote in message
> news:F18343A1-29A9-4BC8-B877-EB74B96495BB@.microsoft.com...
> >I have the problem palcing the field from my Stored proc on the header.
> > Depending on the user name, I have to dynamically change the department
> > name
> > that comes from the stored proc.
> > But, RS is not allowing me to put any expression (with fields) on header.
> > Any ideas how to do that ?
>
>|||Neo,
It is not allowing me to use =First(Fields!Header1.Value, "HeaderDataSet")
as I cannot define any fields in Header section.
What I have done is :
*Created 2 datasets; Header and detail
*Placing a text box in Header section and value of text box is :
First(Fields!Header1.Value, "HeaderDataSet")
*Other dataset fields are witin the Body section placed in the report.
But, when I preview this report it says, cannot place dataset fields in
Header or Footer.
Let me know what am I doing wrong!!!
"Neo" wrote:
> Sujay,
> I am actually doing this. I have a 2 stored procs (header and details).
> These are separate datasets. In the table header you can put a dataset value
> into it. For example, =First(Fields!Header1.Value, "HeaderDataSet")
> HTH
> "Sujay" wrote:
> > I have the problem palcing the field from my Stored proc on the header.
> > Depending on the user name, I have to dynamically change the department name
> > that comes from the stored proc.
> > But, RS is not allowing me to put any expression (with fields) on header.
> > Any ideas how to do that ?

Placing a sum in a table header column

I have been requested to add the sum of an interger field to the table header. I have the sum in the footer (which is very easy to do), but I cannot get the sum to appear in the table header.

I then set-up the stored procedure to run the sum, and place it into a dummy field. I still cannot add this field to the table header. Instead of printing the data for the dummy field (the correct total), it instead prints the actual field name on the report.

Is there anyway to place a sum in a table header on a SQL Server Report?

Let me know.

Thank you,

T.J.

You should be able to just copy the code that you're using in the sum field in your table footer into a textbox in the table header.

Jarret

|||

Thank you very much. I got busy and didn't get time to get back to this yesterday.

I tested this today, and if I just drop the field into a blank header cell, the number displays correctly.

But when I place this field in with text (such as "# of Boxes" and then add in the summed field, it displays the text of the field name, rather than the value (the number).

Very strange. When mixed with text, it displays the field name rather than the actual value.

Is there anyway to work around this?

Thank you,

T.J.

|||

Can you post your expression you have in your textbox?

You should be able to use something like this:

="# of Boxes - " & count(Fields!boxes.Value)

Jarret

|||

Yes, and thank you...

"# of Boxes - " & Sum(Fields_CountBoxes.Value)

When I preview this, it displays exactly like my formula.

Where if I just drop Sum(Fields_CountBoxes.Value) into the column header, it gives just the summed number I want to display.

|||

You are missing the '='. Try putting this into your textbox:

="# of Boxes - " & Sum(Fields_CountBoxes.Value)

If you don't have the '=' at the front, it takes whatever you have in there as literal. The '=' makes it an expression.

Jarret

|||

Oh, what an over sight.

Thank you very much, that fixed my error!

|||

Glad I could help TJ. Can you mark this one as answered so others can see this solution?

Thanks.

Jarret