Solved

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

Posted on 2014-02-02
7
1,841 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 52

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
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
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 52

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 52

Expert Comment

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

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

810 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