|
You can use the following code send you excel file as an attachment from your application.
it use an smtp server,please enter proper email id as marked in the comments , i have tested it from a gmail account
Dim smtpClient As New Net.Mail.SmtpClient()
Dim mail As New Net.Mail.MailMessage()
'create the message to be sent
mail.To.Add("test@test.com") ' Enter the Email of the person you want to send the mail to
mail.From = New Net.Mail.MailAddress("username@gmail.com", "Your Display Name") ' Enter Your email address
mail.Subject = "Test Message"
mail.Body = "This is a test message"
' Prepare the client to send the above message
'Attach the file as attachment
mail.Attachments.Add(new System.Net.Mail.Attachment("yourFileName.xls"))
smtpClient.Host = "smtp.gmail.com"
smtpClient.EnableSsl = True
smtpClient.Port = 587
smtpClient.Credentials = New Net.NetworkCredential("username@gmail.com", "password") 'Enter username and password of the account , you want to use to send mail
smtpClient.DeliveryMethod = Net.Mail.SmtpDeliveryMethod.Network
smtpClient.Send(mail)
Hope this helps
-Regards
Bharat Jain
bharat.jain.nagpur@gmail.com
|
|
|
|
|
This works like genius Bharat. Many thanks
|
|
|
|
|
Hi,
I'm using cr 8.5 and vb6. I'm using crystal report control component in my application. I've created report with two parameters. My report is working well alone by refreshing and passing parameters. But I'm facing problem in vb6, while I call report with passing parameters. I'm getting Invalid parameter field value. This is my code below.
cr1.ParameterFields(1) = "pBankCode;" & lstrBankCode & ";True"
cr1.ParameterFields(2) = "pDate;" & Format(cmbPaymentDate, "dd/MM/yyyy") & ";True"
cr1.ReportFileName = App.Path & "\rptCovLetToCommodityPmnts.rpt"
cr1.Action = 1
Pls. anybody give me the soln. I tried in different ways. Tnx in adv.
Balasubramanian K.
|
|
|
|
|
BalasubramanianK Wrote<quate>But I'm facing problem in vb6, while I call report with passing parameters. I'm getting Invalid parameter field value.
Why do you still use vb6 in 2009 ?
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswam@its.co.za
|
|
|
|
|
Yes. Mr.Vuyiswa Maseko.
My company's old prj.
Balasubramanian K.
|
|
|
|
|
Never done it in vb6 but in .net there is a method
'setparametervalue(paramname,paramvalue)'
check if you have this (watch out paramname is case-sensitive I think)
Also you set the parameters after you loaded the report and (if needed) reconnected it. So right before you show the report.
|
|
|
|
|
Firstly, Thank you for your reply. I've done in dot net well. I could pass parameter from the application. But here, I'm facing pbm in vb6 and cr 8.5.
I tried in both ways such as set parameters before and after assign the report. In both ways, I'm getting the same problem. Eventhough, I googled also, But I was getting the posts only not replies.
Balasubramanian K.
|
|
|
|
|
hi
i published one vb.net project with ms access database..... while publishing my project one error occurred like this...could not find c:/documents and settings....................../database.mdb...... how to handle this......
|
|
|
|
|
Remmber your Development Path will not be the same as your Cliients Path. VS does not Do it for you Automatically. The Error means it cant find the Database. If you have hardcoided your connection string, you shoud consider putting it in a Config File and read it from there. When you create a setup Project add the database to your Application and when you install the Application it will be in the Application Folder and make sure that the Connection string in your Config file points to the Application Folder not my Document....................
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswam@its.co.za
|
|
|
|
|
Hi,
Looking for a bit of help. What I want to do to filter a table in my database by a month select. So for example I want to see the results for January. I have populated my dataset with all the records in my database when I first start my application.
da.Fill(ds,"Records) 'da is my dataadapter and ds is my dataset
So is there some way I can filter my dataset to show the results that I just want or should I re populate my dataset with the dataadapter using a SQL Statment such as SELECT * Records WHERE etc... Is there anyother way
Thanks for your help
|
|
|
|
|
Work with the Select method provided in DataTable class.
|
|
|
|
|
Thanks, the select method worked great
|
|
|
|
|
use can use DataView
see this
http://www.csharp-examples.net/dataview-rowfilter/[^]
Hope it helps
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswam@its.co.za
|
|
|
|
|
Hi, I'm new to VB.Net.
I want help to develop a Time sheet project.
Abstract:
employees log-in and log-out time has to be entered,hours worked on a particular project has to be entered,status of the projects should be managed,personnel information of the employee has to be maintained,payroll report has to be prepared with the information.
Can anyone guide me on this.
Thanks in Advance
|
|
|
|
|
Take a look at the "Employee Starter Kit" and the "Time Tracker Starter Kit"
Your question is rather broad. You'll need to create a database and a GUI - but most off all, you'll need to define some specifications. Where are the employees names' stored? Are you going to retrieve them from an Active Directory? Or do they sign-in in your application? What information is expected in the payroll report? Do they have to include special rates for working in the weekends?
Lots of questions, hope they help to get you started.
I are troll
|
|
|
|
|
thanks for ur reply.
it would definitely help me to prepare a detailed specification.
will soon get to u with the spec
thanks a lot
|
|
|
|
|
Aim:
A web based system which manages the Project related activities as well as Team related activities at a central location.
Abstract:
This system captures all the daily activities of the project and team and provides the appropriate interface to manage both the type of data in a centralized location.
The system works on level wise. This means that: Department manager, Project Manger, Project Leader and Team member have different types of login accounts.
The system provides a graphical representation of individual utilizations.
It generates weekly or monthly timesheet reports.
Relevant information regarding projects and teams are always available to the users which makes them well informed about the status.
Level wise system activity: Team Members
They input daily timesheet and leave details into the system.
System provides them with the summary of their inputs.
System also provides them with the progress of the project.
It provides them with their utilizations.
Level wise system activity: Project Leaders/Project managers
Adding new packages to the projects.
Allocating team members to the packages.
The system provides the Team Performance, Package progress, generates individual time sheets for team members.
Kindly help me out with this abstract/specification
Thanks
|
|
|
|
|
That's a good start actually
You've now got a short list of what the customer expects of the application. Lets call this the "Customer Spec". The track described here is loosely based on a formal approach. That means that it's more time-consuming than just firing up Visual Studio and starting to pound code - whether that's worth your time, is up to you.
The extra documentation gives a better view on the size of the project, and thus gives you a better indication of the time required to build it. It's a lot of work, and some steps may seem trivial enough to skip. To sum it, there are three important documents that are generally 'done';
- A definition study
Being a short list of wishes on which you base the Functional Specs. We named this the "Customer Spec", and you've already completed it.
- A functional specification
Detailing how each screen will look, what the different buttons do and so forth. This is based on the previous document, and will give your customer an idea what to expect.
- A technical specification
Detailing how you're going to build the screens that you mentioned in the funtional specification.
Following this route, you'd need to build a Functional Spec next. Joel Spolsky has done some great articles on the writing of functional specifications that you can find here;
Painless Functional Specifications
* Part 1: Why Bother?
* Part 2: What's a spec?
* Part 3: But.. How?
* Part 4: Tips
There are two examples on his site that you can view;
* WhatTimeIsIt (An example specs based on a fictional product)
* The Aardvark Spec (Real spec from a real product)
Once that is done, you could opt to translate this functional design (how does it look & work) to a technical design (how is it going to work?)
vijay2482 wrote: Aim:
A web based system which manages the Project related activities as well as Team related activities at a central location.
Here you have identified two important entities. You'll have to flesh them out into detail in the TechSpecs; what facts are you going to store about a project? What facts are you going to store of a Team? How do the entities relate to each other?
This is the start of your database-design, and might look something like this for Project:
Table: Project
----------------------------------------------
ProjectNumber (number)
ProjectName (text)
ProjectInitiationDate (datetime)
ProjectDescription (text)
ProjectLeader (reference to Employee-table, or just text?)
Defining these things helps in creating the structure. As it shows in the example above, it's not sure from the "Customer Spec" whether it's enough to store the name of the project-leader. These kind of "holes" in the design become apparent once you start working out the structure.
vijay2482 wrote: The system works on level wise. This means that: Department manager, Project Manger, Project Leader and Team member have different types of login accounts.
The system provides a graphical representation of individual utilizations.
Let's call the different types of login accounts "Roles". A "Employee" has a "Role", and depending on his/her Role, they can or cannot view/do things. ASP.NET has some standard-controls that could help you provide this functionality. More information on Users and Roles can be found here[^].
vijay2482 wrote: It generates weekly or monthly timesheet reports.
Relevant information regarding projects and teams are always available to the users which makes them well informed about the status.
Do you have examples of how these should look like? What information does the weekly report contain? What SQL-queries would you need to retrieve that information from your previously defined model?
That's a lot of questions to answer, and like I said before, it's a lot of work. Then again, it's easier to change the specs then it is to change sourcecode
Hope this helps,
I are troll
|
|
|
|
|
oh, their is a lot to do in documentation before starting the coding
will start to do each spec and understand the essentials before getting into the scripting work
thanks
|
|
|
|
|
vijay2482 wrote: oh, their is a lot to do in documentation before starting the coding
Documentation is the first thing that's skipped.. Still, I wouldn't want to build a house without a plan and some drawings.
Documentation is also a way to protect yourself. Your customer/boss/employer might think that it's easy to write a 'small' TimeSheet-project, and he might start making a list of features/reports/wishes that's long enough to keep 10 programmers occupied for a year. The document breaks your assignment into pieces, and lot's of pieces are lots of work.
I just hope that I didn't discourage you with the amount of documentation
I are troll
|
|
|
|
|
Abstract Classes
An abstract class is the one that is not used to create objects. An abstract class is designed to act as a base class (to be inherited by other classes). Abstract class is a design concept in program development and provides a base upon which other classes are built. Abstract classes are similar to interfaces. After declaring an abstract class, it cannot be instantiated on it's own, it must be inherited. Like interfaces, abstract classes can specify members that must be implemented in inheriting classes. Unlike interfaces, a class can inherit only one abstract class. Abstract classes can only specify members that should be implemented by all inheriting classes.
More Details : Abstract
|
|
|
|
|
|
|
I have been asked to include a line to send an email within an XL macro.
ActiveWorkbook.SendMail _
Recipients:="someone@somewhere.com", _
Subject:="Bank Balances " & Format(Date, "dd/mmm/yy")
This line works fine, but I get a warning...
"A Program is trying to send an email on your behalf. If this is unexpected, click deny and verify your antivirus software is up to date.
Allow Deny Help"
Is there any way to circumvent this?
I am dealing with a man who is totally techless, I need him to click one button and job done, so warnings like this are beyond him.
(My Managing Director (!))
------------------------------------
"The greatest tragedy in mankind's entire history may be the hijacking of morality by religion"
Arthur C Clarke
|
|
|
|
|
There is a way around this by using a third party DLL. It's called Outlook Redemption which gets works around the secuirty issues of Outlook, like the one that you mentioned. Take a look at http://www.dimastr.com/redemption/[^]
|
|
|
|