Showing posts with label section. Show all posts
Showing posts with label section. Show all posts

Wednesday, March 28, 2012

Report Parameter Date AND Time

SSRS2005.
In the Report Parameters dialog, I click Non-queried in the Default values
section, and use =Today(). I get today's date, which is exactly what I want.
But now I need to apply some formating, which generates an error:
=Format(Today(), "dd MMM yy hh:mm:ss")
How do I apply dd MMM yy hh:mm:ss formating to my Report Parameter without
any errors?
Thanks,
--
RandyTry going to properties of the text box and Format tab just give
dd-mm-yyyy-hh:mm:ss in the custom.
Amarnath
"randy1200" wrote:
> SSRS2005.
> In the Report Parameters dialog, I click Non-queried in the Default values
> section, and use =Today(). I get today's date, which is exactly what I want.
> But now I need to apply some formating, which generates an error:
> =Format(Today(), "dd MMM yy hh:mm:ss")
> How do I apply dd MMM yy hh:mm:ss formating to my Report Parameter without
> any errors?
> Thanks,
> --
> Randy|||The Today() property only gives you the date with time set to 00:00:00. You
should use the Now() property if you want time as well as date.
HTH,
Magendo_man
"randy1200" wrote:
> SSRS2005.
> In the Report Parameters dialog, I click Non-queried in the Default values
> section, and use =Today(). I get today's date, which is exactly what I want.
> But now I need to apply some formating, which generates an error:
> =Format(Today(), "dd MMM yy hh:mm:ss")
> How do I apply dd MMM yy hh:mm:ss formating to my Report Parameter without
> any errors?
> Thanks,
> --
> Randy|||Hello Randy,
Have you tried Amarnath's suggestion on use the "dd-MMM-yy hh:mm:ss" format
string instead to see whether it works. Based on my test, both the
followign formatting code work correctly:
=Format(Today(), "dd MMM yy hh:mm:ss")
=Format(Today(), "dd-MMM-yy hh:mm:ss")
Also, I suggest you consider the following options:
Currently you directly use the following expression for your report
parameter:
=Format(Today(), "dd MMM yy hh:mm:ss")
Then the paramter's type must be "string" , correct? Instead of directly
add the formatting operation in the parameter expression(and define the
parameter as string), you can define the report parameter as Datetime type
and use the following expression:
=Today()
this will return the DateTime object of today. And when you want to
display a formatted datetime string upon this paramter, you can use the
format function in the certain ReportItem's expression, e.g
=Parameters!Today_Param.Value
You can try this to see whethe it also works.
Hope this helps.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Monday, March 26, 2012

Report objects shift to right on very wide report - why?

Greetings,

I have a very wide report of more than 20 inches. I've placed several parameter values in the report header section so that the user can see what filters have been applied to the data. The testboxes shift their position several inches to the right when the report is run from the Report Manager.

Is there a way to make sure that a textbox is displayed at an absolute position? I thought maybe there would be a property on the report or body object that controls this but I don't see one.

Thanks for your help,

BCB

It may be because your left margin is high. Check how much left margin you have specified in Report (menu) -> Report Properties -> Layout (tab).

Shyam

|||Hi,

I've found similar (non-reproducible) behaviour sometimes, I've solved it putting all the "affected" items inside a rectangle control.

HTH

Jordi Rambla|||

Oh my, having the same problem and it drives me NUTS. Keeps kicking my textboxes to the right without any logical explanation I could think of. In layout tab, everything is fine. In preview tab, some textboxes that reside in Body, are shifted chaotically to the right, sometimes beyond the right border of the first page. When report is deployed and viewed, the position of the textboxes changes but they are still far on the right side. And finally in the printout, position may change once again and still not where I meant them to be. Nice WYSIWYG I should say.

My report is very simple, it contains a table and a matrix region. The textboxes in question hold the information about parameters and about printing time. The layout of the page is A4 landscape, with 15mm left margin and 10mm other margins. Does anybody have an idea what is going on? A bug? And by the way, enclosing textboxes into rectangle object doesn't work for me.

Denis

|||

Try increasing the Interactive Size or Report Size (properties found on the report object). In my case the browser seemed to want to treat the location of the text boxes I had in the page header as a percentage of page width rather than an obsolute location. The actual report was much wider than the property width (I forget which of the two properties I changed). When I increased page width the text boxes stopped shifting right or at least moved a very small amount that was tolerable. This all took place within the PageHeader section.

