Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Multiple versions of a crystal report file in vb.net

Posted on 2013-01-17
6
Medium Priority
?
306 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 500 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
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!

 
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 101

Assisted Solution

by:mlmcc
mlmcc earned 500 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

715 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