Click here to Skip to main content
Click here to Skip to main content

Visual Studio Windows Application Setup Project

By , 29 Dec 2005
 

Introduction

I noticed that there are several articles on using Web Setup projects, but no articles could be found for Windows Setup projects. So I decided to share what I know about the VS Windows Setup Projects. I will be using the RunOnlyOnceCS.exe demo app I created for another CodeProject article, as the application we are creating the setup for.

Background

Sooner or later, you need to create a setup project for an application. Personally, I am not a big fan of this type of distribution for an application. Still it has its uses. Using a setup project can be a good solution for a Windows application that has many dependencies on other assemblies / DLLs. The setup will figure out what the dependencies are for the application and automatically include them.

Note: This does not include the .NET framework.

Creating a Setup Project

This article is going to rely on screen prints since there really isn’t any code for this. The output will be a *.msi file that will install the application file(s), and add a shortcut to the desktop and to the Programs menu.

Note: if the user does not have admin rights to their box, they will not be able to run the MSI script or install new applications on their box.

After you have created a new setup project, the first thing you will want to do is change the ProductName property on the setup project to match the application you are creating the setup for. I would also suggest changing the RemovePreviousVersion property to true. This is helpful when you want to release your next version of your app through this setup project.

Next, click on the "Application folder", then right click, and click on Add/File. At this point, you will be able to add the Exe you are trying to create the setup for.

Note: if you make changes to the Exe, you will need to re-compile the setup project as well. It might be a good choice to add a setup project to your Windows project solution. Then you can choose the project output option instead of the file.

Note: if you know what a merge module is and want to add one to the setup project, you need to right click on the setup project and click Add Merge Module.

Note: you must also add any config or icon files you may need for this solution, here:

Next, I always set the Always Create for the Program Directory to true. This is done by clicking on the "Application Folder" and then going to the properties.

Note: the DefaultLocation property will always be: [ProgramFilesFolder] [Manufacturer]\[ProductName]. If you want it to be something else, this is where to change it. Notice that the solution explorer has recognized the dependency or need for the .NET Framework for this app to run.

Note: this does not mean that the setup will install the .NET re-distributable framework. That is its own setup. The setup file is around 24 MB in size and can be downloaded from here.

Note: the setup can not install a .NET application without the .NET Framework already installed.

Next, we want to create a shortcut to our application on the desktop. First, click on the "User's desktop" folder. Then right click and click on "Create New Shortcut".

Next, you will see a dialog box to choose the application you want to create a shortcut to. Go to "Application folder" and add the exe you added in the previous step.

If you click on the "User's desktop" and go to the Properties window, you will see some options. Something I normally add to the shortcut is a check to see if it already exists. This is an example of what little coding you can do in a setup project. I have turned on AlwaysCreate on the shortcut property. In doing this, I need to have a condition or I will multiply my desktop shortcuts with every new release. So I set the Transitive property to True and I set the condition to FILEEXISTS1<>"Shortcut to RunOnceOnlyCS.exe", where what is in the "" needs to match the name of the shortcut.

Note: if you want your shortcut to have your application's icon, you need to add your icon file to the "Application folder". Next, click on the shortcut you just created in your "User's desktop". There is an icon property. Click the down arrow to get the dialog box. Navigate to the "Application folder" and select the icon file you just added.

Next, if you want to create a shortcut in the Start/All Programs menu, it is very similar to creating a shortcut on the "User's desktop". First, click on the "User's programs menu", then right click and add a folder. Name the folder the same as whatever your company or manufacturer name would be. Then, click on that newly created folder and add a shortcut just like we did in the step above.

Finally, when you need to create a new setup for the next release of your application, you need to go to the setup project properties and change the version before you re-compile the setup project.

Once you click off the version property, you will get a prompt to update the GUID for the ProductCode.

Note: if you do not click the Yes button in the dialog, you must manually get a new GUID for the ProductCode for the setup to properly remove the old program and install the new program.

Note Do Not: change the UpgradeCode GUID. If you do, the user will have to uninstall the old program manually before the new version can be installed.

One last note

One thing that is really nice about the Setup Project is that it automatically adds your Windows application you are trying to install to Add/Remove Programs. So once this has been installed, you can go to Add/Remove Programs and remove the app, and it will clean up all the files and folders that were created. I guess this is in part why you might be using a setup project in the first place.

Conclusion