BCB

|||

Thank you very much for your reply.

I tried playing with "Interactive size" properties of the Report object, but that didn't change anything. BTW in my case, the interactive size values were wrong too, compared to the actual size of the reporting sections.

But then, I moved my textboxes from Body to the Page Header section, and that solved the problem. Now textboxes stay where they are in both Design, Preview and printed report.

Upon further investigation, the awful truth finally revealed itself. My report utilizes a matrix control to display variable amount of columns. It turns out that when matrix is expanding to the right at runtime, it will "push out" everything that is located on the right side of it in the design tab. Only controls located in the same section (usually Body) will be affected. What confuses me most, the vertical position of controls doesn't matter, as soon as .Left property of a control is greater than the right border of the matrix in the design tab, the control will be shifted to the right at runtime.

Since Report Designer does not support user-defined sections to split Body into individual parts, the only solution seems to be enclosing controls into Rectangle object to keep it on the left from the evil matrix control. Just as Jordi recommended.

Denis

Report objects shift to right on very wide report - why?

Greetings,

I have a very wide report of more than 20 inches. I've placed several parameter values in the report header section so that the user can see what filters have been applied to the data. The testboxes shift their position several inches to the right when the report is run from the Report Manager.

Is there a way to make sure that a textbox is displayed at an absolute position? I thought maybe there would be a property on the report or body object that controls this but I don't see one.

Thanks for your help,

BCB

It may be because your left margin is high. Check how much left margin you have specified in Report (menu) -> Report Properties -> Layout (tab).

Shyam

|||Hi,

I've found similar (non-reproducible) behaviour sometimes, I've solved it putting all the "affected" items inside a rectangle control.

HTH

Jordi Rambla|||

Oh my, having the same problem and it drives me NUTS. Keeps kicking my textboxes to the right without any logical explanation I could think of. In layout tab, everything is fine. In preview tab, some textboxes that reside in Body, are shifted chaotically to the right, sometimes beyond the right border of the first page. When report is deployed and viewed, the position of the textboxes changes but they are still far on the right side. And finally in the printout, position may change once again and still not where I meant them to be. Nice WYSIWYG I should say.

My report is very simple, it contains a table and a matrix region. The textboxes in question hold the information about parameters and about printing time. The layout of the page is A4 landscape, with 15mm left margin and 10mm other margins. Does anybody have an idea what is going on? A bug? And by the way, enclosing textboxes into rectangle object doesn't work for me.

Denis

|||

Try increasing the Interactive Size or Report Size (properties found on the report object). In my case the browser seemed to want to treat the location of the text boxes I had in the page header as a percentage of page width rather than an obsolute location. The actual report was much wider than the property width (I forget which of the two properties I changed). When I increased page width the text boxes stopped shifting right or at least moved a very small amount that was tolerable. This all took place within the PageHeader section.

BCB

|||

Thank you very much for your reply.

I tried playing with "Interactive size" properties of the Report object, but that didn't change anything. BTW in my case, the interactive size values were wrong too, compared to the actual size of the reporting sections.

But then, I moved my textboxes from Body to the Page Header section, and that solved the problem. Now textboxes stay where they are in both Design, Preview and printed report.

Upon further investigation, the awful truth finally revealed itself. My report utilizes a matrix control to display variable amount of columns. It turns out that when matrix is expanding to the right at runtime, it will "push out" everything that is located on the right side of it in the design tab. Only controls located in the same section (usually Body) will be affected. What confuses me most, the vertical position of controls doesn't matter, as soon as .Left property of a control is greater than the right border of the matrix in the design tab, the control will be shifted to the right at runtime.

Since Report Designer does not support user-defined sections to split Body into individual parts, the only solution seems to be enclosing controls into Rectangle object to keep it on the left from the evil matrix control. Just as Jordi recommended.

Denis

Report objects shift to right on very wide report - why?

Greetings,

I have a very wide report of more than 20 inches. I've placed several parameter values in the report header section so that the user can see what filters have been applied to the data. The testboxes shift their position several inches to the right when the report is run from the Report Manager.

Is there a way to make sure that a textbox is displayed at an absolute position? I thought maybe there would be a property on the report or body object that controls this but I don't see one.

Thanks for your help,

BCB

It may be because your left margin is high. Check how much left margin you have specified in Report (menu) -> Report Properties -> Layout (tab).

