Showing posts with label page. Show all posts
Showing posts with label page. Show all posts

Friday, March 30, 2012

How Do I Manage a Report Header

In a post titled "Report Header Only on First Page", Charles Kangai replied
that:
"It sounds like you have used a page header rather than a report header in
your report. A report header automatically does what you are wanting to do.
To create a report header, just place a textbox above your data region and
type in the text for your header. It will automatically appear only on the
first page."
I'll be danged if I can find the Report Header option in SRS. I have a Page
Header and I also need a Report Header. Can anyone help, please
Thank you,
msflinxReport Header and Footer is hidden by Default in Designer. Go to "Report" on
the Menu and You can See "Report header" and "Report Footer" options. Click
on the options to enable it.
--
THANKS & PLEASE RATE THE POSTING.
--RAVI--
"msflinx" wrote:
> In a post titled "Report Header Only on First Page", Charles Kangai replied
> that:
> "It sounds like you have used a page header rather than a report header in
> your report. A report header automatically does what you are wanting to do.
> To create a report header, just place a textbox above your data region and
> type in the text for your header. It will automatically appear only on the
> first page."
> I'll be danged if I can find the Report Header option in SRS. I have a Page
> Header and I also need a Report Header. Can anyone help, please
> Thank you,
> msflinx|||I see "Page Header" & "Page Footer". I do not see "Report Header" & "Report
Footer". I'm using SRS2000. Is this a SRS2005 only option?
Thanks,
msflinx
"Ravi" wrote:
> Report Header and Footer is hidden by Default in Designer. Go to "Report" on
> the Menu and You can See "Report header" and "Report Footer" options. Click
> on the options to enable it.
> --
> THANKS & PLEASE RATE THE POSTING.
> --RAVI--
>
> "msflinx" wrote:
> > In a post titled "Report Header Only on First Page", Charles Kangai replied
> > that:
> >
> > "It sounds like you have used a page header rather than a report header in
> > your report. A report header automatically does what you are wanting to do.
> > To create a report header, just place a textbox above your data region and
> > type in the text for your header. It will automatically appear only on the
> > first page."
> >
> > I'll be danged if I can find the Report Header option in SRS. I have a Page
> > Header and I also need a Report Header. Can anyone help, please
> >
> > Thank you,
> >
> > msflinx|||Actually in RS2005, when you click on Report, you see "Page Header" and
"Page Footer", not the report header and footer.
"Ravi" <ravishankart@.hotmail.com> wrote in message
news:CB7C7C32-2911-4977-8D94-5B9EFD3EEDBB@.microsoft.com...
> Report Header and Footer is hidden by Default in Designer. Go to "Report"
> on
> the Menu and You can See "Report header" and "Report Footer" options.
> Click
> on the options to enable it.
> --
> THANKS & PLEASE RATE THE POSTING.
> --RAVI--
>
> "msflinx" wrote:
>> In a post titled "Report Header Only on First Page", Charles Kangai
>> replied
>> that:
>> "It sounds like you have used a page header rather than a report header
>> in
>> your report. A report header automatically does what you are wanting to
>> do.
>> To create a report header, just place a textbox above your data region
>> and
>> type in the text for your header. It will automatically appear only on
>> the
>> first page."
>> I'll be danged if I can find the Report Header option in SRS. I have a
>> Page
>> Header and I also need a Report Header. Can anyone help, please
>> Thank you,
>> msflinx|||Are you using a table?
--
THANKS & PLEASE RATE THE POSTING.
--RAVI--
"msflinx" wrote:
> I see "Page Header" & "Page Footer". I do not see "Report Header" & "Report
> Footer". I'm using SRS2000. Is this a SRS2005 only option?
> Thanks,
> msflinx
> "Ravi" wrote:
> > Report Header and Footer is hidden by Default in Designer. Go to "Report" on
> > the Menu and You can See "Report header" and "Report Footer" options. Click
> > on the options to enable it.
> >
> > --
> > THANKS & PLEASE RATE THE POSTING.
> > --RAVI--
> >
> >
> > "msflinx" wrote:
> >
> > > In a post titled "Report Header Only on First Page", Charles Kangai replied
> > > that:
> > >
> > > "It sounds like you have used a page header rather than a report header in
> > > your report. A report header automatically does what you are wanting to do.
> > > To create a report header, just place a textbox above your data region and
> > > type in the text for your header. It will automatically appear only on the
> > > first page."
> > >
> > > I'll be danged if I can find the Report Header option in SRS. I have a Page
> > > Header and I also need a Report Header. Can anyone help, please
> > >
> > > Thank you,
> > >
> > > msflinx|||Sorry for the delay in answering. Had a "child emergency" and had to leave
the office.
Yes, I am using a table.
"Ravi" wrote:
> Are you using a table?
> --
> THANKS & PLEASE RATE THE POSTING.
> --RAVI--
>
> "msflinx" wrote:
> > I see "Page Header" & "Page Footer". I do not see "Report Header" & "Report
> > Footer". I'm using SRS2000. Is this a SRS2005 only option?
> >
> > Thanks,
> > msflinx
> >
> > "Ravi" wrote:
> >
> > > Report Header and Footer is hidden by Default in Designer. Go to "Report" on
> > > the Menu and You can See "Report header" and "Report Footer" options. Click
> > > on the options to enable it.
> > >
> > > --
> > > THANKS & PLEASE RATE THE POSTING.
> > > --RAVI--
> > >
> > >
> > > "msflinx" wrote:
> > >
> > > > In a post titled "Report Header Only on First Page", Charles Kangai replied
> > > > that:
> > > >
> > > > "It sounds like you have used a page header rather than a report header in
> > > > your report. A report header automatically does what you are wanting to do.
> > > > To create a report header, just place a textbox above your data region and
> > > > type in the text for your header. It will automatically appear only on the
> > > > first page."
> > > >
> > > > I'll be danged if I can find the Report Header option in SRS. I have a Page
> > > > Header and I also need a Report Header. Can anyone help, please
> > > >
> > > > Thank you,
> > > >
> > > > msflinx