I hope this article has given you a taste of how to use the VS Setup Project. It is not the perfect solution for distributing Windows applications, but it is useful in certain situations where this solution fits the need.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

kubben
Web Developer
United States United States
Member
I started my programmer career over 16 years ago doing COBOL and SAS on a MVS mainframe. It didn't take long for me to move into windows programming. I started my windows programming in Delphi (Pascal) with a Microsoft SQL server back end. I started working with vb.net when the beta 2 came out in 2001. After spending most of my programming life as a windows programmer I started to check out asp.net in 2004. I achieved my MCSD.net in April 2005. I have done a lot of MS SQL database stuff. I have a lot of experience with Window Service and Web services as well. I spent three years as a consultant programing in C#. I really enjoyed it and found the switch between vb.net and C# to be mostly syntax. In my current position I am programming in both vb.net and C#. Lately I have been using VS2012 and writing a Windows 8 app. You can search for the app it is called ConvertIT.
 
On a personal note I am a born again Christian, if anyone has any questions about what it means to have a right relationship with God or if you have questions about who Jesus Christ is, send me an e-mail. ben.kubicek[at]netzero[dot]com You need to replace the [at] with @ and [dot] with . for the email to work. My relationship with God gives purpose and meaning to my life.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionSetup Project Blog PostmemberMember 84856862 Apr '13 - 0:19 
this is my blog post about how to make .net setup project.
 
http://erhanncetinn.blogspot.com/2010/11/c-ile-setup-olusturma.html

Questionafter create setup project ,i got this error "operation must use an updateable query"memberaungkolatt6 Mar '13 - 22:50 
Hi Kubben,
Thanks for your article.I followed your article. After create my setup project,everything is ok. But ,when i insert data ,i got this error "operation must use an updateable query". my project created on vs 2008, ms access 2003, windows 7. So,how could i fix this error?
Please help me....Thanks Kubben
AnswerRe: after create setup project ,i got this error "operation must use an updateable query"memberkubben7 Mar '13 - 2:43 
So are you having a problem with the setup or with your application after the setup installs?
 
Ben
GeneralRe: after create setup project ,i got this error "operation must use an updateable query"memberaungkolatt8 Mar '13 - 13:57 
Hi,i have a problem,after the setup installs. When i insert data to my application,i got like that error. No problem for setup. Thanks for your reply.
GeneralRe: after create setup project ,i got this error "operation must use an updateable query"memberkubben8 Mar '13 - 16:00 
I am sorry, I might be able to help you if the problem was with installing your app.   Since the problem is with your app itself I am not sure how to help you.
 
Sorry,
Ben
QuestionThanks a lotmemberOmosilade6 Feb '13 - 0:50 
I have been trying to do this for weeks. I followed your article. It perfectly worked for me. Thanks again.
AnswerRe: Thanks a lotmemberkubben7 Mar '13 - 2:44 
Glad you were able to figure it out.
 
Ben
QuestionSetupmemberMember 438622724 Sep '12 - 20:21 
Hey Nice article. I had a question. I have added radio buttons in the setup(Setup1) so that what ever radio button(server,client) user selects that particular EXE (server.exe,client.exe) will be installed. It is working fine. But i have to give access to user for installing both setups in same machine. When i am running setup1 again it is saying repair setup or remove but not allowing to select another radio button. Can you help me on this?
 
Thankyou...
AnswerRe: Setupmemberkubben25 Sep '12 - 1:07 
Unfortunately, I am not sure if there is a way around this.   The product code GUID in the setup is used to determine if the setup has already run and the product is installed.   So your only option would be to recompile the setup project with a different product code, but then you would have two setups, so it kind of defeats the original purpose.   Sadly, in this case I don't think there is anything you can do about it.
 
Sorry,
Ben
QuestionThank youmemberparana2224 Sep '12 - 1:45 
Thank you veryyyyyyyyyyyyyy much.you explain it very very good
AnswerRe: Thank youmemberkubben24 Sep '12 - 6:42 
I am glad you liked the article and it was helpful to you.
 
Ben
QuestionAdmin Rights?memberomahaRibs22 Aug '12 - 4:47 
I stopped reading after "Note: if the user does not have admin rights to their box". No place i've ever worked gives users admin rights to their workstations, you will fail every IT security audit if you do that. Can this be used to create a silent install that does not require admin rights for users?
AnswerRe: Admin Rights?memberkubben22 Aug '12 - 4:54 
You know the issue with users not having admin rights just means that the user won't be able to install this setup on their PC.   My understanding is this is why they don't have admin rights.   Their company doesn't want them to install anything on their computers.   When that is the case, someone who does have admin rights will need to run the install.
 