Shyam

|||Hi,

I've found similar (non-reproducible) behaviour sometimes, I've solved it putting all the "affected" items inside a rectangle control.

HTH

Jordi Rambla|||

Oh my, having the same problem and it drives me NUTS. Keeps kicking my textboxes to the right without any logical explanation I could think of. In layout tab, everything is fine. In preview tab, some textboxes that reside in Body, are shifted chaotically to the right, sometimes beyond the right border of the first page. When report is deployed and viewed, the position of the textboxes changes but they are still far on the right side. And finally in the printout, position may change once again and still not where I meant them to be. Nice WYSIWYG I should say.

My report is very simple, it contains a table and a matrix region. The textboxes in question hold the information about parameters and about printing time. The layout of the page is A4 landscape, with 15mm left margin and 10mm other margins. Does anybody have an idea what is going on? A bug? And by the way, enclosing textboxes into rectangle object doesn't work for me.

Denis

|||

Try increasing the Interactive Size or Report Size (properties found on the report object). In my case the browser seemed to want to treat the location of the text boxes I had in the page header as a percentage of page width rather than an obsolute location. The actual report was much wider than the property width (I forget which of the two properties I changed). When I increased page width the text boxes stopped shifting right or at least moved a very small amount that was tolerable. This all took place within the PageHeader section.

BCB

|||

Thank you very much for your reply.

I tried playing with "Interactive size" properties of the Report object, but that didn't change anything. BTW in my case, the interactive size values were wrong too, compared to the actual size of the reporting sections.

But then, I moved my textboxes from Body to the Page Header section, and that solved the problem. Now textboxes stay where they are in both Design, Preview and printed report.

Upon further investigation, the awful truth finally revealed itself. My report utilizes a matrix control to display variable amount of columns. It turns out that when matrix is expanding to the right at runtime, it will "push out" everything that is located on the right side of it in the design tab. Only controls located in the same section (usually Body) will be affected. What confuses me most, the vertical position of controls doesn't matter, as soon as .Left property of a control is greater than the right border of the matrix in the design tab, the control will be shifted to the right at runtime.

Since Report Designer does not support user-defined sections to split Body into individual parts, the only solution seems to be enclosing controls into Rectangle object to keep it on the left from the evil matrix control. Just as Jordi recommended.

Denis

Monday, March 12, 2012

Report Manager Interface

Hello All,
I need some help regarding modification to Report Manager.
I need to add company Logo and Name at the center of the top section of the
Report Manager (section of the page that has bread-crumbs and search box). I
could modify CSS files to do the same but the logo appears near the
breadcrumbs and it gets crowded.
Can I modify any masterpage or .aspx to change the look and feel? I could
find the aspx pages but they only carry references to the assemblies. Can
anyone help me with this please?
thanksIts not customizable, but can be changed using css. How to change ? you can
go through this link.
http://weblogs.asp.net/jgalloway/archive/2006/12/12/reporting-services-add-a-logo-to-the-report-manager.aspx
Amarnath, MCTS
"Manu" wrote:
> Hello All,
> I need some help regarding modification to Report Manager.
> I need to add company Logo and Name at the center of the top section of the
> Report Manager (section of the page that has bread-crumbs and search box). I
> could modify CSS files to do the same but the logo appears near the
> breadcrumbs and it gets crowded.
> Can I modify any masterpage or .aspx to change the look and feel? I could
> find the aspx pages but they only carry references to the assemblies. Can
> anyone help me with this please?
> thanks

Wednesday, March 7, 2012

Report Layout

