Showing posts with label adding. Show all posts
Showing posts with label adding. Show all posts

Wednesday, March 21, 2012

Group Test Field

When adding a text box in my group section, the textbox width is limited to the width of the first column in the detail of the report, or any detail column. It cannot span multiple columns, even though it is the only textbox on the entire 8 inch line, it is limited to my .5 inch column 1 width.
How do I expand my group by text box to use some of that empty space ?
Thanks in advance,
ChrisFigured it out, right-click on the cell select Merge Cells and can spread across entire row. Nice!
I'm a huge fan!
Chris
"Chris" wrote:
> When adding a text box in my group section, the textbox width is limited to the width of the first column in the detail of the report, or any detail column. It cannot span multiple columns, even though it is the only textbox on the entire 8 inch line, it is limited to my .5 inch column 1 width.
> How do I expand my group by text box to use some of that empty space ?
> Thanks in advance,
> Chris

group page break adding blank pages

I have a report that I am grouping the data and setting the page to break
after each group (check box "Page break at end"). When I View Report in
Preview, the report looks perfect. Four pages, four groups. In this case,
each group fits on one page. When I click on the magnifying glass to see the
print view, it returns 8 pages. There is a completely blank page (except for
page header) on every even page. This is the case when a group goes to two
pages as well. If I run the report and get 5 pages with 4 groups, I still
get 10 pages when viewing for printing.
How can I keep the page break and get rid of the extra page? This is really
bad when the report is over 1000 pages... making it over 2000 pages for
nothing."SharinDenver" <SharinDenver@.discussions.microsoft.com> wrote in message
news:0F2CDB4D-6130-4D9B-A382-028941BCA3CF@.microsoft.com...
>I have a report that I am grouping the data and setting the page to break
> after each group (check box "Page break at end"). When I View Report in
> Preview, the report looks perfect. Four pages, four groups. In this
> case,
> each group fits on one page. When I click on the magnifying glass to see
> the
> print view, it returns 8 pages.
Hi Sharin,
Try to figure out what element is causing this behavior. In general if you
set to invisible only one element and everything will get in order. Find the
wrong element and then look for problems in it.
Regards,
--
Martin Kulov
http://www.codeattest.com/blogs/martin
MCAD Charter Member
MCSD.NET Early Achiever
MCSD|||I tried setting each element to hidden one at a time and nothing changed.
I finally got it to stop happening though. My page width property is 5.5
inches. For an 8 inch page with half inch margins. I'm wasting all that
space. But if I make my page 5.5 inches (and therefore my table has to fit
in that), then it doesn't happen anymore. Any suggestions on why this is
happening?
"Martin Kulov" wrote:
> "SharinDenver" <SharinDenver@.discussions.microsoft.com> wrote in message
> news:0F2CDB4D-6130-4D9B-A382-028941BCA3CF@.microsoft.com...
> >I have a report that I am grouping the data and setting the page to break
> > after each group (check box "Page break at end"). When I View Report in
> > Preview, the report looks perfect. Four pages, four groups. In this
> > case,
> > each group fits on one page. When I click on the magnifying glass to see
> > the
> > print view, it returns 8 pages.
> Hi Sharin,
> Try to figure out what element is causing this behavior. In general if you
> set to invisible only one element and everything will get in order. Find the
> wrong element and then look for problems in it.
> Regards,
> --
> Martin Kulov
> http://www.codeattest.com/blogs/martin
> MCAD Charter Member
> MCSD.NET Early Achiever
> MCSD
>
>|||I'm having the same issue. I have a group that does a page break the
customer. That field is hidden. The only way I can get the blank page to
not print is to remove the page break in the table group. Is there a way to
have a page break and not have that blank page print?
"Martin Kulov" wrote:
> "SharinDenver" <SharinDenver@.discussions.microsoft.com> wrote in message
> news:0F2CDB4D-6130-4D9B-A382-028941BCA3CF@.microsoft.com...
> >I have a report that I am grouping the data and setting the page to break
> > after each group (check box "Page break at end"). When I View Report in
> > Preview, the report looks perfect. Four pages, four groups. In this
> > case,
> > each group fits on one page. When I click on the magnifying glass to see
> > the
> > print view, it returns 8 pages.
> Hi Sharin,
> Try to figure out what element is causing this behavior. In general if you
> set to invisible only one element and everything will get in order. Find the
> wrong element and then look for problems in it.
> Regards,
> --
> Martin Kulov
> http://www.codeattest.com/blogs/martin
> MCAD Charter Member
> MCSD.NET Early Achiever
> MCSD
>
>sql

Wednesday, March 7, 2012

Group by in a view can this be used ?

