Solved

Crystal Reports VS2008 C# convert to PDF with file name.

Posted on 2014-02-02
7
1,848 Views
Last Modified: 2014-02-05
Hey guys,

I have a function in my point of sale where clients can charge their purchases and at the end of the month we send a statement.  I would like to be able to programmatically create a pdf and attach it to an email for the customers that have email addresses.

Anyone tried something like this?

Thanks,
Jerry
0
Comment
Question by:JDL129
7 Comments
 
LVL 14

Expert Comment

by:Don Thomson
ID: 39827851
What you are trying to do is possible - "DEPENDING"   on what POS program you are using. I you install something like CutePDF writer, Then you can print to a PDF anywhere that you can print to a printer.

I Have to assume that when you do up an invoice it's either a CASH or an AR  Transaction

If each client that charges has an AR account then just run your statement at the end of the month and print it to the PDF creator program.  

As far as programmatically creating an email and automatically sending them out. Unless we are talking dozens and dozens of clients then I would want to check each statement that goes out before emailing it.   Most decent POS programs will have a method of doing this.

If you paid over $1200  per license for your POS - you can be reasonably  sure that that would be something they would have built in. Otherwise they should be able to add it in as a module.

If you paid under $1,000  for your whole POS system - well you gets what you pay for.
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 125 total points
ID: 39827852
0
 
LVL 53

Assisted Solution

by:Joe Winograd, EE MVE
Joe Winograd, EE MVE earned 125 total points
ID: 39827855
This C# code should be a good starting point for you:
http://csharp.net-informations.com/crystal-reports/csharp-crystal-reports-export-pdf.htm

EE no longer allows so-called "blind links", and one of the good reasons for this new rule is that links have a nasty habit of going away, so members looking for a solution to the same problem in the future may find the answer useless if it's just a blind link. So I have attached those captured pages as a PDF file and also attached the downloaded source code in a text file. Regards, Joe

<copyrighted material removed >
<mlmcc TA>
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 18

Expert Comment

by:vasto
ID: 39827892
Is this for software that you are selling or you are going to use it ? If you are going to use it there are tools that can do that for unbeatable price. Check for example this one: www.r-tag.com. As far as I know the viewer costs just $25 and is able to do what you want: get a list of records , run reports against each record and send emails with attached reports. Reports parameters' values and email addresses will be set from the records list.  All you need to do is to provide the sql which will return the list of customers, their e-mail addresses and parameter values for the reports and to click "Run". Video showing the process is available from this link:
http://www.r-tag.com/Pages/Preview_CreateBatchJob.aspx

This is know as data driven reports - the reports will be run depending on a data returned from the database. The sample shows the process started manually by the Report viewer.There are also more advanced versions, which will allow you to schedule the execution of the task so you can run it for example every night. There are bunch of schedulers available on the market. Check Ken Hamady's website to see a comparison:
http://kenhamady.com/desktopschedulers.pdf
Not all of the schedulers in the list support Data driven reports. As far as I know the feature is supported by R-Tag Report Mgr, remiCrystal and Report Runner Batch .
0
 
LVL 53

Expert Comment

by:Joe Winograd, EE MVE
ID: 39832986
In my previous post (http:#a39827855), Michael (@mlmcc/TA) removed the copyrighted material. Thanks to him for doing that! I did not see the copyright notice at the bottom of the page (net-informations.com (C) 2014, Founded by raps mk, All Rights Reserved). I always want to be in strict compliance with copyright law, so I really appreciate Michael correcting my error. I then sent an email to the copyright holder requesting explicit permission to post the article and source code. The holder (net-informations.com) granted permission, so I have re-attached the article and source code to this post. Regards, Joe
Csharp-Crystal-Reports-Export-to.pdf
csharp-crystal-reports-export-pd.txt
0
 

Author Closing Comment

by:JDL129
ID: 39836925
Thanks guys!!!
0
 
LVL 53

Expert Comment

by:Joe Winograd, EE MVE
ID: 39836978
Jerry,
You're welcome! Good luck with the project. Regards, Joe
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

830 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