When the user that is running the setup does not have admin rights it will be impossible to create new directories and copy files, create shortcuts, etc.   I don't know of any way of getting around needing admin rights when installing new software on someone computer.
 
Ben
GeneralMy vote of 5membersandeep nagabhairava26 Jun '12 - 17:57 
nice article...
QuestionPost installation at Clients end logic of application won't get updated even though version was chagne prior to releasemembersnehal220 Jun '12 - 19:38 
Hi.. I come accross with issue of inconsistant Overrite of older setup by newer setup with version change. Even though I changed of version number in Setup Application properties Some clients got older business logic and dll and some client got proper business logic & dlls installed at there end. Variance is client is running application with different logic which creates exceptions. Since Application validate version at start of exe it self, but in my case version number get updated to newer one, only logic of solution remains unchanged at few client's end.
 
please suggest me how to overcome the problem.
AnswerRe: Post installation at Clients end logic of application won't get updated even though version was chagne prior to releasememberkubben21 Jun '12 - 1:46 
Hi,
I have never run into that problem.   Are you sure the new business logic dll made it into the setup?   That would be my first guess.   If you properly update the version it should do an uninstall of the previous version before it installs the new version.
 
The only other thing I can think of is if for some reason the dll in question was manually copied.   There can be some issues if you manually copy files.   Sometimes these files will not be deleted by the setup.
 
Finally, you can strong name your dll and then give it a .net version nbr.   Then tell your exe which version of the dll it needs to run.   When you do this properly, your application will not run if it can not find the proper version of the dll it needs to run.   This can be a lot of work to do, but at least you will be sure that the propler dll has been installed.
 
Hope that helps.
 
Ben
GeneralRe: Post installation at Clients end logic of application won't get updated even though version was chagne prior to releasememberAniket112319 Dec '12 - 0:58 
I had created a setup of my project, which was window based offline and i want to run this setup to another machine. I tried and added the .net framework and SQL server database attached now "i am getting problem that server cannot find". i have changed server name into .exe file but it still not working....
GeneralRe: Post installation at Clients end logic of application won't get updated even though version was chagne prior to releasememberkubben19 Dec '12 - 1:40 
So you are getting this error while the setup is running, or after the setup has installed your exe?
It sounds like you are getting this error after the setup has installed you exe.   In that case there is a problem with your connection string.   Since you have mentioned that it is a windows case offline you are probably trying to connect to your local sql server.   So my guess is that you have a problem there.   You perhaps have your local sql server, but you didn't load the sql express engine or something like that, so it cannot find the local server?
 
I am kind of guessing here since you haven't given very much information.
 
Hope that helps.
 
Ben
QuestionHas this explanation and sample been upgraded for VS 2010memberkentuckyjoe13 May '12 - 14:31 
I have a project for which I would like to build a setup/deployment project. And I have VS 2010; using Visual Basic. The presentation is excellent but I'm having trouble following it and I believe it's because it was written for VS 2005. And guidance and help would be appreciated.
AnswerRe: Has this explanation and sample been upgraded for VS 2010memberkubben14 May '12 - 1:37 
You know the windows setup project has not really changed for VS2010.   It is kind of complicated, but I think this article does a pretty good job of step by step directions.   How far do you get before you get lost?
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkentuckyjoe14 May '12 - 2:05 
I think the article does an excellent job. I think maybe my concentration wasn't what it should have been and if it had been I may have been able to follow it thru. There is something specific I need to know and can't seem to find out. If I find out that the setup project does what I would like it to my concentration level will be as good as it can be (which is never very good).
 
My app needs Crystal Reports. And it needs some specific thing that I cannot find and thus cannot install. The client machine has the Crystal Reports runtime for .net framework 4 so you would think it would work; but it doesn't. My question is this. Does the VS 2010 setup installer somehow sense what the project requires and automatically include it? even things it may have to go elsewhere to get?
 
I manually cannot include it because I can't even find it. But maybe the setup project can find what the app requires. Can you give me any guidance on this. Thank you so much. And thank you for such an excellent piece. The number of responses to the thread is a great indicator of how much a presentation like this is needed.
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkubben14 May '12 - 2:42 
If your windows app references Crystal reports, then those dlls should show up in the detected dependencies.   When you setup your windows setup project you should add the setup project to your current solution that your windows app is in.   This way when you point to what you are creating your setup for you can point to primary output from your windows project.
 
