Solved

Multiple versions of a crystal report file in vb.net

Posted on 2013-01-17
6
305 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
Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

 
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 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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

729 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