I'm working on a report that could potentially require 13 or so datasets in
order to get the specific fields that I need for each section of the report.
The SQL table is structured as follows:
select
year,
branch,
measure,
jan,
feb,
mar
from tblBPM_BP
I was trying to bring all of the measures in on one dataset, but I need to
be able to further filter the data for each section of the report (i.e. Sales
& headcount). Is there a better technique than using a dataset for each
section of the report?What about using filters.
"DJONES" wrote:
> I'm working on a report that could potentially require 13 or so datasets in
> order to get the specific fields that I need for each section of the report.
> The SQL table is structured as follows:
> select
> year,
> branch,
> measure,
> jan,
> feb,
> mar
> from tblBPM_BP
> I was trying to bring all of the measures in on one dataset, but I need to
> be able to further filter the data for each section of the report (i.e. Sales
> & headcount). Is there a better technique than using a dataset for each
> section of the report?
>|||Can I filter out data in a table w/i the report designer?
"Victor" wrote:
> What about using filters.
>
> "DJONES" wrote:
> > I'm working on a report that could potentially require 13 or so datasets in
> > order to get the specific fields that I need for each section of the report.
> > The SQL table is structured as follows:
> >
> > select
> > year,
> > branch,
> > measure,
> > jan,
> > feb,
> > mar
> > from tblBPM_BP
> >
> > I was trying to bring all of the measures in on one dataset, but I need to
> > be able to further filter the data for each section of the report (i.e. Sales
> > & headcount). Is there a better technique than using a dataset for each
> > section of the report?
> >|||Table properties -> Filters
"DJONES" wrote:
> Can I filter out data in a table w/i the report designer?
> "Victor" wrote:
> > What about using filters.
> >
> >
> > "DJONES" wrote:
> >
> > > I'm working on a report that could potentially require 13 or so datasets in
> > > order to get the specific fields that I need for each section of the report.
> > > The SQL table is structured as follows:
> > >
> > > select
> > > year,
> > > branch,
> > > measure,
> > > jan,
> > > feb,
> > > mar
> > > from tblBPM_BP
> > >
> > > I was trying to bring all of the measures in on one dataset, but I need to
> > > be able to further filter the data for each section of the report (i.e. Sales
> > > & headcount). Is there a better technique than using a dataset for each
> > > section of the report?
> > >|||That will do the trick. Thanks!
"Victor" wrote:
> Table properties -> Filters
> "DJONES" wrote:
> > Can I filter out data in a table w/i the report designer?
> >
> > "Victor" wrote:
> >
> > > What about using filters.
> > >
> > >
> > > "DJONES" wrote:
> > >
> > > > I'm working on a report that could potentially require 13 or so datasets in
> > > > order to get the specific fields that I need for each section of the report.
> > > > The SQL table is structured as follows:
> > > >
> > > > select
> > > > year,
> > > > branch,
> > > > measure,
> > > > jan,
> > > > feb,
> > > > mar
> > > > from tblBPM_BP
> > > >
> > > > I was trying to bring all of the measures in on one dataset, but I need to
> > > > be able to further filter the data for each section of the report (i.e. Sales
> > > > & headcount). Is there a better technique than using a dataset for each
> > > > section of the report?
> > > >

Saturday, February 25, 2012

Report Header woes

I am creating a report which consists of data in two columns. I've set the Body section to have 2 columns in it. This works fine until I start working with the report header. I do not want a page header that shows up on every page, I only want a header on the first page, a report header.