It has been a while since I have worked with Crystal reports, but I believe you can in fact just include the dlls needed and install them along with your windows app.   It may take a little googling to figure out which Crystal dlls you need, but once you figure that out you can just include them by copying them into your bin directory of your windows app and then point the reference to the dlls in the bin directory.
 
Hope that helps.
 
Ben
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkentuckyjoe14 May '12 - 3:30 
Ben, thank you. It helps a lot. I'm understanding better and better. I am going to do just as you suggest.
 
I can see that my Crystal Reports problem will not be solved though. I have googled and searched and even though I see others have had the same problem it is almost impossible for me to resolve. I need to find the Crystal .dll that is needed and for some reason, for me, that is proving to be extremely difficult. But, I now know, that the setup project will not find it on it's own. When I do find it I will follow the suggestions you've made here. Thanks for your help Ben.
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkubben14 May '12 - 4:11 
Glad to be of help.   You know some of the Crystal dlls might be in the GAC (Global Assembly Cache).   That folder is c:\windows\assembly\
 
So it is very possible you will find the dlls there.   Other wise they would be under c:\program files\
 
Good luck.
 
Ben
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkentuckyjoe14 May '12 - 5:14 
Ben, thanks so much for your help. Let me give you some more information and see if you have any ideas or suggestions. I publish my project to a CD and take the CD to a client computer and click setup. The install begins but quickly fails with the following error message.
Unable to install or run the application. The application requires that assembly CrystalDecisions.ReportAppServer.CommonObjectModel Version 13.0.2000.0 be installed in the Global Assembly Cache (GAC) first. Please contact your system administrator.
 
I looked where you pointed me to (C:\windows\assembly\) and see that the file the error message they say is missing is on both my development computer and on the target, client computer. In other words - on both computers, it's there. Why it says it isn't, and why it isn't letting the install proceed is a mystery. Is there anything you can think of?
 
Thanks for your interest in my problem as I'm sure you have many other things to be doing on this Monday. jack
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkubben14 May '12 - 5:21 
I would be very suprised if that crystal dll actually has to be installed in the GAC.   I would guess you are just missing it in your bin directory.   With the .net model it will always check the folder the exe is in first, then it check the GAC later.   So the biggest question is where can you find that dll.   Have you tried using windows search to find it?   I would guess it is on your computer, the question is just where.   Once you find it you will want to copy it to your bin directory for your windows app and point the reference to it in the bin directory.   Once it is included in your windows application it will automatically come into your setup project since it will be part of the primary output of your windows app.
 
Ben
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkentuckyjoe14 May '12 - 5:27 
Thank you Ben. I'm going looking for that little bugger right now. Jack
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkentuckyjoe14 May '12 - 6:28 
Ben, the only place I could find this file, on both computers, is in the Windows Assembly folder.
 
Right now I have to be very cautious because I'm such a rookie I don't know what I'm doing. The app will install fine on the three or our other computers that I need to install it on and I'm afraid that if I start copying things to other places and trying to point references in different places I'll screw the thing up so bad it won't even install on the computers that it's currently having success on.
 
The computer I am trying to get it to work on is a brand new HP, Windows 7, 64 bit computer. This is the first time trying to put the app on such a computer. I haven't tried a Windows 7, 64 bit computer so maybe there is some incompatibility there.
 
I can code in VB okay but I'm a total dunce when it comes to setup projects, references, .dlls, dependencies, etc. I really want to learn how things work and how they're put together but I've got so far to go.
 
Thanks for your help and guidance and I'll keep studying and maybe I'll get to a point where I can, with confidence, do your suggestions and fix this thing and make it work on this new HP.
 
Thanks Ben. jack
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkubben14 May '12 - 6:43 
Jack,
 
You know it could be as simple as you need to run a Crystal redistrubutable that is for 64bit.
 
You can copy dlls out of the GAC, but you can't use windows explorer.   You can use a dos command.   I don't know how familiar you are with dos commands, but if you go to start\ run then type in cmd.   A command window will pop up.   Type in:
cd\
cd windows
cd assembly
cd gac_msil
 
At this point you will need to find the directory that the crystal reports dlls are in.   I would guess they will be called something with crystal.   You can do
dir
 
for a list of directories.   Once you get into the correct directory you can do the copy
something like:
copy yourcrystaldllnamehere.dll c:\temp
 
