|
My frd just write a custom action that will do the job for you and then add it in the setup project using Custom Actions view.
To create a custom action, add a new project of type "Class Library", then add an installer class and override its "Install" and "Uninstall" methods. Both methods contains an argument of type IDictionary which can be used to store information that you want to pass to uninstaller from the installer. Call your config update logic from the install method.
Finally add this project in setup as custom action from custom action view.
Akif
|
|
|
|
|
Thanks so much for the help it was exactly what i needed much appreciated
Ryan
|
|
|
|
|
Hi, happy new year!
For me it is not starting very well, with VS2005 at least.
I have been using crystal report form vb6 up to now, not because I like it, in fact I don't, too many bugs. But now with VS2005 I believe it is worse!!
I wrote a class in VS2003 that can be called to preview and generate reports. When I had to move to VS2005 (big sigh!!) in december last, I tried to re-used that class. I converted it fine, until I write a report using parameters.
The class I used in the previous version of VS were working fine up to now.
With this actual version of Crystal report It seems to me that the parameters are not transferred to crystal report.
Below is one of the overloaded proc that I use. When compiled it generates no errors but when the report is loaded crystal keeps on prompting for the parameters. Could any one figure out what is wrong.
Thanks to help.
public void ReportON (string ReportName,string ParameterName1,string ParameterName2,
string ParameterValue1,Single ParameterValue2)
{
string repToload=null;
try
{
this.Cursor=Cursors.WaitCursor;
repToload = ReportLoc + ReportName;
reportDocument1.Load (repToload,CrystalDecisions.Shared.OpenReportMethod.OpenReportByTempCopy);
}
catch
{
MessageBox.Show ("Report template missing." + "\n"
+ "You need to run setup again to repair the installation.","Report Viewer",MessageBoxButtons.OK,MessageBoxIcon.Error);
this.Cursor=Cursors.Default;
return;
}
SQLcnx.ConnectionString = DBconnect.connection;
#region reset login info (overiding of crystal local server login)
CrystalDecisions.CrystalReports.Engine.Table CurrentTable;
CrystalDecisions.Shared.TableLogOnInfo CurrentLogin;
reportDocument1.Load (repToload,CrystalDecisions.Shared.OpenReportMethod.OpenReportByTempCopy);
CurrentTable = reportDocument1.Database.Tables[0];
CurrentLogin = CurrentTable.LogOnInfo;
CurrentLogin.ConnectionInfo.ServerName = DBconnect.ServerName;
CurrentLogin.ConnectionInfo.UserID = Registry.CurrentUser.OpenSubKey("GreenWorm\\PRMS\\Data").GetValue("accName").ToString();
CurrentLogin.ConnectionInfo.Password = Registry.CurrentUser.OpenSubKey("GreenWorm\\PRMS\\Data").GetValue("passWord").ToString();
CurrentLogin.ConnectionInfo.DatabaseName = "PRMSdb";
CurrentTable.ApplyLogOnInfo(CurrentLogin);
#endregion
reportDocument1.SetParameterValue (ParameterName1,ParameterValue1);
reportDocument1.SetParameterValue (ParameterName2,ParameterValue2);
SQLdataAdapter.Fill(repDataset);
reportDocument1.SetDataSource (repDataset);
crystalReportViewer1.ReportSource = reportDocument1;
this.Show();
this.Cursor=Cursors.Default;
}
Joseph Robert
|
|
|
|
|
Hi All,
I want to watch a particular registry key and whenever any sub key under this key changes i am trying to get the name of that subkey.for getting when a particular key is changed I can use RegNotifyChangeKeyValue but this only tells me that the key has been changed it didn't tell which subkey has been changed under the key which i am watching.One way will be i can compare the registry tree befor and after the changes which will be a very clumsy and tedious solution.Any suggestions how to do this?Any help will be greatly appreciated.Thanks in Advance.
Rakesh
|
|
|
|
|
I try to run my C# application from a network drive and I get a Security Exception saying: "Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
Why does this happen? what should I do?
|
|
|
|
|
capuano wrote: Why does this happen?
Running an application from another computer is not a trusted action. In other words, your computer does not trust that the assembly sitting on the other computer is acceptable to run on your computer.
capuano wrote: what should I do?
This is from a guide I wrote regarding a .NET 1.1 application. It should be approximately the same:
Trust needs to be set up for windows applications written for the .NET framework to run through the on remote machines via UNC paths.
* Launch "Microsoft .NET Framework 1.1 Configuration" from the Administrative Tools programs folder.
* In the tree control on the left expand the elements My Computer ~ Runtime Security Policy ~ Machine ~ Code Groups ~ All_Code ~ LocalIntranet_Zone
* Ensure that the LocalIntraner_Zone node is selected so that the panel on the right is headed LocalIntranet_Zone Code Group.
* Select the "Add a Child Code Group" link in the right panel.
* Give the new Code Group the name "What ever name you want"
* Press Next
* Choose the condition type of "URL"
* In the URL box type the full URL to the wincode directory, e.g. file://server_name/share_name/folder_name/*
* Remember to include the asterisk to ensure that all assemblies can run
(For a more restrictive set each assembly can be individually named in its own code group)
* Click Next
* Choose the permission set "Full Trust"
* Click Next
* Click Finished
* A reboot may be necessary.
The above may or may not be acceptable to your situation - but you'll see where you need to make changes and with some experimentation you can see what other things are possible too.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
I have to develop and email notification system, all the employees will keep their TO DO list in Sql server and an email notification will be fire to them before some specific perioud of every Job to do ...
Kindly tell me pacakages n libs used for this work.
R A M
|
|
|
|
|
Hi,
Better you create a seperate visual basic application and make an exe for that application, and add that exe to schedule task
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
Prakash, using schedule task is better when we have to run only one executable. But there may be more than 1 emails to be sent by my application
R A M
|
|
|
|
|
Hi,
can you explain me how you are getting the mailing list. My opinion is get a mailing list count and use for loop to send a mail. I think you might get the clue.
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
that is not what u r saying .. i will get email list from DB but i dont have to send all the emails at once. but every email will be sent after a specific period(defind by user previously in db)
R A M
|
|
|
|
|
Hi,
Can you explaim me detailed procedure for send email (mean that how u will get list , which time you want to send mail) so that i can try with my best.
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
The time of notification is not known infact user save it in database, u r interpreting the problem wrong. Infact i have to make some type of service that would continuously listen to the db.
R A M
|
|
|
|
|
How about writing a service that polls the database? Sending email is trivial, look for the System.Web.Mail namespace.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi,
I tried but could not find much help regarding reading config file in .Net2.0.
based on what i read i did the following:
string xxx= ConfigurationManager.AppSettings.Get("XXX");
but
i get the following error msg while compiling:
'System.Collections.Specialized.NameValueCollection' is defined in an assembly that is not referenced. You must add a reference to assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. C:\projects\mobilife\CAA\src\Fokus\Caa\Main\CAAMain.cs 82 17 CAA
|
|
|
|
|
You have no reference to the System dll, or it's the wrong version. Add the reference, or if you have one, remove it and add it again so that you get the correct version.
---
b { font-weight: normal; }
|
|
|
|
|
thanks, but how do i add reference?
sorry.. newbie
|
|
|
|
|
Right click on References in the Solution Explorer.
---
b { font-weight: normal; }
|
|
|
|
|
hi,
i removed the reference and added reference to System.dll once again but i still have the same problem.
any idea?
|
|
|
|
|
Is it just this project that acts up? Do you have any other project that works or not works?
---
b { font-weight: normal; }
|
|
|
|
|
aha...
i created a new project and it works there.
my previous project was for PocketPC. does it mean that this is not supported in Compact framework?
if so then what r other possibilities to read configuration properties.
thanks a lot for your help.
regards,
|
|
|
|
|
No, of course a NameValueCollection is supported in the Compact Framework. It's used for a lot of things, like Request.Form and Request.Querystring.
---
b { font-weight: normal; }
|
|
|
|
|
what about methods to read configuration file?
i get the error when i do the following:
string xxx = ConfigurationManager.AppSettings.Get("XXX");
is it the problem with System.configuration.dll file which i have to reference it?
|
|
|
|
|
The System.Configuraiton namespace is in the System.dll file.
If you get the same error message, it still has nothing to do with reading the configuration file, it's some problem with the reference.
---
b { font-weight: normal; }
|
|
|
|
|
i guess so.. do you think it is the problem with the additional reference: System.configuration.dll that has ConfigurationManager?
|
|
|
|