Showing posts with label deployment. Show all posts
Showing posts with label deployment. Show all posts

Thursday, March 29, 2012

Automation Error when called from VB 6

Hi Friend,

I have an application in VB 6 with Crystal Reports 7. Once I deploy the application using Package & Deployment Wizard, I get the error 'Automation Error' when I call the report from VB. I have deployed the .rpt file and not the complied file. I get this error occationally and not always. I also use Selection Formula, and Replace Selection Formula, both in VB code and also in the Report. Other reports function normally but just this one report gives me problems.

Have you come across this problem or do you have any idea of solving this ?

Please let me know if you do.

Bye.You might be missing a required dll.|||omalley might be right...............but it can be about a thousand things in CR - the error traps are so generic...:-(

I've seen this type of error when referencing objects in VB that are nor correctly type, for example.
eg dim myObj as Object
dim myObj as CRAXDRT.Report (which is the correct way to expose a report object and its properties and avoid the iUnknown interface on the COM layer, as I recall.)

It can also occur when automation servers used by CR are not available for some reason. I use some of my own UFLs (user function libraries that I developed in VB), which end up being exposed as "Additional Functions" in the formula editor. Any dll's with prefix UFL MUST be in same location as crpeaut32.dll or they will operate unreliably, even though properly registered using regsvr32.

Check also that your installation doesn't have some distributables on a network drive.

Once you've done that, make sure that you have properly passed your login info to the report in your code, and that you have also passed it to any subreports. This is a trap that bites many CR users - your database security may require you to supply login info to each subreport. It will also vary from OS to OS - standard XP security is much fussier than ME, for example.

As you can isolate it to a particular report that fails, are you doing anything differently to other reports, ie passing a different type of parameter, or maybe a range of parameters instead of a single one, and so on? Or maybe a different user is experiencing the problem.

Failing that, check the event log on the PC and see what information it is returning regarding the automation failure, and post that here.

Dave|||Thank You, omalley and springsoft for your comments. The code I use is given below;

'*****

CR.ReportFileName = App.Path & "\RouteCard.Rpt"

CR.DiscardSavedData = True
CR.Reset
CR.DiscardSavedData = False
CR.WindowShowRefreshBtn = True
CR.WindowShowSearchBtn = True
CR.WindowShowPrintSetupBtn = True

If CmbWoNoFrom.ListCount = 0 Then
MsgBox "No Records", vbInformation
Exit Sub
End If
ab = False
st1 = "({TblSchedulinghdr.Cancelled} = 0 and {TblPartNoWorkOrderNo.Cancelled}=0) and {TblOrderAcceptanceDetail.Move}='MOVE' "



If Trim(CmbWoNoFrom) <> "" Then
st1 = st1 & " AND {TblSchedulinghdr.SequenceWONo} >= " & Val(CmbWoNoFrom)
End If
If Trim(CmbWoNoTo) <> "" Then
st1 = st1 & " and {TblSchedulinghdr.SequenceWONo} <= " & Val(CmbWoNoTo)
End If
If Trim(CmbFinancialYear) <> "" Then
st1 = st1 & " and {TblSchedulinghdr.FinancialYear} = '" & UCase(Trim(CmbFinancialYear)) & "'"

End If
CR.SelectionFormula = st1





CR.Action = 1

'****

I use a database on the network which connects through ODBC and there is no database passwords set. There are 6 sub reports on this report and only one user gets this error at times. This package is compiled on win 2000 and deployed on win98.

Please let me know if you have any clue.

Thanx.
Bye.|||John,
Only potential problem I can see here (and it may not actually be a problem because you have given us a code snippet, not the whole lot), is that you are using combo boxes, by the look of your variable naming notations (which bears some resemblance to Charles Simonyi's Hungarian C Notation, with an indicative type prefix on variable and object names).
If CmbWoNoFrom (for example) is actually a combo box, what are you doing to trap situations where user presses Print button without actually selecting an item from each combo?
Unless you have a default value already set, and it doesn't look like you have, as you are Val'ing the combo's selection, then a failure to select the value may cause the query to fail, because it is passing a value (probably -1) that the query can't handle.

Dave|||Thnak You springsoft for your observations.

I don't think an empty combo box would produce an error as the check for an empty trimmed combo is done before the expression is built. This particular machine had some virus problems and also has a keyboard device driver alert in device manager. Does this pose any potential problem, although I feel it should'nt.

Please let me know of your views.

Thanx.

Bye.

Automating File Deployment of SSIS Packages

Hi:

I am trying to utilize DTUtil command to automate deployment of SSIS Package from the Build Server to Dev Server. I am getting an invalid option error, when I try to run the following command:

dtutil /FILE C:\Program Files\ABC\ABC ABC CAD\ETL Packages\Load_Staging_FromWCF.dtsx /MOVE FILE;\\serverA\C$\Program Files\ABC\ABC ABC CAD\ETL Packages\Load_Staging_FromWCF.dtsx /QUIET

Currently I have a .CMD file, in which I have the above command, and I am trying to run the CMD file and it returns an error. Can someone help me the DTUtil switches. My goal is to move a DTSX file from Server A(Build Server) to Server B(Dev Server). Also is there a switch to specify the server name, if UNC path is not supported. Also I am using File System Deployment, and running the file as an Administrator. I have admin privs on both Build and Dev Server. Thanks and I appreciate some help on this.

Why not just copy the package files over there using regular COPY commands?|||

That is true, because I am not actually utilizing SQL Server Deployment switches, although DTUtil does allow moving package files, just not sure what switches to apply. Thanks.

Automating deployment of maintenance plans

Hello,

I have created a Maintenance Plan on our development SQL Server 2005 Standard using the designer in SQL Server Management Studio. The plan backs up databases and transaction logs to a hard disk and does some cleanup too. It is scheduled to run nightly. This plan needs to be deployed to 13 production sites by someone else not familiar with SQL Server.

Can I use some combination of a SQL script, an export of the maintenance plan, and/or a batch file to automate the deployment of this plan and it's schedule to servers at several different sites? The deployment team will have admin remote desktop access to the production SQL Servers, which also have SQL Management Studio installed but we cannot expect the team to recreate the plan manually on each site.

I haven't been able to find much documentation on doing this automatically. Any help will be appreciated.

Thank you,

- Jason

Create a SSIS package to perform this maintenance plan task and use DTUTIL to deploy on multiple servers.

http://www.microsoft.com/technet/prodtechnol/sql/2005/mgngssis.mspx#ERGAE fyi.

sql

Tuesday, March 27, 2012

Automating Data Extension Deployment

Hi,

I have written a Data Processing extension for my application and can deploy it on my development machine no problems. My question is: what is the "correct" way of deploying an extension to an end user's machine? Do I have to write a special program to find and modify the Reporting Server config files and copy the extension over. Surely many developers have the same need so there must be a generic solution to this problem, however, I haven't managed to find one.

I first came across this issue in SQL2000 and I thought/hoped it would be rectified with SQL2005 but it appears not to be (unless I'm missing something).

Any ideas would be greatly appreciated.

Thanks in advance,

Tim

Hi Tim,

I don't have an answer for you, but I share your situation. I'll let you know if I find anything, and would appreciate the same.

TIA, Mike.

sql

Automating Data Extension Deployment

Hi,

I have written a Data Processing extension for my application and can deploy it on my development machine no problems. My question is: what is the "correct" way of deploying an extension to an end user's machine? Do I have to write a special program to find and modify the Reporting Server config files and copy the extension over. Surely many developers have the same need so there must be a generic solution to this problem, however, I haven't managed to find one.

I first came across this issue in SQL2000 and I thought/hoped it would be rectified with SQL2005 but it appears not to be (unless I'm missing something).

Any ideas would be greatly appreciated.

Thanks in advance,

Tim

Hi Tim,

I don't have an answer for you, but I share your situation. I'll let you know if I find anything, and would appreciate the same.

TIA, Mike.

Sunday, March 11, 2012

Automatic deployment of report models

Hi all,
I have a group of models, and I'm looking for a way to automatically
get them to deploy to the test report server every day. The only way I
know to deploy is to build the models in Visual Studio and then deploy
them from Visual Studio. Are there other ways (command line solutions
perhaps) that will do this?
Thanks for any answers.
MattYou should be able to do this via the RS Web Service Interface.
Someone should write a utility that monitors a folder or folders and auto
deploy reports from there, that would be really useful
Jim.
"Mwob" wrote:
> Hi all,
> I have a group of models, and I'm looking for a way to automatically
> get them to deploy to the test report server every day. The only way I
> know to deploy is to build the models in Visual Studio and then deploy
> them from Visual Studio. Are there other ways (command line solutions
> perhaps) that will do this?
> Thanks for any answers.
> Matt
>|||I have written such a utility - it will also deploy all my RDL files in my
local folder structure to the report server. I just pass in two parameters
to my utility: The Report Server URL and the ROOT folder to create to dump
the reports into.
Saves me tons of time, especially with client deployments. :)
=-Chris
"Jim Breffni" <JimBreffni@.discussions.microsoft.com> wrote in message
news:E7EBD6CD-1A8F-4743-B2EB-026BEDEF1BB8@.microsoft.com...
> You should be able to do this via the RS Web Service Interface.
> Someone should write a utility that monitors a folder or folders and auto
> deploy reports from there, that would be really useful
> Jim.
>
> "Mwob" wrote:
>> Hi all,
>> I have a group of models, and I'm looking for a way to automatically
>> get them to deploy to the test report server every day. The only way I
>> know to deploy is to build the models in Visual Studio and then deploy
>> them from Visual Studio. Are there other ways (command line solutions
>> perhaps) that will do this?
>> Thanks for any answers.
>> Matt
>>|||Hi all,
Thanks very much for the replies. I started looking at the
ReportingServices2005 web services, and found a method called
"CreateModel" that looks like it might help, but I can't figure out how
to structure a call to this method, and how to authenticate etc...
There is a lack of examples on the web with this information. Its
slightly more complicated for me too because we also develop a custom
authentication extension that we'll have to cater for in the web
services calls.
Chris, any chance you could share your application or at least some
code that describes how its done.
Thanks!
Matt
Chris Conner wrote:
> I have written such a utility - it will also deploy all my RDL files in my
> local folder structure to the report server. I just pass in two parameters
> to my utility: The Report Server URL and the ROOT folder to create to dump
> the reports into.
> Saves me tons of time, especially with client deployments. :)
> =-Chris
> "Jim Breffni" <JimBreffni@.discussions.microsoft.com> wrote in message
> news:E7EBD6CD-1A8F-4743-B2EB-026BEDEF1BB8@.microsoft.com...
> > You should be able to do this via the RS Web Service Interface.
> >
> > Someone should write a utility that monitors a folder or folders and auto
> > deploy reports from there, that would be really useful
> >
> > Jim.
> >
> >
> >
> > "Mwob" wrote:
> >
> >> Hi all,
> >>
> >> I have a group of models, and I'm looking for a way to automatically
> >> get them to deploy to the test report server every day. The only way I
> >> know to deploy is to build the models in Visual Studio and then deploy
> >> them from Visual Studio. Are there other ways (command line solutions
> >> perhaps) that will do this?
> >>
> >> Thanks for any answers.
> >>
> >> Matt
> >>
> >>|||If would be great if you could share that code.|||Anyone?
I'm looking for a relatively simple example implementation of some code
using the web services to publish a report model.
Mwob wrote:
> Hi all,
> Thanks very much for the replies. I started looking at the
> ReportingServices2005 web services, and found a method called
> "CreateModel" that looks like it might help, but I can't figure out how
> to structure a call to this method, and how to authenticate etc...
> There is a lack of examples on the web with this information. Its
> slightly more complicated for me too because we also develop a custom
> authentication extension that we'll have to cater for in the web
> services calls.
> Chris, any chance you could share your application or at least some
> code that describes how its done.
> Thanks!
> Matt
>
> Chris Conner wrote:
> > I have written such a utility - it will also deploy all my RDL files in my
> > local folder structure to the report server. I just pass in two parameters
> > to my utility: The Report Server URL and the ROOT folder to create to dump
> > the reports into.
> >
> > Saves me tons of time, especially with client deployments. :)
> >
> > =-Chris
> >
> > "Jim Breffni" <JimBreffni@.discussions.microsoft.com> wrote in message
> > news:E7EBD6CD-1A8F-4743-B2EB-026BEDEF1BB8@.microsoft.com...
> > > You should be able to do this via the RS Web Service Interface.
> > >
> > > Someone should write a utility that monitors a folder or folders and auto
> > > deploy reports from there, that would be really useful
> > >
> > > Jim.
> > >
> > >
> > >
> > > "Mwob" wrote:
> > >
> > >> Hi all,
> > >>
> > >> I have a group of models, and I'm looking for a way to automatically
> > >> get them to deploy to the test report server every day. The only way I
> > >> know to deploy is to build the models in Visual Studio and then deploy
> > >> them from Visual Studio. Are there other ways (command line solutions
> > >> perhaps) that will do this?
> > >>
> > >> Thanks for any answers.
> > >>
> > >> Matt
> > >>
> > >>

Wednesday, March 7, 2012

automate GACing assembly

Hi,

Unfortunately the deployment Utility does not support adding dll's to the GAC. Still I want to automate it. (By the way on target machines GacUtil is not present). I tried to make a setup project that only adds a dll to the GAC, however the setup project still makes an application folder. How can I turn this off?

Regards,
Henk

I haven't used the Visual Studio installer projects for some time, but is there not a File page in the project? Can you not delete the app folder in that File page?

Saying that I can highly recomend WiX as a method of generating MSIs. Checkout the very good tutorial if you are interested.

Windows Installer XML (WiX) toolset
(http://wix.sourceforge.net/)

|||Unfortunately, VS does not allow you to delete the application folder

Automate deployment of reporting project

I have to deploy reports several times a day [to our teesting environment]
due to contstant changes by devlopers. Does anyone know of a way to automate
the deployment process? Even doing something with VBA will work. I don't
see any possible references listed in the VBA references section - would the
createobject method work? Has anyone does this? I would love to get this on
a schedule and off my plate.
Thanks in advance,
John Hennesey
p.s. Third party programs are an option too, if anyone knows of any.You should be able to do all you need with a bit of scripting and the rs
utility. The following link should give you an idea, based on the reporting
services sample reports:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSAMPLES/htm/rss_sampleapps_v1_1apd.asp
"JohnHennesey" wrote:
> I have to deploy reports several times a day [to our teesting environment]
> due to contstant changes by devlopers. Does anyone know of a way to automate
> the deployment process? Even doing something with VBA will work. I don't
> see any possible references listed in the VBA references section - would the
> createobject method work? Has anyone does this? I would love to get this on
> a schedule and off my plate.
> Thanks in advance,
> John Hennesey
> p.s. Third party programs are an option too, if anyone knows of any.|||Thank you for your response. This will do the trick, will take a bit of
massaging to get it to where I want it to be. Ideally if I could use the
Visual Sourcesafe object model to pull down the latest code, then use a .Net
object model to open the solution, change the deployment path then deploy it
would be ideal.
But, I can use command line script to pull down the latest code base from
SS, then iterate through the file list (.rdl's only) via the Scripting engine
and deploy from there.
Thanks for your help!
John
"David Jennaway" wrote:
> You should be able to do all you need with a bit of scripting and the rs
> utility. The following link should give you an idea, based on the reporting
> services sample reports:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSAMPLES/htm/rss_sampleapps_v1_1apd.asp
> "JohnHennesey" wrote:
> > I have to deploy reports several times a day [to our teesting environment]
> > due to contstant changes by devlopers. Does anyone know of a way to automate
> > the deployment process? Even doing something with VBA will work. I don't
> > see any possible references listed in the VBA references section - would the
> > createobject method work? Has anyone does this? I would love to get this on
> > a schedule and off my plate.
> >
> > Thanks in advance,
> > John Hennesey
> >
> > p.s. Third party programs are an option too, if anyone knows of any.