Solved

Multiple versions of a crystal report file in vb.net

Posted on 2013-01-17
6
297 Views
Last Modified: 2013-04-02
I have a visual basic program that uses crystal reports.  I have made the required changes so that the reports are resources (not embedded) and get copied to the output folder.  What I need now is to have other versions of the reports in sub folders.  It is easy enough to load a report from the sub folder, but I was wondering if there was a trick to being able to have them in folders in visual studio.  If I put a report of the same name in the project, even if it is in a subfolder, I get an error.  Is there a way around this?

Jim
0
Comment
Question by:Jim_Wilcox
  • 3
  • 2
6 Comments
 
LVL 18

Expert Comment

by:vasto
ID: 38789397
You have to completely remove the reports from the project and load them in runtime. Then you may the report file from any folder.
If you wan tto use the same report with some changes in the record selection formula you shoul add a parameter instead of creating different versions of the same fiile
0
 
LVL 2

Author Comment

by:Jim_Wilcox
ID: 38789417
Its not so much record selection as it is the report layout is for a specific company.  The same report in the other folder is for a different company (i.e logo and such).  I was just hoping there was a way to manage all the different version in the Visual Studio environment.
0
 
LVL 18

Accepted Solution

by:
vasto earned 250 total points
ID: 38789437
You need to be able to identify the report. If you use Load method the identifier will be the path to the report. If you use named report instances inside the project then you need to change the class name of the report class
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 2

Author Comment

by:Jim_Wilcox
ID: 38789462
I have the part down about loading the correct one at run time.  I am wanting a way to maintain them in the development process in the develeopment environment.
0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 250 total points
ID: 38790287
Are you creating and modifying them individually or do you have a master that is updated then saved for the separate versions?

Why not come up with a naming convention that includes something in the name related to the company it is for
  Payroll_USB and Payroll_ATT

WIth that your application can include them in the deployment package and they can be easily identified as to the intended audience.

mlmcc
0
 
LVL 2

Author Comment

by:Jim_Wilcox
ID: 38811448
The way my program works, it always looks for a particular file name.  This is true for the crystal reports and other resources as well.  The only difference between companies is the folder where it locates the resources.  I have it worked out keeping it up manually.  I was just hoping there might be a way for Visual Studio to do it for me during development.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now