Showing posts with label table. Show all posts
Showing posts with label table. Show all posts

Friday, March 23, 2012

RS2k - Display text to say there are no rows?

Hi,

This is probably an easy one, but its been bugging me.

If I have no rows for a particular table, is there any way that I can simply display some text saying something like 'no data available for report' ?

Similarly, I was thinking I could hider certain controls on the report if there are no rows available by using an expression in the Visible property of the control.

Any suggestions are appreciated.

Regards.

MrPeds

In the VS Properties (not the Properties from the context menu) there is a NoRows property that is the Text you want displayed when the dataset returns no rows. There is not a way to determine from the table at run time if there are any rows or not, but you can get a row count on DataSet1 like:

Code Snippet

=CountRows("DataSet1")

Hope this helps.

Larry

Wednesday, March 21, 2012

RS2005 languages support

Hi All,
My application is a web base application.
I should display the report table header in defrent languages: Engalsh,
French,German and more .
How RS 2005 handle with translation to the headers ?
Can I change the header after I deploy the report ?
10x,
Shachar.> My application is a web base application.
> I should display the report table header in defrent languages:
> Engalsh,
> French,German and more .
> How RS 2005 handle with translation to the headers ?
> Can I change the header after I deploy the report ?
> 10x,
Hello Shachar,
I assume you already have the translations stored in a database somewhere.
You can create a report parameter that lets the user select which language,
and use that parameter to query the proper table headers from the database.
-Chrissql

Monday, March 12, 2012

RS stripping spaces from my text

Yello,
We have a very simple report that lists the contents of a table called
GenericReport that contains one field of varchar(120). All the report needs
to do is list the records in this table.
Unfortunately, I'm finding that RS will pick up the text from a record, and
strip out any spaces at the beginning. Which in turns destroys the
formating of the text - removing any indents created by padding with spaces.
The report doesn't do it when previewed from the designer, but does it when
rendered in the browser via report manager.
Anyone have experience of this, or know how to stop it.
Thanksbump
"Martin Cross" <martincross@.vardells.com> wrote in message
news:ubJdNSTpEHA.1164@.TK2MSFTNGP10.phx.gbl...
> Yello,
> We have a very simple report that lists the contents of a table called
> GenericReport that contains one field of varchar(120). All the report
> needs to do is list the records in this table.
> Unfortunately, I'm finding that RS will pick up the text from a record,
> and strip out any spaces at the beginning. Which in turns destroys the
> formating of the text - removing any indents created by padding with
> spaces.
> The report doesn't do it when previewed from the designer, but does it
> when rendered in the browser via report manager.
> Anyone have experience of this, or know how to stop it.
> Thanks
>
>|||The behavior your are encountering is a result of how IE handles adjacent
whitespace characters.
We have looked into changing this behavior but doing so introduces worse
problems with regards to search and wordwrap.
--
Bruce Johnson [MSFT]
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Martin Cross" <martincross@.vardells.com> wrote in message
news:ubJdNSTpEHA.1164@.TK2MSFTNGP10.phx.gbl...
> Yello,
> We have a very simple report that lists the contents of a table called
> GenericReport that contains one field of varchar(120). All the report
needs
> to do is list the records in this table.
> Unfortunately, I'm finding that RS will pick up the text from a record,
and
> strip out any spaces at the beginning. Which in turns destroys the
> formating of the text - removing any indents created by padding with
spaces.
> The report doesn't do it when previewed from the designer, but does it
when
> rendered in the browser via report manager.
> Anyone have experience of this, or know how to stop it.
> Thanks
>
>|||Is it possible to include adjacent " " elements in a textbox to display
whitespace beyond one space? Or any html tags to be included in the
displayed report?
My problem is that I have multiple row groups in a matrix report. I'm
trying to provide headers for the row groups. The column headers for each
row group have been merged into one textbox which I can't split. If I could
insert spaces, I could at least provide a spaced string with labels
positioned above the row groups. It is confusing to the user to have
multiple row groups with no headers above them.
Thanks
Bill
"Bruce Johnson [MSFT]" <brucejoh@.online.microsoft.com> wrote in message
news:exKUjGXpEHA.132@.TK2MSFTNGP14.phx.gbl...
> The behavior your are encountering is a result of how IE handles adjacent
> whitespace characters.
> We have looked into changing this behavior but doing so introduces worse
> problems with regards to search and wordwrap.
> --
> Bruce Johnson [MSFT]
> Microsoft SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "Martin Cross" <martincross@.vardells.com> wrote in message
> news:ubJdNSTpEHA.1164@.TK2MSFTNGP10.phx.gbl...
> > Yello,
> > We have a very simple report that lists the contents of a table called
> > GenericReport that contains one field of varchar(120). All the report
> needs
> > to do is list the records in this table.
> >
> > Unfortunately, I'm finding that RS will pick up the text from a record,
> and
> > strip out any spaces at the beginning. Which in turns destroys the
> > formating of the text - removing any indents created by padding with
> spaces.
> >
> > The report doesn't do it when previewed from the designer, but does it
> when
> > rendered in the browser via report manager.
> >
> > Anyone have experience of this, or know how to stop it.
> >
> > Thanks
> >
> >
> >
>|||I've tried replacing spaces with but Reporting Services converts this to
when it renders the report. So, obviously it's converting certain
characters to their HTML code values but not spaces. Has anyone found a way
to write into a report and have it render as a space?
Thanks,
Mark
"bill" wrote:
> Is it possible to include adjacent " " elements in a textbox to display
> whitespace beyond one space? Or any html tags to be included in the
> displayed report?
> My problem is that I have multiple row groups in a matrix report. I'm
> trying to provide headers for the row groups. The column headers for each
> row group have been merged into one textbox which I can't split. If I could
> insert spaces, I could at least provide a spaced string with labels
> positioned above the row groups. It is confusing to the user to have
> multiple row groups with no headers above them.
> Thanks
> Bill
> "Bruce Johnson [MSFT]" <brucejoh@.online.microsoft.com> wrote in message
> news:exKUjGXpEHA.132@.TK2MSFTNGP14.phx.gbl...
> > The behavior your are encountering is a result of how IE handles adjacent
> > whitespace characters.
> > We have looked into changing this behavior but doing so introduces worse
> > problems with regards to search and wordwrap.
> >
> > --
> > Bruce Johnson [MSFT]
> > Microsoft SQL Server Reporting Services
> >
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> >
> >
> > "Martin Cross" <martincross@.vardells.com> wrote in message
> > news:ubJdNSTpEHA.1164@.TK2MSFTNGP10.phx.gbl...
> > > Yello,
> > > We have a very simple report that lists the contents of a table called
> > > GenericReport that contains one field of varchar(120). All the report
> > needs
> > > to do is list the records in this table.
> > >
> > > Unfortunately, I'm finding that RS will pick up the text from a record,
> > and
> > > strip out any spaces at the beginning. Which in turns destroys the
> > > formating of the text - removing any indents created by padding with
> > spaces.
> > >
> > > The report doesn't do it when previewed from the designer, but does it
> > when
> > > rendered in the browser via report manager.
> > >
> > > Anyone have experience of this, or know how to stop it.
> > >
> > > Thanks
> > >
> > >
> > >
> >
> >
>
>

Saturday, February 25, 2012

RS Does Not Recognize Temp Table Fields

I am using the generic query designer and have defined 2 temp tables as
follows:
DECLARE @.MainTable
DECLARE @.JoinTable
INSERT INTO @.MainTable
SELECT...
INSERT INTO @.JoinTable
SELECT...
SELECT FROM @.MainTable JOIN ON @.JoinTable...
My problem is the field list does not recognize all the fields; all the
original fields are in the @.MainTable but only the first 3 from the
@.JoinTable. I tried to add additional fields to the @.MainTable and they are
not recognized. I have tried the Field Refresh Button, manually adding
fields to the list and hacking the RDL field list. Each time I manually add,
I get an index out of bounds error when trying to run the report. If I then
hit the refresh button the fields I have manually added are removed'
Also, must the field names be unique among the temp tables? I assumed not
since they are in separate queries.
Many thanks for any helpFirst off, even if you get this to work it won't work for you. Let me
explain. What happens with using temp tables in the generic query designer
is the same thing that happens if you post the below code in query analyzer
and hit execute twice. The first time it will work, the second time it will
error out because the tables already exist. So even if this worked for you
in development when you deploy it the report would work the first time. If
the user click on refresh report it will die (I haven't done this in 2005
but I did try this out in 2000 and I doubt if this would have changed). The
reason is what is going on with connection pooling. Dropping the tables at
the end would probably not work either because it would probably do this
before RS is done with them.
I suggest creating a stored procedure. Do not drop the temp tables, just let
them fall out of scope. Have your select statement be the last statement.
I do this all the time (multiple temp tables, lots of inserts, updates, join
etc between them).
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Mike Harbinger" <MikeH@.Cybervillage.net> wrote in message
news:uloHfFM7FHA.2692@.tk2msftngp13.phx.gbl...
>I am using the generic query designer and have defined 2 temp tables as
>follows:
> DECLARE @.MainTable
> DECLARE @.JoinTable
> INSERT INTO @.MainTable
> SELECT...
> INSERT INTO @.JoinTable
> SELECT...
> SELECT FROM @.MainTable JOIN ON @.JoinTable...
> My problem is the field list does not recognize all the fields; all the
> original fields are in the @.MainTable but only the first 3 from the
> @.JoinTable. I tried to add additional fields to the @.MainTable and they
> are not recognized. I have tried the Field Refresh Button, manually adding
> fields to the list and hacking the RDL field list. Each time I manually
> add, I get an index out of bounds error when trying to run the report. If
> I then hit the refresh button the fields I have manually added are
> removed'
> Also, must the field names be unique among the temp tables? I assumed not
> since they are in separate queries.
> Many thanks for any help
>|||Bruce
Many thanks for your prompt reply. I found my problem was a simple one where
I had not included all the new fields in all the select statements. Your
point is well taken though and the use of the temp tables was a last resort
because I could not get the original more straight-forward query to work. I
was getting redundant hits as a result of a subquery so had to use this
approach to get it working for a deadline.
Surprisingly this approach does work in the preview panel as well as
deployed to the web. However the query does not execute inside of the data
panel; it just dies without any errors. I assume this is what you are
referring to.
Many thanks for all your help up here!
Mike