I first tried to hide the header by placing it in the Page Header section, then putting in the "page > 1" expression in the visibility property. This does what I want, except a large blank space is present at the top of my report (the header is about 1.2 "). This is unacceptable.

So my next test was to put the header into the Body section so that it only shows up in the beginning of the report. Because of this, I will need to remove the columns from the Body and make it only 1 column now. I decided to put the multi-column section into a subreport that has 2 columns and add this to the body of my report. But, this failed; the data appears in one column only. I can change the width the ensure it fits and set all other sorts of properties, nothing works.

I've researched both issues and found that these are both "bugs" in reporting services, although I cannot find thedocumented bugs.

Is there any workaround to putting a header onto only the first page of a multi-column report? Other reporting engines are able to handle this with ease, I'm suprised by Reporting Services lack of a "Report Header" section. I am an experienced .NET developer, so if there is a programmatic way through this, I am game.

Thanks,

Scott Steigerwald

I realize this thread is over a year and a half old. The point of this reply is to bring the issue back among the recent posts; a "bump" as it were.

I am struggling with a near identical problem, and have already tried all the workarounds proposed by Mr. Steigerwald, to no avail.

I hope that after 20 or so months, some solution has been discovered.

Thanks,

David Emigh

|||I am pretty confident there is still no solution to this.
I actually faked a multi column report by manipulating the dataset I was pulling across, but this was a failry specific situation where I knew approximately how many rows were always being returned.|||

Thanks.

Sadly, I rather suspected this. At least I know now to look for a solution outside of SQL Reporting Services.

|||

Um, folks... hold on a sec .

I saw the re-post on this question and I think I have succeeded in doing what you want. (Sorry I didn't get around to posting this last night.)

It's a little hacky and it probably won't work for *every* situation, but I did get the basic parameters down:

* -- I've got a Body section with two columns

* -- I have a header that appears to stretch over both areas

* -- it "collapses" after the first page.

Here is what I did:

I couldn't get it to work as a Page header, for reasons you've already discussed. So, instead, I worked out how you could have a Body header that disappeared properly and stretched across.

The first step is to figure out where to put it. In my example, and I am not sure how many other ways there might be to do it, it's a group header and I page breaked on group. I don't think this is relevant, but whatever your data region you need a body element that will be placed at the top of every column.

The background of this page header element should be transparent, because we're going to change its contents for the second column (or more, if it's > 2 cols) and we want it to look as seamless -across as possible.

For the same reason (making the header look seamless-across), you probably want to set the colum spacing as low as possible (you can add some extra padding on the right side by adding an extra blank column, and merge the layout element across, to compensate).

Note that, just as we'll make the contents different for each col, text alignment can be an expression, so using what I"m doing here you could (say) have the left col header left aligned and the right col header right aligned.

I set the expression for this header element to =Code.MyUDF().

You can see my code below. Notice that the ColNo var is incremented each time, so I can use it both for "which column am I in" and "which page am I on".

The tricky part was just figuring out when the Visibility of the element would be evaluated with respect to this function being invoked -- so that I could set the visibility properly. With how I'm doing it here, the visibility expression has to be =Code.ColNo > 1 (one less than you might think, IOW).

The visibility expression would be a little different if I invoked one function to increment earlier, say in an earlier no-height line, and a second function to figure out the expressions to show, but this combined design works okay as well.

I also set the CanShrink property of this element to True to and I set the Visibility of the row to the same expression as the layout element.

Here's the code I used:

Code Snippet

Public ColNo AS Integer = 0


Function MyUDF AS String
Dim myheadpart As String
ColNo = ColNo + 1
If ColNo = 1
myheadpart= "1st part of header"
ElseIf ColNo = 2
myheadpart= "2nd part"
Else
myheadpart = ""
End If
Return myheadpart
End Function

... HTH,

>L<

|||

Thank you!

I've bookmarked this thread for future reference, as this situation will almost certainly come up again.

Unfortunately, in my particular situation, it doesn't seem applicable. I have a requirement to include an image that is wider than the the sum of the widths of the first column and the space between it and the second. The image has a minimum size and a non-negotiable aspect ratio.

I wasn't the thread starter on this one, but if I were, I would mark this as "answered"

Thanks again,

David

|||

Hi David

I see what you mean about the image -- I know this whole idea is a bit dodgy but there might be some way to split the image up into two? First make a "full image" the full width of the page, I mean with a lot of filler-empty space on the right (or on both sides, if you're trying to center it horizontally on the page), and then split it down the middle for column one and column two. No guarantees that it will work, of course, but worth a shot?

>> I would mark it

Well, I can mark it as a moderator but I won't <g>. I won't do that with my own answers unless they prove out (actually help somebody) <g>.

>L<

|||

Maybe I am misundertanding things but generally when I want a first page only header I create a second dataset that returns a single record by using a statment like "select x=1". Then I just use a table set to the dummy header at the top of my body section. A typical example where I would use it is for invoices.

|||

Lisa,

Perhaps another moderator will come along and do the deed which modesty prevents you doing yourself

My manager has decided on a different approach to this problem, one which precludes any image editing, but I will keep that in mind also.

David

|||

Hi there,

Yeah, a first page header *alone* is not the problem here. (There are lots of ways to do that -- for example you can group on something that will never break as an outer group...)

The problem we're trying to solve here is the multi-column report and getting the page header to stretch across those columns without using a page header...

>L<

|||

Hi David,

If you don't mind my asking... what did you and your manager settle on? (It's always good to be able to remove the requirement if the requirement is a PITA <rofl>)

>L<

|||

Hey Lisa,

The requirement didn't go away, we just opted to generate the report header and report body separately, then merge them later (probably as an active .pdf via a web app).

|||

Ah.

Well, good to know. (I have posted about combining files in a PDF a couple of times, and recently found a nice utility for this to complement my usual low-level ghostcript PDF approach... give a shout if you have a difficulties.

FWIW there are many reasons to do this that have nothing to do with your current problem, for example different orientation of a cover page. Repeat after me: a report is a document section, not a document. Extended essay on this subject here: http://spacefold.com/lisa/post/Reporting-Convergences-Chapter-The-one-about-multiple-sets-of-printing-instructions.aspx.

>L<

Report Header woes

I am creating a report which consists of data in two columns. I've set the Body section to have 2 columns in it. This works fine until I start working with the report header. I do not want a page header that shows up on every page, I only want a header on the first page, a report header.

I first tried to hide the header by placing it in the Page Header section, then putting in the "page > 1" expression in the visibility property. This does what I want, except a large blank space is present at the top of my report (the header is about 1.2 "). This is unacceptable.

So my next test was to put the header into the Body section so that it only shows up in the beginning of the report. Because of this, I will need to remove the columns from the Body and make it only 1 column now. I decided to put the multi-column section into a subreport that has 2 columns and add this to the body of my report. But, this failed; the data appears in one column only. I can change the width the ensure it fits and set all other sorts of properties, nothing works.

I've researched both issues and found that these are both "bugs" in reporting services, although I cannot find thedocumented bugs.

Is there any workaround to putting a header onto only the first page of a multi-column report? Other reporting engines are able to handle this with ease, I'm suprised by Reporting Services lack of a "Report Header" section. I am an experienced .NET developer, so if there is a programmatic way through this, I am game.

Thanks,

Scott Steigerwald

I realize this thread is over a year and a half old. The point of this reply is to bring the issue back among the recent posts; a "bump" as it were.

I am struggling with a near identical problem, and have already tried all the workarounds proposed by Mr. Steigerwald, to no avail.

I hope that after 20 or so months, some solution has been discovered.

Thanks,

David Emigh

|||I am pretty confident there is still no solution to this.
I actually faked a multi column report by manipulating the dataset I was pulling across, but this was a failry specific situation where I knew approximately how many rows were always being returned.
|||

Thanks.

Sadly, I rather suspected this. At least I know now to look for a solution outside of SQL Reporting Services.

|||

Um, folks... hold on a sec .

I saw the re-post on this question and I think I have succeeded in doing what you want. (Sorry I didn't get around to posting this last night.)

It's a little hacky and it probably won't work for *every* situation, but I did get the basic parameters down:

* -- I've got a Body section with two columns

* -- I have a header that appears to stretch over both areas

* -- it "collapses" after the first page.

Here is what I did:

I couldn't get it to work as a Page header, for reasons you've already discussed. So, instead, I worked out how you could have a Body header that disappeared properly and stretched across.

The first step is to figure out where to put it. In my example, and I am not sure how many other ways there might be to do it, it's a group header and I page breaked on group. I don't think this is relevant, but whatever your data region you need a body element that will be placed at the top of every column.

The background of this page header element should be transparent, because we're going to change its contents for the second column (or more, if it's > 2 cols) and we want it to look as seamless -across as possible.

For the same reason (making the header look seamless-across), you probably want to set the colum spacing as low as possible (you can add some extra padding on the right side by adding an extra blank column, and merge the layout element across, to compensate).

Note that, just as we'll make the contents different for each col, text alignment can be an expression, so using what I"m doing here you could (say) have the left col header left aligned and the right col header right aligned.

I set the expression for this header element to =Code.MyUDF().

You can see my code below. Notice that the ColNo var is incremented each time, so I can use it both for "which column am I in" and "which page am I on".

The tricky part was just figuring out when the Visibility of the element would be evaluated with respect to this function being invoked -- so that I could set the visibility properly. With how I'm doing it here, the visibility expression has to be =Code.ColNo > 1 (one less than you might think, IOW).

The visibility expression would be a little different if I invoked one function to increment earlier, say in an earlier no-height line, and a second function to figure out the expressions to show, but this combined design works okay as well.

I also set the CanShrink property of this element to True to and I set the Visibility of the row to the same expression as the layout element.

Here's the code I used:

Code Snippet

Public ColNo AS Integer = 0


Function MyUDF AS String
Dim myheadpart As String
ColNo = ColNo + 1
If ColNo = 1
myheadpart= "1st part of header"
ElseIf ColNo = 2
myheadpart= "2nd part"
Else
myheadpart = ""
End If
Return myheadpart
End Function

... HTH,

>L<

|||

Thank you!

I've bookmarked this thread for future reference, as this situation will almost certainly come up again.

Unfortunately, in my particular situation, it doesn't seem applicable. I have a requirement to include an image that is wider than the the sum of the widths of the first column and the space between it and the second. The image has a minimum size and a non-negotiable aspect ratio.

I wasn't the thread starter on this one, but if I were, I would mark this as "answered"

Thanks again,

David

|||

Hi David

I see what you mean about the image -- I know this whole idea is a bit dodgy but there might be some way to split the image up into two? First make a "full image" the full width of the page, I mean with a lot of filler-empty space on the right (or on both sides, if you're trying to center it horizontally on the page), and then split it down the middle for column one and column two. No guarantees that it will work, of course, but worth a shot?

>> I would mark it

Well, I can mark it as a moderator but I won't <g>. I won't do that with my own answers unless they prove out (actually help somebody) <g>.

>L<

|||

Maybe I am misundertanding things but generally when I want a first page only header I create a second dataset that returns a single record by using a statment like "select x=1". Then I just use a table set to the dummy header at the top of my body section. A typical example where I would use it is for invoices.

|||

Lisa,

Perhaps another moderator will come along and do the deed which modesty prevents you doing yourself

My manager has decided on a different approach to this problem, one which precludes any image editing, but I will keep that in mind also.

David

|||

Hi there,

Yeah, a first page header *alone* is not the problem here. (There are lots of ways to do that -- for example you can group on something that will never break as an outer group...)

The problem we're trying to solve here is the multi-column report and getting the page header to stretch across those columns without using a page header...

>L<

|||

Hi David,

If you don't mind my asking... what did you and your manager settle on? (It's always good to be able to remove the requirement if the requirement is a PITA <rofl>)

>L<

|||

Hey Lisa,

The requirement didn't go away, we just opted to generate the report header and report body separately, then merge them later (probably as an active .pdf via a web app).

|||

Ah.

Well, good to know. (I have posted about combining files in a PDF a couple of times, and recently found a nice utility for this to complement my usual low-level ghostcript PDF approach... give a shout if you have a difficulties.

FWIW there are many reasons to do this that have nothing to do with your current problem, for example different orientation of a cover page. Repeat after me: a report is a document section, not a document. Extended essay on this subject here: http://spacefold.com/lisa/post/Reporting-Convergences-Chapter-The-one-about-multiple-sets-of-printing-instructions.aspx.

>L<

Report Header woes

I am creating a report which consists of data in two columns. I've set the Body section to have 2 columns in it. This works fine until I start working with the report header. I do not want a page header that shows up on every page, I only want a header on the first page, a report header.

I first tried to hide the header by placing it in the Page Header section, then putting in the "page > 1" expression in the visibility property. This does what I want, except a large blank space is present at the top of my report (the header is about 1.2 "). This is unacceptable.

So my next test was to put the header into the Body section so that it only shows up in the beginning of the report. Because of this, I will need to remove the columns from the Body and make it only 1 column now. I decided to put the multi-column section into a subreport that has 2 columns and add this to the body of my report. But, this failed; the data appears in one column only. I can change the width the ensure it fits and set all other sorts of properties, nothing works.

I've researched both issues and found that these are both "bugs" in reporting services, although I cannot find thedocumented bugs.

Is there any workaround to putting a header onto only the first page of a multi-column report? Other reporting engines are able to handle this with ease, I'm suprised by Reporting Services lack of a "Report Header" section. I am an experienced .NET developer, so if there is a programmatic way through this, I am game.

Thanks,

Scott Steigerwald

I realize this thread is over a year and a half old. The point of this reply is to bring the issue back among the recent posts; a "bump" as it were.

I am struggling with a near identical problem, and have already tried all the workarounds proposed by Mr. Steigerwald, to no avail.

I hope that after 20 or so months, some solution has been discovered.

Thanks,

David Emigh

|||I am pretty confident there is still no solution to this.
I actually faked a multi column report by manipulating the dataset I was pulling across, but this was a failry specific situation where I knew approximately how many rows were always being returned.
|||

Thanks.

Sadly, I rather suspected this. At least I know now to look for a solution outside of SQL Reporting Services.

|||

Um, folks... hold on a sec .

I saw the re-post on this question and I think I have succeeded in doing what you want. (Sorry I didn't get around to posting this last night.)

It's a little hacky and it probably won't work for *every* situation, but I did get the basic parameters down:

* -- I've got a Body section with two columns

* -- I have a header that appears to stretch over both areas

* -- it "collapses" after the first page.

Here is what I did:

I couldn't get it to work as a Page header, for reasons you've already discussed. So, instead, I worked out how you could have a Body header that disappeared properly and stretched across.

The first step is to figure out where to put it. In my example, and I am not sure how many other ways there might be to do it, it's a group header and I page breaked on group. I don't think this is relevant, but whatever your data region you need a body element that will be placed at the top of every column.

The background of this page header element should be transparent, because we're going to change its contents for the second column (or more, if it's > 2 cols) and we want it to look as seamless -across as possible.

For the same reason (making the header look seamless-across), you probably want to set the colum spacing as low as possible (you can add some extra padding on the right side by adding an extra blank column, and merge the layout element across, to compensate).

Note that, just as we'll make the contents different for each col, text alignment can be an expression, so using what I"m doing here you could (say) have the left col header left aligned and the right col header right aligned.

I set the expression for this header element to =Code.MyUDF().

You can see my code below. Notice that the ColNo var is incremented each time, so I can use it both for "which column am I in" and "which page am I on".

The tricky part was just figuring out when the Visibility of the element would be evaluated with respect to this function being invoked -- so that I could set the visibility properly. With how I'm doing it here, the visibility expression has to be =Code.ColNo > 1 (one less than you might think, IOW).

The visibility expression would be a little different if I invoked one function to increment earlier, say in an earlier no-height line, and a second function to figure out the expressions to show, but this combined design works okay as well.

I also set the CanShrink property of this element to True to and I set the Visibility of the row to the same expression as the layout element.

Here's the code I used:

Code Snippet

Public ColNo AS Integer = 0


Function MyUDF AS String
Dim myheadpart As String
ColNo = ColNo + 1
If ColNo = 1
myheadpart= "1st part of header"
ElseIf ColNo = 2
myheadpart= "2nd part"
Else
myheadpart = ""
End If
Return myheadpart
End Function

... HTH,

>L<

|||

Thank you!

I've bookmarked this thread for future reference, as this situation will almost certainly come up again.

Unfortunately, in my particular situation, it doesn't seem applicable. I have a requirement to include an image that is wider than the the sum of the widths of the first column and the space between it and the second. The image has a minimum size and a non-negotiable aspect ratio.

I wasn't the thread starter on this one, but if I were, I would mark this as "answered"

Thanks again,

David

|||

Hi David

I see what you mean about the image -- I know this whole idea is a bit dodgy but there might be some way to split the image up into two? First make a "full image" the full width of the page, I mean with a lot of filler-empty space on the right (or on both sides, if you're trying to center it horizontally on the page), and then split it down the middle for column one and column two. No guarantees that it will work, of course, but worth a shot?

>> I would mark it

Well, I can mark it as a moderator but I won't <g>. I won't do that with my own answers unless they prove out (actually help somebody) <g>.

>L<

|||

Maybe I am misundertanding things but generally when I want a first page only header I create a second dataset that returns a single record by using a statment like "select x=1". Then I just use a table set to the dummy header at the top of my body section. A typical example where I would use it is for invoices.

|||

Lisa,

Perhaps another moderator will come along and do the deed which modesty prevents you doing yourself

My manager has decided on a different approach to this problem, one which precludes any image editing, but I will keep that in mind also.

David

|||

Hi there,

Yeah, a first page header *alone* is not the problem here. (There are lots of ways to do that -- for example you can group on something that will never break as an outer group...)

The problem we're trying to solve here is the multi-column report and getting the page header to stretch across those columns without using a page header...

>L<

|||

Hi David,

If you don't mind my asking... what did you and your manager settle on? (It's always good to be able to remove the requirement if the requirement is a PITA <rofl>)

>L<

|||

Hey Lisa,

The requirement didn't go away, we just opted to generate the report header and report body separately, then merge them later (probably as an active .pdf via a web app).

|||

Ah.

Well, good to know. (I have posted about combining files in a PDF a couple of times, and recently found a nice utility for this to complement my usual low-level ghostcript PDF approach... give a shout if you have a difficulties.

FWIW there are many reasons to do this that have nothing to do with your current problem, for example different orientation of a cover page. Repeat after me: a report is a document section, not a document. Extended essay on this subject here: http://spacefold.com/lisa/post/Reporting-Convergences-Chapter-The-one-about-multiple-sets-of-printing-instructions.aspx.

>L<