Link to home
Start Free TrialLog in
Avatar of DSE
DSE

asked on

"load report failed" VB.NET (2002) on deployment machine

Hi,

I have written my first extensive VB.NET project and am now at the deployment stage. It all works except the crystal stuff, would you beleive it!
Here is the code that i use to instantiate and run the report.

                Dim repland As New crptProdListLand()
                fViewer.crvMain.ReportSource = repland
                repland.SetDataSource(dsRep)
                fViewer.Show()

When i try to run the report on a deployed machine i get the error (handled and msgboxed out) "Load report failed" ...and then a credentials box pops up.
On the Dev machine it all works fine, as things always do!

I have packaged up the project using VS.NET 2002.
I have included the merge modules for my version of vs.net (2002)
         http://support.businessobjects.com/communityCS/FilesAndUpdates/cr_net_mergemodules_en.zip.asp

and i have included the merge files that i have learnt are related to ADO.NET handling.
(https://www.experts-exchange.com/questions/21088702/deploying-crystal-report-to-web-server.html)
         VC_CRT.msm
         VC_STL.msm

Any help is much appreciated!

Regards

DSE
Avatar of ebolek
ebolek

Is your report crptProdListLand() embedded to the project. Check to see in the deployment package it exists.

Regards
Emre
Avatar of DSE

ASKER

buildaction = embedded resource
  (this is the dev project not the package project)

..........(btw this is CR.NET that is included with VS.NET 2002)
Avatar of DSE

ASKER

I also tried connecting to non embedded reports like this

            fViewer.crvMain.ReportSource = "C:\test.rpt"
no that is wrong. You load the report for that

Crystal Decisions.CrystalReports.engine.reportdocument myreport = new report1;
myreport.load(path);
crystalviewer1.reportsource = myreport;

this is how youload the report with the path with c#
so you say when you run the report on the development machine, it displays the report OK right?
Avatar of DSE

ASKER

ok...for vb.net i have translated that into this...

            Dim repland As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
                repland.Load(Application.ExecutablePath & "\crptProdListLand.rpt")
                fViewer.crvMain.ReportSource = repland
                repland.SetDataSource(dsRep)


ill go try it now :o)

Avatar of DSE

ASKER

yes the development machine displays fine.
you dont need to set the datasource, what is dsrep. Is it a dataset? yOu set the report source of the viewer and report displays fine.
Avatar of DSE

ASKER

it does with the first method shown at the top....

but after just testing the line with <<<<  causes the "load report failed" error

           Dim repland As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
                repland.Load(Application.ExecutablePath & "\crptProdListLand.rpt") <<<<<<<<<<<<<<<<<<<
                fViewer.crvMain.ReportSource = repland
                repland.SetDataSource(dsRep)

dsrep is a dataset yes, I have to pass this to the report as i do several operations with it before the report shows. This doesnt cause a problem on the dev machine.

Ive just remembered to mention. The report is built on a XML schema (XSD) - basically a field definition file.

DSE


Avatar of DSE

ASKER

thats a point thinking about it.... i havent included the XSD in the package... should i?
Dim repland As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
                repland.Load(Application.ExecutablePath & "\crptProdListLand.rpt") <<<<<<<<<<<<<<<<<<<
  repland.SetDataSource(dsRep)
 fViewer.crvMain.ReportSource = repland

The order is wrong though. First you set the datasource of the report document then you set the reprot source of the viewer,
             
it could be there are merge modules for datasets, that you should put in the rpoject
let me find you the deployment document that I use. it is pretty good.

go to business objects.com and find ths document

Crystal Reports 10 and .Net Application Deployment

Also be sure to put the license code in the setup project. Did you do that.
Avatar of DSE

ASKER

are you refering to this page?
 http://support.businessobjects.com/library/kbase/articles/c2013175.asp

about the license code ... i passed that hurdle a little earlier!

ill take a good look at the suggestion and get back to you.

Thx
search for this document : "crnet_deployment.doc".

Yours is good too though
Avatar of DSE

ASKER

i found crnet_deployment.pdf ... i'd already ran through it :o/ and all seems to be in order.

I will go through it again in the morning with a fresh head!

Will return tomorrow. Thx for your help today.

DSE
No problem. I had lots of problem when i first try to deploy my app too. I understand man

Regards
Emre
Avatar of DSE

ASKER

Ive been through crnet_deployment.pdf and everthing seems to be in order.
hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm!
what about the license code, did you put that in the property of the app
Avatar of DSE

ASKER

ye thats sorted... that was the first hurdle i had to cross. The package wouldnt complie saysing something like "licenece key cannot be null"... so i registered and put it in. compiles ok now. So its not that...

I dont know man, maybe you are using the wrong merge modules. But you said you checked it. I dont know, I have done exactly what that document said andit worked for me. SOrry

Regards
Emre
Avatar of DSE

ASKER

ill start a new package project and see how that goes.

Ill shout back when i have a result either way.

Regards

DSE
ASKER CERTIFIED SOLUTION
Avatar of ebolek
ebolek

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Glad to help. Sometimes it helps to start from stractch

Regards
emre
Avatar of DSE

ASKER

thx very much for your persistant help!

by redoing the package from scratch i seem to have avoided the error this time.

I only added the merge files for crystal this time... so its essentially a cr.net dependancies installer... all is good as i can just copy the bin from the dev to the deploy for now.

I will make a tidier package at a later date including the whole lot.

Thx again!

DSE