Once you have the dll out of the GAC you can install it on the other computer manually.
Putting things into the GAC is a lot simpler.
 
You can just open windows explorer to the windows assembly and then drag the dll into it.
 
Hope that helps.
 
Ben
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkentuckyjoe14 May '12 - 7:33 
Ben, I'm pretty good with the dos commands but I'm very confused about what I see. If I use Windows and open C:\Windows\Assembly I see lots of files listed that I assume are .dll files. But, when I use dos commands and go to C:Windows\Assembly I see only directories and not files. Using Windows I see only files but no directories, using DOS I see directories but no files. That's wacky. The directories I see using the dos prompt include GAC, GAC_32, and GAC_MSIL. However, in none of them do I see the files that showed up using Windows and those files included all of the Crystal Reports .dlls. That's wacky too.
 
I'm going to give you a break and take the dog to the vet. My brain needs a little airing out as well.
 
I do think this problem has to do with the 32 bit vs 64 bit. Since things work okay on the 32 bit computers it makes me believe this has something to do with it.
 
Let me ask one last question. Which computer should I be looking at; my development computer or the target installation computer. Thanks so much Ben. Jack
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkubben14 May '12 - 7:36 
Jack,
 
You will want to be looking at your computer where you know the crystal dll has been install in the GAC.   The folder structure is quite a mess, but I am sure the dll is there.   I am pretty sure it is under gac_msil.   I think you should find a crystal folder in the gac_msil folder, but I am not sure.   Like I said before it has been a while since I have worked with crystal reports.   Now I do all my reports with reporting services.
 
Ben
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkentuckyjoe14 May '12 - 10:39 
Ben, later I will go on a search and destroy mission for that file. Right now I only see it in C:\windows\assembly\. But what I really need to do is move the two reports I have to reporting services just like you did. I've been working on this project for five years or so and it seems like every problem I've had has been related to Crystal Reports. I would love to consign Crystal Reports to the ash heap of history.
 
And soon I'll return to the main subject of this thread and I apologise for getting you so far afield. I thank you so much for your help and guidance and you'll probably see me back again. Quite possibly in the setup thread. Thanks Ben. Jack
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkubben14 May '12 - 10:46 
Jack,
 
I hope you are able to get everything sorted and working.
 
Ben
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkentuckyjoe14 May '12 - 15:57 
Thank you Ben. I greatly appreciate the help you gave me today and I want to give you the highest ratings that I can. I'm not very familiar with the Code Project and how it works. If you can tell me how to do this I will appreciate it. Jack
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkubben15 May '12 - 1:37 
You are welcome Jack.   At the bottom of the article there is a place to vote for the article.   The highest you can give it is a 5 or excellent.   I hope you have a great day.
 
Ben
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkentuckyjoe15 May '12 - 2:03 
Ben, I hope I did it right. Thanks for all of your help. I've decided that my future health and happiness depends in large degree to getting Crystal Reports as far from my application, and me, as is humanly possible. My plan to try next is to write a text file and then use Microsoft Word to manipulate it to produce a report. My two reports are very simple and this may be a good solution. I've got 'some learning' to do but in the end whatever I end up with will be preferable to Crystal Reports. Thanks much Ben. Jack
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkubben15 May '12 - 2:37 
Jack,
 
I found the same.   Crystal is a real pain.   It is even worse if you are using it on a web site because you have to buy a license for each web site.   I hope your plan for removing them works out.
 
Ben
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkentuckyjoe16 May '12 - 15:11 
Thanks Ben.
 
I'm going to put up a post in the next day or two asking for input about the best way to proceed to get rid of CR; reporting services, automating Word, or maybe something else. If you see it please weigh in; I greatly respect your opinion. Jack
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkubben17 May '12 - 1:09 
Hi Jack,
 
I have an article on Word automation, but it has been a while since I have used word automation.   Unfortunatly, I only monitor the forums on my articles.   So if you have specific question you can post it here and I will respond.
 
Ben
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkentuckyjoe17 May '12 - 1:14 
Ben, I know very little about Word automation, just that it exists. It seems to me that this would be a viable option. Do you think that it is an idea worth exploring? Thx. Jack
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkubben17 May '12 - 1:28 
My suggection if you want to use word automation and do printing you will probably need to export what you are trying to print to a PDF format.   This is the most consistant format to print.   It should print the same on pretty much any printer.   Of course, tying printing the word automation makes it a requirement that your users have word (office) installed.   When I was doing word automation you had to install the .net hooks from office to get it to work in visual studio.   These are not ususally installed with a default install of office.   Of course, things may have changed since it has been 6 or 7 years since I have done word automation.
 
