Friday, March 30, 2012
Parameter Problem
RS Newbie here.
I have created a report with a parameter that has an ALL value that should
display all records when that particular parameter is selected.
Here is the code for my dataset:
SELECT dbo.Locations.Location, dbo.BuilderWO.LotNum,
dbo.BuilderWO.WONum, dbo.BuilderWO.BFName, dbo.BuilderWO.BLName,
dbo.BuilderWO.Address,
dbo.BuilderWO.City, dbo.BuilderWO.State,
dbo.BuilderWO.Zip, dbo.BuilderWO.Phone, dbo.BuilderWO.CloseDate,
dbo.BuilderWO.WalkDate,
dbo.BuilderWO.ItemCount, dbo.BuilderWO.AnticCompDate,
dbo.Employees.LName, dbo.Status.Status_Status
FROM dbo.Status RIGHT OUTER JOIN
dbo.BuilderWO ON dbo.Status.Status_StatusID = dbo.BuilderWO.Status LEFT OUTER JOIN
dbo.Locations ON dbo.BuilderWO.LocationID = dbo.Locations.LocationID LEFT OUTER JOIN
dbo.Employees ON dbo.BuilderWO.TSHRep1 = dbo.Employees.EmployeeID
WHERE (dbo.Locations.Community = 1) AND (dbo.Locations.LocationID = @.location)
Here is the code for the parameter:
SELECT LocationID, Location AS Community FROM Locations WHERE Community = 1
UNION SELECT
-1, 'ALL'
My problem is that when I select ALL, no records are returned. The report
runs but just returns the Page Header items. If I select any other
location, the report runs fine.
It seems like I'm missing something. Any advice would be appreciated.
ThanksWHERE (dbo.Locations.Community = 1) AND (dbo.Locations.LocationID =@.location or @.location = -1)
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Brennan" <Brennan@.discussions.microsoft.com> wrote in message
news:2D2E4216-C840-4DBE-828E-1CB494C08272@.microsoft.com...
> Hello:
> RS Newbie here.
> I have created a report with a parameter that has an ALL value that should
> display all records when that particular parameter is selected.
> Here is the code for my dataset:
> SELECT dbo.Locations.Location, dbo.BuilderWO.LotNum,
> dbo.BuilderWO.WONum, dbo.BuilderWO.BFName, dbo.BuilderWO.BLName,
> dbo.BuilderWO.Address,
> dbo.BuilderWO.City, dbo.BuilderWO.State,
> dbo.BuilderWO.Zip, dbo.BuilderWO.Phone, dbo.BuilderWO.CloseDate,
> dbo.BuilderWO.WalkDate,
> dbo.BuilderWO.ItemCount, dbo.BuilderWO.AnticCompDate,
> dbo.Employees.LName, dbo.Status.Status_Status
> FROM dbo.Status RIGHT OUTER JOIN
> dbo.BuilderWO ON dbo.Status.Status_StatusID => dbo.BuilderWO.Status LEFT OUTER JOIN
> dbo.Locations ON dbo.BuilderWO.LocationID => dbo.Locations.LocationID LEFT OUTER JOIN
> dbo.Employees ON dbo.BuilderWO.TSHRep1 => dbo.Employees.EmployeeID
> WHERE (dbo.Locations.Community = 1) AND (dbo.Locations.LocationID => @.location)
>
> Here is the code for the parameter:
> SELECT LocationID, Location AS Community FROM Locations WHERE Community => 1
> UNION SELECT
> -1, 'ALL'
> My problem is that when I select ALL, no records are returned. The report
> runs but just returns the Page Header items. If I select any other
> location, the report runs fine.
> It seems like I'm missing something. Any advice would be appreciated.
> Thanks
>
>|||Great!
Thanks that worked.
"Bruce L-C [MVP]" wrote:
> WHERE (dbo.Locations.Community = 1) AND (dbo.Locations.LocationID => @.location or @.location = -1)
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Brennan" <Brennan@.discussions.microsoft.com> wrote in message
> news:2D2E4216-C840-4DBE-828E-1CB494C08272@.microsoft.com...
> > Hello:
> >
> > RS Newbie here.
> >
> > I have created a report with a parameter that has an ALL value that should
> > display all records when that particular parameter is selected.
> >
> > Here is the code for my dataset:
> >
> > SELECT dbo.Locations.Location, dbo.BuilderWO.LotNum,
> > dbo.BuilderWO.WONum, dbo.BuilderWO.BFName, dbo.BuilderWO.BLName,
> > dbo.BuilderWO.Address,
> > dbo.BuilderWO.City, dbo.BuilderWO.State,
> > dbo.BuilderWO.Zip, dbo.BuilderWO.Phone, dbo.BuilderWO.CloseDate,
> > dbo.BuilderWO.WalkDate,
> > dbo.BuilderWO.ItemCount, dbo.BuilderWO.AnticCompDate,
> > dbo.Employees.LName, dbo.Status.Status_Status
> > FROM dbo.Status RIGHT OUTER JOIN
> > dbo.BuilderWO ON dbo.Status.Status_StatusID => > dbo.BuilderWO.Status LEFT OUTER JOIN
> > dbo.Locations ON dbo.BuilderWO.LocationID => > dbo.Locations.LocationID LEFT OUTER JOIN
> > dbo.Employees ON dbo.BuilderWO.TSHRep1 => > dbo.Employees.EmployeeID
> > WHERE (dbo.Locations.Community = 1) AND (dbo.Locations.LocationID => > @.location)
> >
> >
> > Here is the code for the parameter:
> >
> > SELECT LocationID, Location AS Community FROM Locations WHERE Community => > 1
> > UNION SELECT
> > -1, 'ALL'
> >
> > My problem is that when I select ALL, no records are returned. The report
> > runs but just returns the Page Header items. If I select any other
> > location, the report runs fine.
> >
> > It seems like I'm missing something. Any advice would be appreciated.
> >
> > Thanks
> >
> >
> >
> >
>
>
Tuesday, March 20, 2012
Paper Based Reports Support
I am a newbie to SQL Reporting Services. I am trying to evaluate whether to
use SQL reporting services as opposed to crystal reports. I want to create
paper based reports as well as web based reports. Is it fair to say that
SQL Reporting Services focuses more on web based reports than on paper based
reports? I know that it can export reports in an Excel and PDF format but
that seems to be the full extent of true paper based reporting. Am I
missing something? Will there be more support for paper based reports in
the future?
Thanks,
VaughnDepends on what you mean by paper based reports. RS is a format independent
reporting solution. The report is specified via the RDL (if you look at the
RDL it is an xml file). The report definition says how the data should be
formated. How it is formated (rendered) depends on what you ask RS to do.
The default is HTML but that is just the default and really it is just one
of the rendering formats. When you see the export all that is happening is
RS is being asked to run the report but using a different rendering format.
PDF is the format that is used for printing today. With SP2 there will be a
print button on the toolbar which will provide client side printing so you
do not have to go through exporting. My guess (only a guess, no inside
knowledge) is that we will see SP2 sometime first quarter next year.
One thing that I do consider paper based that they do not yet handle well is
the whole issue of labels. For instance being able to easily design a report
for particular labels. In MS Access they have a wizard for this. The wizard
really doesn't do anything that couldn't be done in the GUI designer but it
makes it very easy to do so. It would be nice to have something like this in
RS.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Vaughn" <vhaybittle@.mweb.co.za> wrote in message
news:%23Ce6mq51EHA.1152@.TK2MSFTNGP14.phx.gbl...
> Hi,
> I am a newbie to SQL Reporting Services. I am trying to evaluate whether
to
> use SQL reporting services as opposed to crystal reports. I want to
create
> paper based reports as well as web based reports. Is it fair to say that
> SQL Reporting Services focuses more on web based reports than on paper
based
> reports? I know that it can export reports in an Excel and PDF format but
> that seems to be the full extent of true paper based reporting. Am I
> missing something? Will there be more support for paper based reports in
> the future?
> Thanks,
> Vaughn
>
Wednesday, March 7, 2012
Pagination in SSRS 2000
Hi,
I am newbie to SSRS and am currently using RS 2000.
What i came across while developing reports is :
Reports when rendered in Web-format were split in a number of pages if the number of rows in the table used for displaying were more than could be contained in a single page's height.
However, in the Layout section when i gave some (any) expression for the visibility of the table depending on some condition this paging got disabled, i.e. the entire report started coming in one page irrespective of how many ever rows were displayed. They all started getting displayed in a single page with a vertical scroll.
I do not understand what has the table's visibility expression got to do with displaying report in a single page or multiple.
Please comment
Unfortunately, since RS (2000 and 2005) doesn't support conditional page breaks any conditional expression supresses the page breaks as well. Conditional page breaks are on the wish list for the next release.|||But here i was not giving any conditional page breaks.
Do you mean to say that conditional visibility expression of the Table object suppressed the default page breaks?
Has anyone else come across this?
|||Yes, I know that it doesn't make much sense but this is exactly what's happening.Saturday, February 25, 2012
Page Size as a Report Parameter?
parameter?
Thanks!
MichaelNo you can't. When wondering what you can set dynamically you can tell by
seeing if it accepts an expression. This does not accept an expression so
there is no way to set it with a report parameter.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"moflaherty" <moflaherty@.discussions.microsoft.com> wrote in message
news:DF6FE8B2-5776-4925-9509-4C75C8446E4A@.microsoft.com...
> This might be a newbie question, but can the page size be set as a report
> parameter?
> Thanks!
> Michael|||Thanks!
My dilema is that I need to be able to allow the user to change the page
size/target printer in IE. I have that all figured out (what a pain getting
page/preview settings), but I now need to control RS from IE. The only way I
see how, based on your comments, is to dynamically create the RDL on the fly.
I am already exploring that at the moment for the reporting engine anyway,
but it would be nice NOT to have to generate RDL files every time the page
settings are changed in IE.
On a side note, I was also thinking of having RS generate the HTML minus
page breaks and handle the printer/page settings in IE against the raw HTML,
but I don't see a clean way to get the table header rows to repeat. (it
appears I would also have to create my own handler for RS.)
Converging IE and RS is a pain right now, but it will be a great solution if
I can get this last piece figured out. If you know of any other direction to
take on this, I would appreciate your comments.
Thanks again!
"Bruce L-C [MVP]" wrote:
> No you can't. When wondering what you can set dynamically you can tell by
> seeing if it accepts an expression. This does not accept an expression so
> there is no way to set it with a report parameter.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "moflaherty" <moflaherty@.discussions.microsoft.com> wrote in message
> news:DF6FE8B2-5776-4925-9509-4C75C8446E4A@.microsoft.com...
> > This might be a newbie question, but can the page size be set as a report
> > parameter?
> >
> > Thanks!
> > Michael
>
>|||I would not make any effort on printing until you see how acceptable the
local printing support with SP2 (out mid month) is.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"moflaherty" <moflaherty@.discussions.microsoft.com> wrote in message
news:98A13C00-AB0A-4770-8184-619D1BD16DFD@.microsoft.com...
> Thanks!
> My dilema is that I need to be able to allow the user to change the page
> size/target printer in IE. I have that all figured out (what a pain
getting
> page/preview settings), but I now need to control RS from IE. The only way
I
> see how, based on your comments, is to dynamically create the RDL on the
fly.
> I am already exploring that at the moment for the reporting engine anyway,
> but it would be nice NOT to have to generate RDL files every time the page
> settings are changed in IE.
> On a side note, I was also thinking of having RS generate the HTML minus
> page breaks and handle the printer/page settings in IE against the raw
HTML,
> but I don't see a clean way to get the table header rows to repeat. (it
> appears I would also have to create my own handler for RS.)
> Converging IE and RS is a pain right now, but it will be a great solution
if
> I can get this last piece figured out. If you know of any other direction
to
> take on this, I would appreciate your comments.
> Thanks again!
> "Bruce L-C [MVP]" wrote:
> > No you can't. When wondering what you can set dynamically you can tell
by
> > seeing if it accepts an expression. This does not accept an expression
so
> > there is no way to set it with a report parameter.
> >
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> > "moflaherty" <moflaherty@.discussions.microsoft.com> wrote in message
> > news:DF6FE8B2-5776-4925-9509-4C75C8446E4A@.microsoft.com...
> > > This might be a newbie question, but can the page size be set as a
report
> > > parameter?
> > >
> > > Thanks!
> > > Michael
> >
> >
> >|||Thanks! I was not aware they were addressing this topic in SP2. I will wait
for sure.
"Bruce L-C [MVP]" wrote:
> I would not make any effort on printing until you see how acceptable the
> local printing support with SP2 (out mid month) is.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "moflaherty" <moflaherty@.discussions.microsoft.com> wrote in message
> news:98A13C00-AB0A-4770-8184-619D1BD16DFD@.microsoft.com...
> > Thanks!
> >
> > My dilema is that I need to be able to allow the user to change the page
> > size/target printer in IE. I have that all figured out (what a pain
> getting
> > page/preview settings), but I now need to control RS from IE. The only way
> I
> > see how, based on your comments, is to dynamically create the RDL on the
> fly.
> > I am already exploring that at the moment for the reporting engine anyway,
> > but it would be nice NOT to have to generate RDL files every time the page
> > settings are changed in IE.
> >
> > On a side note, I was also thinking of having RS generate the HTML minus
> > page breaks and handle the printer/page settings in IE against the raw
> HTML,
> > but I don't see a clean way to get the table header rows to repeat. (it
> > appears I would also have to create my own handler for RS.)
> >
> > Converging IE and RS is a pain right now, but it will be a great solution
> if
> > I can get this last piece figured out. If you know of any other direction
> to
> > take on this, I would appreciate your comments.
> >
> > Thanks again!
> >
> > "Bruce L-C [MVP]" wrote:
> >
> > > No you can't. When wondering what you can set dynamically you can tell
> by
> > > seeing if it accepts an expression. This does not accept an expression
> so
> > > there is no way to set it with a report parameter.
> > >
> > >
> > > --
> > > Bruce Loehle-Conger
> > > MVP SQL Server Reporting Services
> > >
> > > "moflaherty" <moflaherty@.discussions.microsoft.com> wrote in message
> > > news:DF6FE8B2-5776-4925-9509-4C75C8446E4A@.microsoft.com...
> > > > This might be a newbie question, but can the page size be set as a
> report
> > > > parameter?
> > > >
> > > > Thanks!
> > > > Michael
> > >
> > >
> > >
>
>|||Hey, I went looking for the beta signup and it was already removed (I beta
Office Small Business.) Is there a detailed feature list somewhere for this?
"Bruce L-C [MVP]" wrote:
> I would not make any effort on printing until you see how acceptable the
> local printing support with SP2 (out mid month) is.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "moflaherty" <moflaherty@.discussions.microsoft.com> wrote in message
> news:98A13C00-AB0A-4770-8184-619D1BD16DFD@.microsoft.com...
> > Thanks!
> >
> > My dilema is that I need to be able to allow the user to change the page
> > size/target printer in IE. I have that all figured out (what a pain
> getting
> > page/preview settings), but I now need to control RS from IE. The only way
> I
> > see how, based on your comments, is to dynamically create the RDL on the
> fly.
> > I am already exploring that at the moment for the reporting engine anyway,
> > but it would be nice NOT to have to generate RDL files every time the page
> > settings are changed in IE.
> >
> > On a side note, I was also thinking of having RS generate the HTML minus
> > page breaks and handle the printer/page settings in IE against the raw
> HTML,
> > but I don't see a clean way to get the table header rows to repeat. (it
> > appears I would also have to create my own handler for RS.)
> >
> > Converging IE and RS is a pain right now, but it will be a great solution
> if
> > I can get this last piece figured out. If you know of any other direction
> to
> > take on this, I would appreciate your comments.
> >
> > Thanks again!
> >
> > "Bruce L-C [MVP]" wrote:
> >
> > > No you can't. When wondering what you can set dynamically you can tell
> by
> > > seeing if it accepts an expression. This does not accept an expression
> so
> > > there is no way to set it with a report parameter.
> > >
> > >
> > > --
> > > Bruce Loehle-Conger
> > > MVP SQL Server Reporting Services
> > >
> > > "moflaherty" <moflaherty@.discussions.microsoft.com> wrote in message
> > > news:DF6FE8B2-5776-4925-9509-4C75C8446E4A@.microsoft.com...
> > > > This might be a newbie question, but can the page size be set as a
> report
> > > > parameter?
> > > >
> > > > Thanks!
> > > > Michael
> > >
> > >
> > >
>
>|||The beta is closed because it is so close to release.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"moflaherty" <moflaherty@.discussions.microsoft.com> wrote in message
news:476739F9-95C9-4AC0-9629-2E715710FB54@.microsoft.com...
> Hey, I went looking for the beta signup and it was already removed (I beta
> Office Small Business.) Is there a detailed feature list somewhere for
this?
> "Bruce L-C [MVP]" wrote:
> > I would not make any effort on printing until you see how acceptable the
> > local printing support with SP2 (out mid month) is.
> >
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> > "moflaherty" <moflaherty@.discussions.microsoft.com> wrote in message
> > news:98A13C00-AB0A-4770-8184-619D1BD16DFD@.microsoft.com...
> > > Thanks!
> > >
> > > My dilema is that I need to be able to allow the user to change the
page
> > > size/target printer in IE. I have that all figured out (what a pain
> > getting
> > > page/preview settings), but I now need to control RS from IE. The only
way
> > I
> > > see how, based on your comments, is to dynamically create the RDL on
the
> > fly.
> > > I am already exploring that at the moment for the reporting engine
anyway,
> > > but it would be nice NOT to have to generate RDL files every time the
page
> > > settings are changed in IE.
> > >
> > > On a side note, I was also thinking of having RS generate the HTML
minus
> > > page breaks and handle the printer/page settings in IE against the raw
> > HTML,
> > > but I don't see a clean way to get the table header rows to repeat.
(it
> > > appears I would also have to create my own handler for RS.)
> > >
> > > Converging IE and RS is a pain right now, but it will be a great
solution
> > if
> > > I can get this last piece figured out. If you know of any other
direction
> > to
> > > take on this, I would appreciate your comments.
> > >
> > > Thanks again!
> > >
> > > "Bruce L-C [MVP]" wrote:
> > >
> > > > No you can't. When wondering what you can set dynamically you can
tell
> > by
> > > > seeing if it accepts an expression. This does not accept an
expression
> > so
> > > > there is no way to set it with a report parameter.
> > > >
> > > >
> > > > --
> > > > Bruce Loehle-Conger
> > > > MVP SQL Server Reporting Services
> > > >
> > > > "moflaherty" <moflaherty@.discussions.microsoft.com> wrote in message
> > > > news:DF6FE8B2-5776-4925-9509-4C75C8446E4A@.microsoft.com...
> > > > > This might be a newbie question, but can the page size be set as a
> > report
> > > > > parameter?
> > > > >
> > > > > Thanks!
> > > > > Michael
> > > >
> > > >
> > > >
> >
> >
> >
Monday, February 20, 2012
Page Rendering
I've a report that looks just great in Visual studio, but when I export it
to pdf things go south. The page breaks that are correct in the preview are
now incorrect in the pdf and there are blank pages mingled in the report.
Does anyone have any ideas of what I can do to try to fix this.
StanYea, the page is probably too big to render it to a A4 / US Letter format
(whatever you use). You have to calculate the borders and the page width to
get the estimated output. In Germany we have the A4 format which is about 21
cm in width. If you make the viewable are about 20 cm and the borders ar
each 2 cm the page will exceed to 24 cm and a new page has to be put in
while rendering. Try to narrow the borders.
--
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"Stan" <Stan@.discussions.microsoft.com> schrieb im Newsbeitrag
news:45B85169-EC4A-4F8A-BEA5-051A81899AA0@.microsoft.com...
> Appologies for the Newbie question...However here we go...
> I've a report that looks just great in Visual studio, but when I export it
> to pdf things go south. The page breaks that are correct in the preview
> are
> now incorrect in the pdf and there are blank pages mingled in the report.
> Does anyone have any ideas of what I can do to try to fix this.
> Stan|||I have a similar problem. Report looks great in Visual studio and in a
Browser, but when I convert it to pdf for printing, I am getting extra pages
in between with just a header printed on those pages.
I tried decrease the size of the report and make sure that it fits into 8
1/2 x 11 inches, but it did not help. I still have those annoying empty pages
in the printed report.
Any other suggestions on how can I fix it?
Thank you.
"Jens Sü�meyer" wrote:
> Yea, the page is probably too big to render it to a A4 / US Letter format
> (whatever you use). You have to calculate the borders and the page width to
> get the estimated output. In Germany we have the A4 format which is about 21
> cm in width. If you make the viewable are about 20 cm and the borders ar
> each 2 cm the page will exceed to 24 cm and a new page has to be put in
> while rendering. Try to narrow the borders.
> --
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "Stan" <Stan@.discussions.microsoft.com> schrieb im Newsbeitrag
> news:45B85169-EC4A-4F8A-BEA5-051A81899AA0@.microsoft.com...
> > Appologies for the Newbie question...However here we go...
> >
> > I've a report that looks just great in Visual studio, but when I export it
> > to pdf things go south. The page breaks that are correct in the preview
> > are
> > now incorrect in the pdf and there are blank pages mingled in the report.
> > Does anyone have any ideas of what I can do to try to fix this.
> >
> > Stan
>
>|||Have you tried setting the page size to 8.46 by 10.46 instead of 8.5 X 11...
I have recently heard there is a bug which requires this ( until MS fixes
it.)
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Stan" <Stan@.discussions.microsoft.com> wrote in message
news:45B85169-EC4A-4F8A-BEA5-051A81899AA0@.microsoft.com...
> Appologies for the Newbie question...However here we go...
> I've a report that looks just great in Visual studio, but when I export it
> to pdf things go south. The page breaks that are correct in the preview
> are
> now incorrect in the pdf and there are blank pages mingled in the report.
> Does anyone have any ideas of what I can do to try to fix this.
> Stan