How do I make Newspaper Columns in RS

I have 3 columns on my report in a table region. I would like for these 3 cols to print across the page (landscape)width such that more data can fit on to a page - like using newspaper columns in word. How can I do this in reporting services? Thanks in advance for your help.

You can add columns to a report. However, they only show up in certain rendering extensions. In the PDF and TIFF rendering extensions. This means you will not see the column layout in Report Manager or when Previewing the reports in Report Designer. See this link:

http://msdn2.microsoft.com/en-us/library/ms155816.aspx

sql

Monday, March 19, 2012

How do I get rid of this problem

Hi, I did a web page for the intranet where I work using ASP and a database in SQL Server, the connection line is the following:
Set oConn=Server.CreateObject("ADODB.Connection")
oConn.Open "Provider=sqloledb;Server=zapopan02;database=data;U ser Id=sa"
The problem comes the first time I try to establish the connection after 5 min. (aprox) of inactivity.
I get the following error:
Microsoft OLE DB Provider for SQL Server error '80004005'
Timeout expired
Then, I refresh the page and it works fine (and keeps working until I stop using the page for a while)
Could someone pleaseee tell me how to get rid of this problem?
Thank in advance
-RichardGenerally some sort of problem finding the DSN. Could be lost in the global.asa file, or perhaps this is not a SYSTEM DSN.

May refer to this KBA (http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q169/4/70.asp&NoWebContent=1) about connection pooling FAQ.|||For those who might have the same problem that I did, here is the answer to my own question:
There is a parameter named Connect Timeout wich is 15 seconds by default, that means that if after 15 sec the connection has not been established, oledb returns an error.
So, I changed the connection line to the following:
oConn.Open " Provider=sqloledb;Server=zapopan02;database=data;U
ser Id=sa;Connection Timeout=30"
And it worked, but anyway, I dont feel so satisfied because the problem is not 100% solved, I dont get the error anymore and the page opens but its still slow the first time.
Thanks anyway
- Richard

How do i get rid of page breaks for HTML view...

