Solved

Multiple versions of a crystal report file in vb.net

Posted on 2013-01-17
6
304 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…

726 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