Showing posts with label situation. Show all posts
Showing posts with label situation. Show all posts

Monday, March 26, 2012

PDF export results in extra pages.

I am experiencing some quirks when exporting to PDF.
I have read all the other posts about page sizes, margins, etc and my situation seems to be a bit different.

PageWidth = 21cm
PageHeight = 29.7cm
Margins = 1cm

Body.Width = 19cm

I have a report that contains a bar chart (Height = 15cm, Width = 19cm) and below that a rectangle that contains two text boxes with totals information (Left = 11.6cm, Width = 7.4cm, Height 0.5cm)

Now most of the time it exports to PDF perfectly - all on one page as would be expected

If however the chart has more than say 20 items on the y-axis then the rectangle gets pushed onto an new page.

For extra information, but not to confuse the issue I also have a page header and footer that have items lined up right to the edge (left + width = 19cm) and they all display fine on the one page. It is just this rectangle that is having the problem.

When I move the rectangle to the left a bit (11.4cm) so 0.2cm away from the right hand edge then it works fine.

It is just very strange because I cant see how it is getting shifted only when the chart contains a lot of items.

Any ideas?

I finally found a solution that works for me, just after I posted - usually the way.

I have created a rectangle with left = 0cm and width = 19cm and then placed the text boxes
inside that rectangle, positioned where I need them.

Once I do that it renders onto one page.

What I think is going on here is a precision problem. I suspect that MS being a US based company their base units are the imperial system so Inches. So even though you can express your measurements in cm, pt's, etc - they are always converted to a base unit of inches. With any conversion process you can get problems with precision and that is what I think is happening here.

So I feel the best way to avoid these precision bugs is to adopt a report design strategy of not having floating report items in your report. Group items by placing them in a rectangle and set the left to 0 and the width to the exact page width boundary (in this case 19cm)

The other solution is to always use the same base units as the renderer (inches) that way you wont suffer conversion precision problems. Unfortunately for me it would take forever to convert all mine from cm to inches.

Friday, March 23, 2012

PC SQL Server table (with a column classified "unique") synchronizes (using merge) wit

Hi, I have a doubt about the behaviour of SQL Server 2005 in the situation I'm going to describe you.
Suppose that you have a SQL Server 2005 database on your PC, and suppose that this database has a table with a column classified as "unique" (so it's impossible for this table to contain 2 records having the same value in this column).
Suppose that you publish this database and you create 2 SQL Server Mobile 2005 subscriptions on 2 Pocket PCs.
Suppose now that the first PPC (using an embedded program) creates a record with a certain value for the column (and adds it to the table), and the second PPC makes the same thing (it inserts a record with the same column value of the first PPC).
At this point, you connect the 2 PPCs to your PC (one by one, of course), to synchronize (using merge replication) the databases...

WHAT HAPPENS? Does an error raise?
Must you give a publication setting in which you say that, if this situation occurs, PC SQL Server holds the last (or the first, as you decide) record acquired? Is it possible?

Thank you very much

Of the two subscribers, the 1st will successfully sync with the publisher. The 2nd subscriber will then try to upload their change, and it should fail due to constraint violation. So you now have one conflict.

If the row at the publisher needs to be downloaded to the subscriber, this will also fail due to constraint violation. So you now have two conflicts, one from the upload, one from the download.

With these types of insert conflicts, you have to manually resolve the problem: you can delete the row at the 2nd subscriber, update the row at the publisher or 2nd subscriber so column contains a new unique value.

PC SQL Server table (with a column classified "unique") synchronizes (using merge)

Hi, I have a doubt about the behaviour of SQL Server 2005 in the situation I'm going to describe you.
Suppose that you have a SQL Server 2005 database on your PC, and suppose that this database has a table with a column classified as "unique" (so it's impossible for this table to contain 2 records having the same value in this column).
Suppose that you publish this database and you create 2 SQL Server Mobile 2005 subscriptions on 2 Pocket PCs.
Suppose now that the first PPC (using an embedded program) creates a record with a certain value for the column (and adds it to the table), and the second PPC makes the same thing (it inserts a record with the same column value of the first PPC).
At this point, you connect the 2 PPCs to your PC (one by one, of course), to synchronize (using merge replication) the databases...

WHAT HAPPENS? Does an error raise?
Must you give a publication setting in which you say that, if this situation occurs, PC SQL Server holds the last (or the first, as you decide) record acquired? Is it possible?

Thank you very much

Of the two subscribers, the 1st will successfully sync with the publisher. The 2nd subscriber will then try to upload their change, and it should fail due to constraint violation. So you now have one conflict.

If the row at the publisher needs to be downloaded to the subscriber, this will also fail due to constraint violation. So you now have two conflicts, one from the upload, one from the download.

With these types of insert conflicts, you have to manually resolve the problem: you can delete the row at the 2nd subscriber, update the row at the publisher or 2nd subscriber so column contains a new unique value.

Saturday, February 25, 2012

Passive node starting the SQL Server services - services set to ma

Hello all,
I have a very bizarre situation with a single instance/two node/W2K3
cluster. The issue I am seeing is that the passive node is starting the sql
server services even though the resources are not owned by that node. The
restarts are occuring every five minutes. The system log shows the SYSTEM
account starting MSSQLSERVER. Then, 3 seconds later, I get a message stating
the service stopped. About 5-8 seconds later, I get a message that the
SQLSERVERAGENT could not be started because sqlservr.exe is not running. The
cluster log is not showing anything being started/stopped. The applicaiton
log is complaining about the errorlog being unavailable. However, this is
correct because the resources are not on this node.
The SQL Server services are set to manual on both nodes. Both nodes have
been rebooted in the past 24 hours due to EMC PowerPath upgrades. The only
thing that is a little bizare is that the SQL Server resource group and SQL
Server resource have the preferred owners/possible owners in reverse order.
IE (SQL Server resource group has NODE1/NODE2; SQL Server Resource has
NODE2/NODE1). Right now all resources are on NODE1.
Any ideas would be greatly appreciated.
Thanks in advance
Chris.
Manual start for services is correct for a cluster. The cluster should
control the services on each node. Look at the applicaiotn logs on both
nodes. Check the failover/failback settings. You may be seeing a failback
condition due to different preferred node settings.
Geoff N. Hiten
Senior Database Administrator
Microsoft SQL Server MVP
"Christopher" <Christopher@.discussions.microsoft.com> wrote in message
news:E5873D57-2A8F-4B7B-B76C-7146B8A629DD@.microsoft.com...
> Hello all,
> I have a very bizarre situation with a single instance/two node/W2K3
> cluster. The issue I am seeing is that the passive node is starting the
> sql
> server services even though the resources are not owned by that node. The
> restarts are occuring every five minutes. The system log shows the SYSTEM
> account starting MSSQLSERVER. Then, 3 seconds later, I get a message
> stating
> the service stopped. About 5-8 seconds later, I get a message that the
> SQLSERVERAGENT could not be started because sqlservr.exe is not running.
> The
> cluster log is not showing anything being started/stopped. The
> applicaiton
> log is complaining about the errorlog being unavailable. However, this is
> correct because the resources are not on this node.
> The SQL Server services are set to manual on both nodes. Both nodes have
> been rebooted in the past 24 hours due to EMC PowerPath upgrades. The
> only
> thing that is a little bizare is that the SQL Server resource group and
> SQL
> Server resource have the preferred owners/possible owners in reverse
> order.
> IE (SQL Server resource group has NODE1/NODE2; SQL Server Resource has
> NODE2/NODE1). Right now all resources are on NODE1.
> Any ideas would be greatly appreciated.
> Thanks in advance
> Chris.