Hello, I would like to get my reports to be on one page when viewing in HTML
in the report viewer. People generally dont want to have to flip through
pages when looking at reports online... they would much rather see the entire
report and just keep scrolling... however when printing you would want the
page-breaks to still happen (naturall).
Currently in Crystal using their report viewer control I simply removing the
paging controls to get this effect iirc... i tried hiding the paging control
in the RS report viewer control and i simply got a paged report with no way
of advancing through the pages...
Can someone please help me do this.Here is the solution. This works only for RS 2005. RS 2005 introduced
interactivesize which consists of interactivewidth and interactiveheight. To
have no page breaks set the interactiveheight to 0. This only works for
height, not width. You need to get to the report properties. You know how
when you click on the body or a textbox you see the property page for that
element on the right. If you click to the left of the ruler, that gets the
report properties to show (the menu, report properties does allow setting
this). Look for interactivesize, expand and then set interactiveheight to 0.
Not very discoverable but pretty cool.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"thejez" <thejez@.discussions.microsoft.com> wrote in message
news:E4ABC9C1-43F0-4564-B248-7EE7D818CC0B@.microsoft.com...
> Hello, I would like to get my reports to be on one page when viewing in
> HTML
> in the report viewer. People generally dont want to have to flip through
> pages when looking at reports online... they would much rather see the
> entire
> report and just keep scrolling... however when printing you would want the
> page-breaks to still happen (naturall).
> Currently in Crystal using their report viewer control I simply removing
> the
> paging controls to get this effect iirc... i tried hiding the paging
> control
> in the RS report viewer control and i simply got a paged report with no
> way
> of advancing through the pages...
> Can someone please help me do this.|||I think im posting this question to wrong place (but in all fairness its very
confusing from MS) - I am using a LOCAL report in VS 2005 ReportViewer
control - so i dont see the interactive options. I have RS 2005 but I am
unable to use it because of the limitations of how i can poplate the data (I
have to do pre-aggregation on the data before it gets to the dataset to get
around the aggregate of aggregates lmiitation). So my only option was to use
a local report where i could get the data from the DB pre-process it and then
pop the dataset and then render the report... this a big pain i know but what
can i do...
so is there any way in the VS 2005 ReportViewer and a local Report file
(rdlc). I have height set to 100% on everything and i even went to far as to
define the report at 160in high... but alas the control seems to break at the
same place ignoring everything i throw at it!
:(
"Bruce L-C [MVP]" wrote:
> Here is the solution. This works only for RS 2005. RS 2005 introduced
> interactivesize which consists of interactivewidth and interactiveheight. To
> have no page breaks set the interactiveheight to 0. This only works for
> height, not width. You need to get to the report properties. You know how
> when you click on the body or a textbox you see the property page for that
> element on the right. If you click to the left of the ruler, that gets the
> report properties to show (the menu, report properties does allow setting
> this). Look for interactivesize, expand and then set interactiveheight to 0.
> Not very discoverable but pretty cool.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "thejez" <thejez@.discussions.microsoft.com> wrote in message
> news:E4ABC9C1-43F0-4564-B248-7EE7D818CC0B@.microsoft.com...
> > Hello, I would like to get my reports to be on one page when viewing in
> > HTML
> > in the report viewer. People generally dont want to have to flip through
> > pages when looking at reports online... they would much rather see the
> > entire
> > report and just keep scrolling... however when printing you would want the
> > page-breaks to still happen (naturall).
> >
> > Currently in Crystal using their report viewer control I simply removing
> > the
> > paging controls to get this effect iirc... i tried hiding the paging
> > control
> > in the RS report viewer control and i simply got a paged report with no
> > way
> > of advancing through the pages...
> >
> > Can someone please help me do this.
>
>|||Bruce, i managed to just put the <InteractiveHeight>0in</InteractiveHeight>
element into my RDLC file and it worked... so even though there isnt any
design-tim support for setting that value (at least that i saw) adding it to
the source file did the trick.
thanks!
"thejez" wrote:
> I think im posting this question to wrong place (but in all fairness its very
> confusing from MS) - I am using a LOCAL report in VS 2005 ReportViewer
> control - so i dont see the interactive options. I have RS 2005 but I am
> unable to use it because of the limitations of how i can poplate the data (I
> have to do pre-aggregation on the data before it gets to the dataset to get
> around the aggregate of aggregates lmiitation). So my only option was to use
> a local report where i could get the data from the DB pre-process it and then
> pop the dataset and then render the report... this a big pain i know but what
> can i do...
> so is there any way in the VS 2005 ReportViewer and a local Report file
> (rdlc). I have height set to 100% on everything and i even went to far as to
> define the report at 160in high... but alas the control seems to break at the
> same place ignoring everything i throw at it!
> :(
> "Bruce L-C [MVP]" wrote:
> > Here is the solution. This works only for RS 2005. RS 2005 introduced
> > interactivesize which consists of interactivewidth and interactiveheight. To
> > have no page breaks set the interactiveheight to 0. This only works for
> > height, not width. You need to get to the report properties. You know how
> > when you click on the body or a textbox you see the property page for that
> > element on the right. If you click to the left of the ruler, that gets the
> > report properties to show (the menu, report properties does allow setting
> > this). Look for interactivesize, expand and then set interactiveheight to 0.
> >
> > Not very discoverable but pretty cool.
> >
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> > "thejez" <thejez@.discussions.microsoft.com> wrote in message
> > news:E4ABC9C1-43F0-4564-B248-7EE7D818CC0B@.microsoft.com...
> > > Hello, I would like to get my reports to be on one page when viewing in
> > > HTML
> > > in the report viewer. People generally dont want to have to flip through
> > > pages when looking at reports online... they would much rather see the
> > > entire
> > > report and just keep scrolling... however when printing you would want the
> > > page-breaks to still happen (naturall).
> > >
> > > Currently in Crystal using their report viewer control I simply removing
> > > the
> > > paging controls to get this effect iirc... i tried hiding the paging
> > > control
> > > in the RS report viewer control and i simply got a paged report with no
> > > way
> > > of advancing through the pages...
> > >
> > > Can someone please help me do this.
> >
> >
> >|||You beat me to it, that is what I was going to suggest.
Also, here is a suggestion for development. Develop reports in RS 2005
designer. The designer is better and you can quickly preview. Don't deploy
the report. Then, rename the rdl file to rdlc and bring it into your
project. This is how I do it. Much nicer development environment.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"thejez" <thejez@.discussions.microsoft.com> wrote in message
news:1A2F6C1F-3453-412A-AC0E-363C18C89D08@.microsoft.com...
> Bruce, i managed to just put the
> <InteractiveHeight>0in</InteractiveHeight>
> element into my RDLC file and it worked... so even though there isnt any
> design-tim support for setting that value (at least that i saw) adding it
> to
> the source file did the trick.
> thanks!
> "thejez" wrote:
>> I think im posting this question to wrong place (but in all fairness its
>> very
>> confusing from MS) - I am using a LOCAL report in VS 2005 ReportViewer
>> control - so i dont see the interactive options. I have RS 2005 but I am
>> unable to use it because of the limitations of how i can poplate the data
>> (I
>> have to do pre-aggregation on the data before it gets to the dataset to
>> get
>> around the aggregate of aggregates lmiitation). So my only option was to
>> use
>> a local report where i could get the data from the DB pre-process it and
>> then
>> pop the dataset and then render the report... this a big pain i know but
>> what
>> can i do...
>> so is there any way in the VS 2005 ReportViewer and a local Report file
>> (rdlc). I have height set to 100% on everything and i even went to far
>> as to
>> define the report at 160in high... but alas the control seems to break at
>> the
>> same place ignoring everything i throw at it!
>> :(
>> "Bruce L-C [MVP]" wrote:
>> > Here is the solution. This works only for RS 2005. RS 2005 introduced
>> > interactivesize which consists of interactivewidth and
>> > interactiveheight. To
>> > have no page breaks set the interactiveheight to 0. This only works for
>> > height, not width. You need to get to the report properties. You know
>> > how
>> > when you click on the body or a textbox you see the property page for
>> > that
>> > element on the right. If you click to the left of the ruler, that gets
>> > the
>> > report properties to show (the menu, report properties does allow
>> > setting
>> > this). Look for interactivesize, expand and then set interactiveheight
>> > to 0.
>> >
>> > Not very discoverable but pretty cool.
>> >
>> >
>> > --
>> > Bruce Loehle-Conger
>> > MVP SQL Server Reporting Services
>> >
>> > "thejez" <thejez@.discussions.microsoft.com> wrote in message
>> > news:E4ABC9C1-43F0-4564-B248-7EE7D818CC0B@.microsoft.com...
>> > > Hello, I would like to get my reports to be on one page when viewing
>> > > in
>> > > HTML
>> > > in the report viewer. People generally dont want to have to flip
>> > > through
>> > > pages when looking at reports online... they would much rather see
>> > > the
>> > > entire
>> > > report and just keep scrolling... however when printing you would
>> > > want the
>> > > page-breaks to still happen (naturall).
>> > >
>> > > Currently in Crystal using their report viewer control I simply
>> > > removing
>> > > the
>> > > paging controls to get this effect iirc... i tried hiding the paging
>> > > control
>> > > in the RS report viewer control and i simply got a paged report with
>> > > no
>> > > way
>> > > of advancing through the pages...
>> > >
>> > > Can someone please help me do this.
>> >
>> >
>> >|||another update... after re-starting visual studio (since my properties window
was laggin very badly) i went back into the report and now i notice that when
you click on the out-grey area of the report i can see the interactive
property... hrmm so it is there... at least now it is... i dont think it was
there before.. but like i said my properties page was acting VERY funky (like
showing the properties for a DD control on another page while editing the
report...)
"thejez" wrote:
> Bruce, i managed to just put the <InteractiveHeight>0in</InteractiveHeight>
> element into my RDLC file and it worked... so even though there isnt any
> design-tim support for setting that value (at least that i saw) adding it to
> the source file did the trick.
> thanks!
> "thejez" wrote:
> > I think im posting this question to wrong place (but in all fairness its very
> > confusing from MS) - I am using a LOCAL report in VS 2005 ReportViewer
> > control - so i dont see the interactive options. I have RS 2005 but I am
> > unable to use it because of the limitations of how i can poplate the data (I
> > have to do pre-aggregation on the data before it gets to the dataset to get
> > around the aggregate of aggregates lmiitation). So my only option was to use
> > a local report where i could get the data from the DB pre-process it and then
> > pop the dataset and then render the report... this a big pain i know but what
> > can i do...
> >
> > so is there any way in the VS 2005 ReportViewer and a local Report file
> > (rdlc). I have height set to 100% on everything and i even went to far as to
> > define the report at 160in high... but alas the control seems to break at the
> > same place ignoring everything i throw at it!
> >
> > :(
> >
> > "Bruce L-C [MVP]" wrote:
> >
> > > Here is the solution. This works only for RS 2005. RS 2005 introduced
> > > interactivesize which consists of interactivewidth and interactiveheight. To
> > > have no page breaks set the interactiveheight to 0. This only works for
> > > height, not width. You need to get to the report properties. You know how
> > > when you click on the body or a textbox you see the property page for that
> > > element on the right. If you click to the left of the ruler, that gets the
> > > report properties to show (the menu, report properties does allow setting
> > > this). Look for interactivesize, expand and then set interactiveheight to 0.
> > >
> > > Not very discoverable but pretty cool.
> > >
> > >
> > > --
> > > Bruce Loehle-Conger
> > > MVP SQL Server Reporting Services
> > >
> > > "thejez" <thejez@.discussions.microsoft.com> wrote in message
> > > news:E4ABC9C1-43F0-4564-B248-7EE7D818CC0B@.microsoft.com...
> > > > Hello, I would like to get my reports to be on one page when viewing in
> > > > HTML
> > > > in the report viewer. People generally dont want to have to flip through
> > > > pages when looking at reports online... they would much rather see the
> > > > entire
> > > > report and just keep scrolling... however when printing you would want the
> > > > page-breaks to still happen (naturall).
> > > >
> > > > Currently in Crystal using their report viewer control I simply removing
> > > > the
> > > > paging controls to get this effect iirc... i tried hiding the paging
> > > > control
> > > > in the RS report viewer control and i simply got a paged report with no
> > > > way
> > > > of advancing through the pages...
> > > >
> > > > Can someone please help me do this.
> > >
> > >
> > >|||Good advice! Ill do that from now on!
thanks
"Bruce L-C [MVP]" wrote:
> You beat me to it, that is what I was going to suggest.
> Also, here is a suggestion for development. Develop reports in RS 2005
> designer. The designer is better and you can quickly preview. Don't deploy
> the report. Then, rename the rdl file to rdlc and bring it into your
> project. This is how I do it. Much nicer development environment.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "thejez" <thejez@.discussions.microsoft.com> wrote in message
> news:1A2F6C1F-3453-412A-AC0E-363C18C89D08@.microsoft.com...
> > Bruce, i managed to just put the
> > <InteractiveHeight>0in</InteractiveHeight>
> > element into my RDLC file and it worked... so even though there isnt any
> > design-tim support for setting that value (at least that i saw) adding it
> > to
> > the source file did the trick.
> >
> > thanks!
> >
> > "thejez" wrote:
> >
> >> I think im posting this question to wrong place (but in all fairness its
> >> very
> >> confusing from MS) - I am using a LOCAL report in VS 2005 ReportViewer
> >> control - so i dont see the interactive options. I have RS 2005 but I am
> >> unable to use it because of the limitations of how i can poplate the data
> >> (I
> >> have to do pre-aggregation on the data before it gets to the dataset to
> >> get
> >> around the aggregate of aggregates lmiitation). So my only option was to
> >> use
> >> a local report where i could get the data from the DB pre-process it and
> >> then
> >> pop the dataset and then render the report... this a big pain i know but
> >> what
> >> can i do...
> >>
> >> so is there any way in the VS 2005 ReportViewer and a local Report file
> >> (rdlc). I have height set to 100% on everything and i even went to far
> >> as to
> >> define the report at 160in high... but alas the control seems to break at
> >> the
> >> same place ignoring everything i throw at it!
> >>
> >> :(
> >>
> >> "Bruce L-C [MVP]" wrote:
> >>
> >> > Here is the solution. This works only for RS 2005. RS 2005 introduced
> >> > interactivesize which consists of interactivewidth and
> >> > interactiveheight. To
> >> > have no page breaks set the interactiveheight to 0. This only works for
> >> > height, not width. You need to get to the report properties. You know
> >> > how
> >> > when you click on the body or a textbox you see the property page for
> >> > that
> >> > element on the right. If you click to the left of the ruler, that gets
> >> > the
> >> > report properties to show (the menu, report properties does allow
> >> > setting
> >> > this). Look for interactivesize, expand and then set interactiveheight
> >> > to 0.
> >> >
> >> > Not very discoverable but pretty cool.
> >> >
> >> >
> >> > --
> >> > Bruce Loehle-Conger
> >> > MVP SQL Server Reporting Services
> >> >
> >> > "thejez" <thejez@.discussions.microsoft.com> wrote in message
> >> > news:E4ABC9C1-43F0-4564-B248-7EE7D818CC0B@.microsoft.com...
> >> > > Hello, I would like to get my reports to be on one page when viewing
> >> > > in
> >> > > HTML
> >> > > in the report viewer. People generally dont want to have to flip
> >> > > through
> >> > > pages when looking at reports online... they would much rather see
> >> > > the
> >> > > entire
> >> > > report and just keep scrolling... however when printing you would
> >> > > want the
> >> > > page-breaks to still happen (naturall).
> >> > >
> >> > > Currently in Crystal using their report viewer control I simply
> >> > > removing
> >> > > the
> >> > > paging controls to get this effect iirc... i tried hiding the paging
> >> > > control
> >> > > in the RS report viewer control and i simply got a paged report with
> >> > > no
> >> > > way
> >> > > of advancing through the pages...
> >> > >
> >> > > Can someone please help me do this.
> >> >
> >> >
> >> >
>
>

How Do I Get Rid of Blank Pages in Reports?

Every report I've done puts a blank page in between each report page. The
page header is printed on all the blank pages.
I haven't specified any page breaks anywhere.
Is there a way to get rid of the blank pages?On Apr 20, 4:34 pm, Liz <L...@.discussions.microsoft.com> wrote:
> Every report I've done puts a blank page in between each report page. The
> page header is printed on all the blank pages.
> I haven't specified any page breaks anywhere.
> Is there a way to get rid of the blank pages?
One way to alleviate this, in some cases, would be to enclose your
controls (i.e., tables/matrices/textboxes, etc) in a list or rectangle
control and make sure that 'Fit table on one page if possible' is
selected for the table/matrix controls (where applicable). Hope this
is helpful.
Regards,
Enrique Martinez
Sr. Software Consultant|||On Apr 21, 7:34 am, Liz <L...@.discussions.microsoft.com> wrote:
> Every report I've done puts a blank page in between each report page. The
> page header is printed on all the blank pages.
> I haven't specified any page breaks anywhere.
> Is there a way to get rid of the blank pages?
The most likely cause for this is either:
* your report items stretch too wide (beyond the page dimensions) and
are causing extra pages to be printed
* but more likely; the dimensions for your report are not the same as
your printing paper dimensions. Always check the width of your report
body + margins is about equal to the size of your printing paper (e.g.
for A4, your report body should be around 19.5cm wide, and left and
right margins 0.75cm each)|||Well, I'm afraid none of this works.
I put my table in a rectangle and specified to fit on one page when
possible. My report size is not larger than the page size. Nothing is
running off the sides or bottom. The whole report prints; I just get an
extra page between each report page.
I've messed with all of my margins making them bigger then smaller but that
doesn't make any difference either.
If you have any other ideas, I'm all ears. This is going to be a huge waste
of paper.
Thanks,
Liz
"Tokes" wrote:
> On Apr 21, 7:34 am, Liz <L...@.discussions.microsoft.com> wrote:
> > Every report I've done puts a blank page in between each report page. The
> > page header is printed on all the blank pages.
> >
> > I haven't specified any page breaks anywhere.
> >
> > Is there a way to get rid of the blank pages?
> The most likely cause for this is either:
> * your report items stretch too wide (beyond the page dimensions) and
> are causing extra pages to be printed
> * but more likely; the dimensions for your report are not the same as
> your printing paper dimensions. Always check the width of your report
> body + margins is about equal to the size of your printing paper (e.g.
> for A4, your report body should be around 19.5cm wide, and left and
> right margins 0.75cm each)
>|||On Apr 23, 11:56 pm, Liz <L...@.discussions.microsoft.com> wrote:
> Well, I'm afraid none of this works.
> I put my table in a rectangle and specified to fit on one page when
> possible. My report size is not larger than the page size. Nothing is
> running off the sides or bottom. The whole report prints; I just get an
> extra page between each report page.
> I've messed with all of my margins making them bigger then smaller but that
> doesn't make any difference either.
> If you have any other ideas, I'm all ears. This is going to be a huge waste
> of paper.
> Thanks,
> Liz
I'm fairly sure its to do with the size of your report body being
bigger than the paper size (width or height); try setting the report
body size to the absolute minimum it needs to be (i.e. the EXACT size
of the table in the design view) and see if that makes a difference
> "Tokes" wrote:
> > On Apr 21, 7:34 am, Liz <L...@.discussions.microsoft.com> wrote:
> > > Every report I've done puts a blank page in between each report page. The
> > > page header is printed on all the blank pages.
> > > I haven't specified any page breaks anywhere.
> > > Is there a way to get rid of the blank pages?
> > The most likely cause for this is either:
> > * your report items stretch too wide (beyond the page dimensions) and
> > are causing extra pages to be printed
> > * but more likely; the dimensions for your report are not the same as
> > your printing paper dimensions. Always check the width of your report
> > body + margins is about equal to the size of your printing paper (e.g.
> > for A4, your report body should be around 19.5cm wide, and left and
> > right margins 0.75cm each)|||I did all of the above; nothing worked. My entire report width was 10 inches
for a landscape report.
Finally, changing all my margins to zero fixed the problem.
"Tokes" wrote:
> On Apr 23, 11:56 pm, Liz <L...@.discussions.microsoft.com> wrote:
> > Well, I'm afraid none of this works.
> >
> > I put my table in a rectangle and specified to fit on one page when
> > possible. My report size is not larger than the page size. Nothing is
> > running off the sides or bottom. The whole report prints; I just get an
> > extra page between each report page.
> >
> > I've messed with all of my margins making them bigger then smaller but that
> > doesn't make any difference either.
> >
> > If you have any other ideas, I'm all ears. This is going to be a huge waste
> > of paper.
> >
> > Thanks,
> > Liz
> I'm fairly sure its to do with the size of your report body being
> bigger than the paper size (width or height); try setting the report
> body size to the absolute minimum it needs to be (i.e. the EXACT size
> of the table in the design view) and see if that makes a difference
> >
> > "Tokes" wrote:
> > > On Apr 21, 7:34 am, Liz <L...@.discussions.microsoft.com> wrote:
> > > > Every report I've done puts a blank page in between each report page. The
> > > > page header is printed on all the blank pages.
> >
> > > > I haven't specified any page breaks anywhere.
> >
> > > > Is there a way to get rid of the blank pages?
> >
> > > The most likely cause for this is either:
> > > * your report items stretch too wide (beyond the page dimensions) and
> > > are causing extra pages to be printed
> > > * but more likely; the dimensions for your report are not the same as
> > > your printing paper dimensions. Always check the width of your report
> > > body + margins is about equal to the size of your printing paper (e.g.
> > > for A4, your report body should be around 19.5cm wide, and left and
> > > right margins 0.75cm each)
>
>|||>I did all of the above; nothing worked. My entire report width was 10
>inches
> for a landscape report.
> Finally, changing all my margins to zero fixed the problem.
You had a 10 inch width (not sure of height) and you had margins. OK. What
is your printer's printable page area?
IOW: I'm pretty sure you were given correct advice here. Your height +
your top and bottom margin were > your printer's printable page height..
versus actual paper page height...
>L<
"Liz" <Liz@.discussions.microsoft.com> wrote in message
news:F1707B09-ABE5-4CB8-BE2E-FA8436DE5FA6@.microsoft.com...
>I did all of the above; nothing worked. My entire report width was 10
>inches
> for a landscape report.
> Finally, changing all my margins to zero fixed the problem.
> "Tokes" wrote:
>> On Apr 23, 11:56 pm, Liz <L...@.discussions.microsoft.com> wrote:
>> > Well, I'm afraid none of this works.
>> >
>> > I put my table in a rectangle and specified to fit on one page when
>> > possible. My report size is not larger than the page size. Nothing is
>> > running off the sides or bottom. The whole report prints; I just get
>> > an
>> > extra page between each report page.
>> >
>> > I've messed with all of my margins making them bigger then smaller but
>> > that
>> > doesn't make any difference either.
>> >
>> > If you have any other ideas, I'm all ears. This is going to be a huge
>> > waste
>> > of paper.
>> >
>> > Thanks,
>> > Liz
>> I'm fairly sure its to do with the size of your report body being
>> bigger than the paper size (width or height); try setting the report
>> body size to the absolute minimum it needs to be (i.e. the EXACT size
>> of the table in the design view) and see if that makes a difference
>> >
>> > "Tokes" wrote:
>> > > On Apr 21, 7:34 am, Liz <L...@.discussions.microsoft.com> wrote:
>> > > > Every report I've done puts a blank page in between each report
>> > > > page. The
>> > > > page header is printed on all the blank pages.
>> >
>> > > > I haven't specified any page breaks anywhere.
>> >
>> > > > Is there a way to get rid of the blank pages?
>> >
>> > > The most likely cause for this is either:
>> > > * your report items stretch too wide (beyond the page dimensions) and
>> > > are causing extra pages to be printed
>> > > * but more likely; the dimensions for your report are not the same as
>> > > your printing paper dimensions. Always check the width of your report
>> > > body + margins is about equal to the size of your printing paper
>> > > (e.g.
>> > > for A4, your report body should be around 19.5cm wide, and left and
>> > > right margins 0.75cm each)
>>

Monday, March 12, 2012

How do I get a procedure OUTPUT-parameter...

In my ASP.NET page I use a stored procedure that have a parameter declared as OUTPUT...
however...I do not know how to get this OUTPUT to be stored in a ASP.NET-variable...

this is the sp:

CREATE PROCEDURE spInsertNews
@.uidArticleId uniqueidentifier OUTPUT,
@.strHeading nvarchar(300),
@.strAbstract nvarchar(600),
@.strText nvarchar(4000),
@.dtDate datetime,
@.dtDateStart datetime,
@.dtDateStop datetime,
@.strAuthor nvarchar(200),
@.strAuthorEmail nvarchar(200),
@.strKeywords nvarchar(400)
AS
SET @.uidArticleId = newid()
INSERT INTO tblArticles
VALUES(@.uidArticleId ,@.strHeading,@.strAbstract,@.strText,@.dtDate,@.dtDateStart,@.dtDateStop,@.strAuthor,@.strAuthorEmail,@.strKeywords)

my asp code is something like this:

...
SqlCommand sqlcmdInsertNewsArticle = new SqlCommand(insertCmd, sqlconCon);

sqlcmdInsertNewsArticle.Parameters.Add(new SqlParameter("@.strHeading", SqlDbType.NVarChar, 300));
sqlcmdInsertNewsArticle.Parameters["@.strHeading"].Value = strHeading.Text;

sqlcmdInsertNewsArticle.Parameters.Add(new SqlParameter("@.strAbstract", SqlDbType.NVarChar, 600));
sqlcmdInsertNewsArticle.Parameters["@.strAbstract"].Value = strAbstract.Text;

sqlcmdInsertNewsArticle.Parameters.Add(new SqlParameter("@.strText", SqlDbType.NVarChar, 4000));
sqlcmdInsertNewsArticle.Parameters["@.strText"].Value = strText.Text;

...

sqlcmdInsertNewsArticle.Connection.Open();
sqlcmdInsertNewsArticle.ExecuteNonQuery();
sqlcmdInsertNewsArticle.Connection.Close();

How do I do if I want to catch the OUTPUT-parameter (@.uidArticleId)?

anyone?Start by defining another parameter in the Parameters collection:

sqlcmdInsertNewsArticle.Parameters.Add(new SqlParameter("@.uidArticleId", SqlDbType.UniqueIdentifier));
sqlcmdInsertNewsArticle.Parameters["@.uidArticleId"].Direction = ParameterDirection.Output;

Then, after you call ExecuteNonQuery, grab the value of that parameter:

Dim id as GUID = sqlcmdInsertNewsArticle.Parameters["@.uidArticleId"].Value;

I didn't test this code so you may need to tweak it, but that's the idea.

Don|||thanks... that would probably work if I just could get the %#&¤ connection to work... :)

(see: http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=553656 )

Sunday, February 19, 2012

How do I display a SSRS report in a web page?

I have developed a web site with Visual Web Developer 2005 Express, and SQL Server 2005. After 18 months I have a reasonable understanding of VB.net and SQL Server programming, but I am a complete newbie with Sql Server Reporting Services. SSRS seems to be pretty easy and mostly intuitive for the simple tasks that I've tried, although so far I haven't progressed beyond developing a report and displaying it in the preview tab.

I am now trying to display my first report from within my web site, so that clicking a button on the prior page displays the report, presumably with Response.Redirect("~/Reportpage?Query") where "ReportPage" is the url of a page to display the report, and Query gives the report parameters in the usual style of a request query. The target page could either be a normal .aspx page with the report embedded in the design, perhaps as an IFrame, or it could be a page produced directly by SSRS. I'd prefer the .aspx approach as it would allow me to use my usual master page with its standard on-entry logic, unless the direct-SSRS approach is much easier.

On clicking around in the HELP trying to find how to do this, the HELP seems to imply that I should embed a reportviewer control in my page? Is this right? If yes, where do I get this from? It is not in the VWD 2005 toolbox, but perhaps I have to import it. I am using SSRS within Visual Studio 2005: have I reached the point where I have to move beyond VWD 2005 Express and upgrade to the full Visual Studio?

Hi,

You can either give the report url, but the best way is to use Report viewer control. Its a microsoft inbuilt control. Include the below name space b4 using it

<%@.RegisterAssembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"Namespace="Microsoft.Reporting.WebForms"TagPrefix="rsweb" %>

Hope this is helpful to u

|||

OK, I've added this into my web page, so that it now starts: -
<%@. Page Language="VB" MasterPageFile="~/GDBMaster_P.master" AutoEventWireup="false"
CodeFile="GDB_PR2des.aspx.vb" Inherits="UploadedDocs_GDB2" Title="GDB2" %>
<%@. Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

and continues with the XML describing the page.

Now what? How do I use the report viewer control? Do I need to add it to the toolbox, or do I code something like "<rsweb parameters/> " into the source of my page.

If toolbox, how do I add it? If source, where do I find out what the properties are?"

|||

Hi,

You can follow the steps below to add your report viewer.

In Solution Explorer, right-click Default.aspx, select View Designer.

Open the Toolbox window. From the Data group, drag a ReportViewer control onto the page.

If it is not already open, open the ReportViewer Tasks smart tag panel by clicking the triangle in the upper right corner of the ReportViewer control on the Web page. In the Choose Report box, select the fully qualified file name for Report.rdlc.

When you select a report, instances of data sources used in the report are created automatically. Code is generated to instantiate each DataTable (and its DataSet container) and an ObjectDataSource control corresponding to each data source used in the report. This data source control is configured automatically.

For more information, see:
http://msdn2.microsoft.com/en-us/library/ms252123(VS.80).aspx

Thanks.

|||

Thank you for your reply, but there is still a problem. Your reply describes exactly the process that I had expected, and so I had searched the toolbox for a ReportViewer control before I posted this question (see my first post of this thread). I had expected that "Data" would be the most likely group, but I checked them all anyway. My data group contains only these controls: -
Pointer
Gridview
DataList
DetailsList
Formview
Repeater
SQLDataSource
AccessDataSource
ObjectDataSource
XMLDataSource
SiteMapDataSource

So the key question is, How do I get a reportviewer control into this group?

Regards, Robert

|||

Hi, If u could not able to find reportviewer in your toolbox add the following references

Microsoft.ReportViewer.Common.dll

Microsoft.ReportViewer.WebForms.dll

u can find these dlls in the path

C:\Program Files\Microsoft Visual Studio 8\ReportViewer

Then u right click the tool box and select new items to add in it. Add Report Viewer (Name Space Microsoft.Reporting.Webforms).

U can c the reportviewer control in ur toolbox now

|||

Thank you! That's put the ReportViewer into the toolbox, and now my test page has a ReportViewer control.

Next problem: selecting the report. This is not going smoothly. When I open the smart tag, options are "Choose Report" and "Design a new report".

If I click "Choose Report" the only option is <Server Report> so I select that. The ReportserverURL appears as http://localhost/reportserver, and I am asked to enter the report name.

I enter C:\Documents and Settings\Robertb.ROBERTB\My Documents\Visual Studio 2005\Projects\GDBReports\GDBReports\GDBReport1.rdl (Nai-Dong Jin's post said to select "report1.rdlc", but there are no .rdlc files).

Now I test my web page, by clicking on

Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'. The request failed with the error message: --
  • Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'. The request failed with the error message: -- <html> <head> <title> SQL Server Reporting Services </title><meta name="Generator" content="Microsoft SQL Server Reporting Services 9.00.3042.00" /> <meta name="HTTP Status" content="500" /> <meta name="ProductLocaleID" content="9" /> <meta name="CountryLocaleID" content="1033" /> <meta name="StackTrace" content=" at Microsoft.ReportingServices.Library.ConnectionManager.OpenConnection() at Microsoft.ReportingServices.Library.Global.get_SharePointIntegratedFlagFromCatalog() at Microsoft.ReportingServices.WebServer.Global.RunOnlyOnceStartReportServer() at Microsoft.ReportingServices.WebServer.Global.StartApp() at Microsoft.ReportingServices.WebServer.Global.Application_BeginRequest(Object sender, EventArgs e)" /> <style> BODY {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE: 8pt; COLOR:black} H1 {FONT-FAMILY:Verdana; FONT-WEIGHT:700; FONT-SIZE:15pt} LI {FONT-FAMILY:Verdana; FONT-WEIGHT:normal; FONT-SIZE:8pt; DISPLAY:inline} .ProductInfo {FONT-FAMILY:Verdana; FONT-WEIGHT:bold; FONT-SIZE: 8pt; COLOR:gray} A:link {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#3366CC; TEXT-DECORATION:none} A:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#FF3300; TEXT-DECORATION:underline} A:visited {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; COLOR:#3366CC; TEXT-DECORATION:none} A:visited:hover {FONT-SIZE: 8pt; FONT-FAMILY:Verdana; color:#FF3300; TEXT-DECORATION:underline} </style> </head><body bgcolor="white"> <h1> Reporting Services Error<hr width="100%" size="1" color="silver" /> </h1><ul> <li>The report server cannot open a connection to the report server database. A connection to the database is required for all requests and processing. (rsReportServerDatabaseUnavailable) <a href="http://links.10026.com/?link=http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&EvtID=rsReportServerDatabaseUnavailable&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=9.00.3042.00" target="_blank">Get Online Help</a></li><ul> <li>An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)</li> </ul> </ul><hr width="100%" size="1" color="silver" /><span class="ProductInfo">SQL Server Reporting Services</span> </body> </html> --.|||

    Hi,

    and I am asked to enter the report name. I enter C:\Documents and Settings\Robertb.ROBERTB\My Documents\Visual Studio 2005\Projects\GDBReports\GDBReports\GDBReport1.rdl (Nai-Dong Jin's post said to select "report1.rdlc", but there are no .rdlc files).

    Here, what the system is asking your to enter a rdlc file. This file must be created in your website application by adding new items in your previous steps. Now the following are the whole steps for you, which comes from that link in my previous post:

    From the Website menu, select Add New Item.

    From the Add New Item dialog, select the Report template, enter a name for the report file, and then click Add. This creates a report definition file (the default is Report.rdlc), launches the Report Designer, and displays the Website Data Sources pane.

    Thanks.

    |||

    How do I add the report template to the "add new item" dialog?

    Thanks, Robert.

    |||

    Hi,

    Let's see the whole procedure, our aim is to create a report for a Microsoft Visual Studio 2005 ASP.NET Web site and add a ReportViewer control to a Web page so users can view the report.

    1. First, you should create a new Web site, and create a default.aspx page, switch it to the design mode.

    2. You may define a data connection and DataTable by adding a DataSet.

    3. It's an important step Design the report.

    1). From the Website menu, select Add New Item.

    2). From the Add New Item dialog, select the Report template, enter a name for the report file, and then click Add. This creates a report definition file (the default is Report.rdlc), launches the Report Designer, and displays the Website Data Sources pane.

    3). Open the Toolbox. Click on a textbox and then on the report design surface.

    4). Enter a report title in the textbox: # of Employees per Shift per Dept. Expand the textbox if necessary.

    5). From the Toolbox, drag a Matrix report item onto the report below the textbox. The dotted white background is your report page. To adjust the matrix location on the page, click the left corner to select it, and drag or use arrow keys to move the item as needed.

    6). From the Website Data Sources window, expand the DataTable1 node until you see the columns from your query. Drag Dept onto the Rows textbox in the first column, second row of the matrix.

    7). Drag Shift onto the Columns textbox in the second column, first row of the matrix. While the textbox is selected, in the Properties window, set the TextAlign property to Right. Click in the textbox to activate the Report Formatting toolbar, and click the Bold button.

    8). Select the matrix by clicking anywhere in the matrix. Right-click and select the matrix by name (the default is matrix1). An outline will appear around the matrix report item. Right-click the outline and select Properties. Check that the title of the dialog that opens is Matrix Properties.

    9). Click the Groups tab. In the Columns section, click Edit.

    10). In the Sorting and Grouping dialog, click the Sorting tab.

    11). Click in the first box under Expression to activate the textbox. From the drop-down list, choose =Fields!Dept.Value. This ensures the report data will be sorted by Department name. Click OK.

    12). Click OK to close the Matrix Properties dialog.

    13). From the Website Data Sources window, drag the EmployeeID field onto the Data textbox in the second column, second row of the matrix. Right-click this textbox and select Expression.

    14). Edit the default Sum aggregate function and change it to Count. Click OK.

    15). Click OK to close the Textbox Properties dialog.

    16). On the File menu, select Save All.

    4. The last step: Add a ReportViewer control to the application

    1). In Solution Explorer, right-click Default.aspx, select View Designer.

    2). Open the Toolbox window. From the Data group, drag a ReportViewer control onto the page.

    3). If it is not already open, open the ReportViewer Tasks smart tag panel by clicking the triangle in the upper right corner of the ReportViewer control on the Web page. In the Choose Report box, select the fully qualified file name for Report.rdlc.

    Thanks.

    |||

    I have not created a new website, as everything should work the same way on a new page within my existing website. Apart from that difference, I have been trying to follow the procedure above. Where I'm stuck: -

    From the Add New Item dialog,select the Report template, enter a namefor the report file, and then click Add.

    There is no report template within my Add New Item dialog. In my previous post I asked how to add it. I expect that once I have this, it will be easy, but without it I'm stuck.

    Thanks, Robert

  •