Currently I do all my reports in reporting services.   I mainly do web programming now with only a few windows apps here and there.   Anyway, there is a way to do a local reporting services report so you don't need a report server.   In this way you manually connect a dataset to a local reporting services report you can then export the report to pdf.   So a pdf would pop up for your user.   They just have to click the print button.   Anyway, I do this on web sites all the time.   I am pretty sure you can do it with windows apps, but I haven't tried it.   Normally, you just need to use the reporting services viewer control and create a reporting services rdl or rdlc report file.
 
Hope that helps.
Ben
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkentuckyjoe17 May '12 - 2:10 
Ben, I have to go out and will be gone most of the day. You have given me a lot of good information here and a lot to think about. Which is exactly what I'll be doing when I return. I'll reread and digest and I may have another question or two. The .pdf popup and print button sound perfect. Thanks for this guidance. Jack
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkubben17 May '12 - 2:43 
Sounds good.   Let me know if you have more questions.
 
Ben
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkentuckyjoe17 May '12 - 15:16 
Hi Ben,
I think I'm going to give the reporting services a try. I've got some 'book learning' to do but I like doing that. Another person advised me that that would be the best way to go.
 
My users do have Word as the database the app uses is Access and some of it's functions involve Excel so they have MS Office Pro. That wouldn't be a problem. But, it involves another product (Word) and that alone means more complexity. So, I think I'll try reporting services and I think it works just as you described. A viewer control and then the report itself.
 
Ben, one more question. One of my reports that I currently have in Crystal Reports is comprised of about 4 subreports. I assume I can put subreports into the reporting services methodology. Is this correct?
 
Thanks Ben. Jack
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkubben17 May '12 - 16:03 
Hi Jack,
 
To answer you question, if you mean sub reports in that you can have a plus and minus sign that allows the report to "drill down" into more detailed data, then yes you can do this in reporting services.   Sadly, reporting services doesn't do it as well as crystal.   I am not sure if that drill down works with a local report, at least I have not done it.   I have done some complicated reporting services reports and often the data behind the scenes is not very pretty.   That is one thing I wish reporting services did better.
 
If you have a more simple (no subreport) report I would do that one first.   It will give you a feel for how reporting services works.
 
Ben
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkentuckyjoe18 May '12 - 5:31 
Thanks Ben,
 
I don't have any drill downs so that will simplify things. I have one report that has 4 other separate reports (that I'm calling subreports) embedded in it but none of them are drill down. The report is on the health of animals in an animal shelter. There is one report for procedures (like spaying/neutering, ear cleaning, etc), one report for vaccinations, one for reminders; that sort of thing. I put these reports into a 'parent' report called 'Animal Health'. It's kind of hard to explain but I'm almost positive reporting services will accomodate it. And, the only other report is much, much simpler; there is nothing fancy about it. It just gives stuff like the name, breed, age, how acquired, etc. of the animal. Just individual data elements out of one Access table. I'll do that one first and learn a lot about reporting services in the process.
 
Thanks much for your advice and help Ben. I'll let you know how it goes. Jack
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkentuckyjoe24 May '12 - 14:15 
Ben, let me ask you a question. When you do a report do you use either the reportViewer control or the printDocument control? I'm still struggling on printing and I was wondering if you use either or both of those controls to produce your reports. Thanks Ben. jack
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkubben24 May '12 - 14:59 
Jack,
 
I use the report viewer control.   I just use it so I can export the report to PDF.   Once the PDF comes up the user still has to click the print button on the PDF.
 
Ben
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkentuckyjoe24 May '12 - 15:25 
Beautiful, got it. It's been like pulling teeth for me but I'm finally starting to make some progress. I can see a way out of the darkness. I think this printing is going to be a lot of fun. Once I get the reports done I'll do away with Crystal Reports and then use your deployment package instructional to put together the methodology for deploying the app and I'll be in business. Thanks so much Ben. jack
GeneralRe: Has this explanation and sample been upgraded for VS 2010memberkubben24 May '12 - 15:31 
I hope it works out well.   Let me know if you run into problems.
 
Ben

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 29 Dec 2005
Article Copyright 2005 by kubben
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid