Showing posts with label problemi. Show all posts
Showing posts with label problemi. Show all posts

Friday, March 23, 2012

Report ciew correct but print no

Hi,
first
Program language visual basic 6 +SP5
Crystal Report 8.5
SQL Server2000

Day2(Namr of report)

the problem
i use these code so when any one click print in report view he can select the printer

UseDefault = False
Day2.PrinterSetup Me.hwnd
Day2.PrintOut True

first time view report its print ok but if i open report again with differnet parameters its showing correct data in report view but after i click print and choose printer it still print the first report

why these happen?I've seen this problem before, a few years ago.
I don't work at the same place now, so I can't go back into SourceSafe and check the code, but I seem to recall we had this problem due to originally not properly disposing of the report object.
If you have a report object open (instantiated) and you then reset some parameters, it may not function properly unless you dispose of the object when you next start a "view" process.
So, when you click on a button to regenerate your view of the report, make sure you do something like this;

set objReport = Nothing
set objParams = Nothing

and then provide code to recreate the objects, which should flush the report object and all objects is has created, and then create a clean new object so you can set parameters.

Davesql

Tuesday, February 21, 2012

replication/distributor problem

Hello,
I'm trying to set up transactional replication on two SQL2k Servers.
Unfortunately I stuck on the following problem:
I use 'Configure Publishing and Distribution Wizard' , I make one of the
servers (publisher) its own distributor, then I set all the paths .After
pressing 'Finish' button, the wizard tries to perform next step i.e.
'Configuring Distributor' and I get the error:
"Error 14114: '(null)' is not configured as a Distributor". Does anyone have
idea what I should do in order to solve the problem?

I tried to run procedures manually, and I get exactly the same error when I
try to execute sp_adddistributondb

Thanks,

Piotrektry this in QA

SELECT @.@.ServerName

My guess is that this returns NULL.

Now do

Exec sp_AddServer '<Name>', 'local'

Restart the SQL Server and try again

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know

"Piotrek Stachowicz" <dynamite@.poczta.onet.pl> wrote in message
news:cdllkd$5ja$1@.news.onet.pl...
> Hello,
> I'm trying to set up transactional replication on two SQL2k Servers.
> Unfortunately I stuck on the following problem:
> I use 'Configure Publishing and Distribution Wizard' , I make one of the
> servers (publisher) its own distributor, then I set all the paths .After
> pressing 'Finish' button, the wizard tries to perform next step i.e.
> 'Configuring Distributor' and I get the error:
> "Error 14114: '(null)' is not configured as a Distributor". Does anyone
have
> idea what I should do in order to solve the problem?
> I tried to run procedures manually, and I get exactly the same error when
I
> try to execute sp_adddistributondb
> Thanks,
> Piotrek