In a complex view the group by gives strange (wrong) results.
(Adding a group by and having clause generates more rows instead of less).
select A, B, C+ isnull(' '+D, '')+isnull(str(E), ''), F
from view_A
Results in : 720 rows
select A, B, C+ isnull(' '+D, '')+isnull(str(E), ''), F, count(*)
from view_A
group by A, B, C+ isnull(' '+D, '')+isnull(str(E), ''), F
having count(*) > 1
Results in : 33678 rows (a lot of them containing a 1 in the count(*)
column)
(There should be only 57 rows)
If the view is put into a table : select * into table_A from view_A
First result : 720
Second result : 57
Is this a (known) bug,
(Removing the count(*) from the first query results in a :
Server: Msg 8624, Level 16, State 16, Line 1
Internal SQL Server error.
)
The view uses union to get the results form 3 queries, which each have
several tables. There are no correlated subqueries.
ben brugmanPlease can you post some code to reproduce the problem: the DDL for the base
tables and the view (just the key columns and the columns involved in the
query will do) plus a small sample of data (post as INSERT statements).
--
David Portas
--
Please reply only to the newsgroup
--|||I could generate a sample, but I would have
to anominise all data and meta data (table, view and column names).
There is a number of tables involved and I would have
to create suetable data.
(Sorry my organisation does not allow me to do this otherwise).
But then it does take such a form that I do not expect anybody to
look at the problem. And it would take a considerable amount of time
to prepare this.
At the end of this message I have done this only for the views and the
offending queries.
(Just as an example to show that this is not very user friendly).
Thanks for your attention
ben brugman
LOOK AT THE EXAMPLE AT YOUR OWN PERIL.
/* View for a selection. */
CREATE VIEW dbo.View_S
AS
SELECT T157TABLE.F637FIELD,
T157TABLE.F687FIELD AS F346FIELD,
T157TABLE.F638FIELD,
'SE' AS F347FIELD,
T116TABLE.F280FIELD AS F345FIELD,
T104TABLE.F703FIELD AS F238FIELD,
T157TABLE.F652FIELD,
T157TABLE.F744FIELD,
T157TABLE.F745FIELD,
T116TABLE.F277FIELD AS F246FIELD,
T116TABLE.F278FIELD AS F342FIELD,
T157TABLE.F324FIELD, T157TABLE.F309FIELD,
T157TABLE.F311FIELD,
T157TABLE.F588FIELD,
T157TABLE.F590FIELD,
T157TABLE.F747FIELD
FROM T157TABLE INNER JOIN
T116TABLE ON
T116TABLE.F637FIELD = T157TABLE.F637FIELD AND
T116TABLE.F687FIELD = T157TABLE.F687FIELD
LEFT OUTER JOIN
T104TABLE ON
T104TABLE.F637FIELD = T157TABLE.F637FIELD AND
T104TABLE.F687FIELD = T157TABLE.F687FIELD
AND T104TABLE.F230FIELD = 'SIS'
/* The main View */
CREATE VIEW dbo.View_A
AS
SELECT T122TABLE.F637FIELD,
T122TABLE.F344FIELD AS F346FIELD,
T122TABLE.F638FIELD,
'CT' AS F347FIELD,
T122TABLE.F262FIELD AS F345FIELD,
T122TABLE.F238FIELD,
T122TABLE.F246FIELD, T122TABLE.F342FIELD,
T122TABLE.F324FIELD,
T122TABLE.F309FIELD,
IHCP_creator.F510FIELD AS F310FIELD,
T122TABLE.F588FIELD,
IHCP_mutator.F510FIELD AS F589FIELD,
T122TABLE.F747FIELD, NULL AS F652FIELD, NULL
AS F744FIELD, NULL
AS F745FIELD
FROM T122TABLE, T159TABLE IHCP_creator,
T159TABLE IHCP_mutator
WHERE T122TABLE.F311FIELD = IHCP_creator.F702FIELD
AND
T122TABLE.F590FIELD = IHCP_mutator.F702FIELD
UNION
SELECT T123TABLE.F637FIELD,
T123TABLE.F348FIELD AS F346FIELD,
T123TABLE.F638FIELD,
'TT' AS F347FIELD,
T123TABLE.F737FIELD AS F345FIELD,
T123TABLE.F238FIELD,
T123TABLE.F246FIELD,
T123TABLE.F342FIELD,
T123TABLE.F324FIELD,
T123TABLE.F309FIELD,
IHCP_creator.F510FIELD AS F310FIELD,
T123TABLE.F588FIELD,
IHCP_mutator.F510FIELD AS F589FIELD,
T123TABLE.F747FIELD, NULL
AS F652FIELD, NULL AS F744FIELD, NULL
AS F745FIELD
FROM T123TABLE,
T159TABLE IHCP_creator,
T159TABLE IHCP_mutator
WHERE T123TABLE.F311FIELD = IHCP_creator.F702FIELD
AND
T123TABLE.F590FIELD = IHCP_mutator.F702FIELD
UNION
SELECT View_S.F637FIELD,
View_S.F346FIELD,
View_S.F638FIELD,
View_S.F347FIELD,
View_S.F345FIELD,
View_S.F238FIELD,
View_S.F246FIELD,
View_S.F342FIELD,
View_S.F324FIELD,
View_S.F309FIELD,
IHCP_creator.F510FIELD AS F310FIELD,
View_S.F588FIELD,
IHCP_mutator.F510FIELD AS F589FIELD,
View_S.F747FIELD,
View_S.F652FIELD,
View_S.F744FIELD,
View_S.F745FIELD
FROM View_S,
T159TABLE IHCP_creator,
T159TABLE IHCP_mutator
WHERE View_S.F311FIELD = IHCP_creator.F702FIELD
AND
View_S.F590FIELD = IHCP_mutator.F702FIELD
/* The query which goes 'wrong' */
select F637FIELD, F638FIELD, F347FIELD+ isnull(' '+F744FIELD,
'')+isnull(str(F652FIELD), ''), F246FIELD, count(*) from View_A
group by F637FIELD, F638FIELD, F347FIELD+ isnull(' '+F744FIELD,
'')+isnull(str(F652FIELD), ''), F246FIELD
having count(*) > 1
/* The simple Query */
select F637FIELD, F638FIELD, F347FIELD+ isnull(' '+F744FIELD,
'')+isnull(str(F652FIELD), ''), F246FIELD from View_A

