Solved

Multiple versions of a crystal report file in vb.net

Posted on 2013-01-17
6
302 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

776 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