Sunday, February 19, 2012

Grid Computing for Sql Server 2005?

Probably a bad way to start but wondering if Sql Server 2005 scales the way Grid computing does (ie several instances attached to same DB) by adding cheap hardware which is load balancing requests. Or is there only the option of adding more CPU's to the existing frame to scale the Sql Server 2005 DB?

We are migrtating to 2005 from 2000 and have several questions about maintaining a sql server 2000 failback DB that is kept in sync with the new 2005 DB after it goes production.

I was hoping to be able to detach a 2000 database and re-attach it to 2000 but seems not to work or at least backup and restore the 2005 databases and recover into 2000 but don't see that option. At last resort using something like DataMirror to maintain a synced version of DB in sql server 2000. Any suggestions or help here would be very appreciated.

We are planning side-by-side upgrade path currently running IA64 on unisys. This is a large 450gig OLTP Database.

Also we do replication and seems that Log reader really pounds the disk where logs are located. Suggestions on how to tune/reduce I/O on that disk? Have read plenty of papers and we are taking the 15 steps but wonder if 2005 does a better job of replication using the log files.

Thank You Very Much

sqlserver is builtin on "shared-nothing" technology. There is no way to get multiple instances of sqlserver to mount a same database for read_write. However, with sql2k5, you now have a way to allow multiple instances of sqlserver sharing a same database for readonly (i.e. scalable shared database).

http://support.microsoft.com/?kbid=910378|||

Unfortunately, you cannot use DB mirroring between SQL Server 2005 and SQL Server 2000. You cannot detach from SQL 2005 and reattach to SQL 2000. You also cannot backup from SQL 2005 and restore to SQL 2000. Basically, going from SQL 2000 to SQL 2005 is a one way trip.

Why do you want to keep a fallback SQL Server 2000 database? SQL Server 2005 has been out for nearly a year, and SP1 has been out for several months now. SQL Server 2005 is very solid now. You can run the Mcrosoft SQL Server Best Practices Analyzer on your existing SQL Server 2000 database to identify possible issues in upgrading to SQL Server 2005, and you can also run the Upgrade Advisor. You can and should do as much testing as possible to make sure that your application runs without issue on SQL Server 2005 before you upgrade in production. One common issue is inline SQL that uses non-ansi outer joins, which will fail on SQL Server 2005 in 90 compatibility mode.

I think a side by side upgrade (by running SQL 2005 as a named instance) on the same server is not the best idea. If you have the budget, you would be much better off to have a new server with a fresh copy of the OS to install SQL 2005 as the default instance. Then, if you can afford an outage, you can detach your SQL Server 2000 database, copy the files to another location on the SAN, and then attach in SQL 2005 on the new server.

If you cannot afford a long enough outage to copy the data files, you can simply detach from SQL Server 2000, then attach in SQL Server 2005. This is more risky, because you cannot go back if there is a problem. You would have to restore to SQL Server 2000 from a backup.

Basically, you either have to take a fairly long outage or take some risk when you upgrade. Spending money on a second new server can reduce the risk or reduce the length of the outage.