How to use email function in crystal report ?

Post Author: kudo
CA Forum: .NET
Hi I'm a novice by touching .net not more than 2 months. Can somebody guide me how to use email function provided in crystal report components?(Better put a sample code so that I can understand well.)  ps: I'm using VS2005 VB.net.Thanks.

Post Author: mewdied
CA Forum: .NET
'EXPORT to EMAIL        ''' Code for exporting the report to Mapi (.Net Windows application)        ''' *For a Web application you must export to disk as a PDF file first.
        crReportDocument.Load(Application.StartupPath + "\World Sales Report.rpt")        crMicrosoftMailDestinationOptions = New MicrosoftMailDestinationOptions        With crMicrosoftMailDestinationOptions            .MailCCList = "[email protected]"            .MailToList = "[email protected]"            .MailSubject = "Attached exported report"            .UserName = "admin"            .Password = "password"        End With
        crExportOptions = crReportDocument.ExportOptions        With crExportOptions            .DestinationOptions = crMicrosoftMailDestinationOptions            .ExportDestinationType = ExportDestinationType.MicrosoftMail            .ExportFormatType = ExportFormatType.PortableDocFormat        End With
        'Add some error handling        Try            crReportDocument.Export()            MsgBox("Report exported successfully.")        Catch err As Exception            MessageBox.Show(err.ToString())        End Try
Hope this helps

Similar Messages

  • How to use oracle functions in Crystal Reports XI using Oracle Server

    Hi all,
    Is it possible  to use oracle functions in Crystal Reports XI using Oracle Server as Data Source.
    If i try to use a procedure,i am getting error with message "Invalid Arguement Provided".
    Functions are not visible objects like tables,views and stored procedures.
    The  jdbs driver i m using is oracle.jdbc.driver.OracleDriver.

    I think it is not possible to add functions in crystal directly for any database. You need to use those functions in a stored procedure and add that storedprocedure as a datasource.
    [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233353335333833323333%7D.do]
    regards,
    Raghavendra

  • How to use the DLL in crystal report (Additional applications)

    Hi,
    i have created a win32 dll, and now i want to use that dll in my crystal report how can i do so?, what i tried is i went to to Addntional functions catagory in formula workshop, and there i can see some dlls listed, similary i put my dll in the same path like "C:\Program Files\Common Files\Crystal Decisions\1.0\Bin" and other folder too. but i am not able to see that dll in "Addtional functions". can you plesase tell how can i achive this.
    Regards,
    Prabhakar J.

    Please re-post if this is still an issue to the .NET Development - Crystal Reports Forum or purchase a case and have a dedicated support engineer work with you directly

  • How to call C++ function in Crystal report

    Hi,
    i am working on serious issue now, i need some help, Could you please tell me how can i call my C++ method in crystal report designer (may be formula editor), i can see only this support VB and Crystal basic.
    Regards,
    Prabhakar J.

    Hi Prabhakar,
    The name of the UFL dll must begin with U2L. Rename your and if it's compile properly CR should find it when loading all of it's dependencies.
    Check the developers help file and search for Custom User Function Library.
    I should also mention that UFL's only support MBCS string formats so if you define them they must be defined this way or CR will have problems passing them from/to your UFL. CR uses UNICODE format internally but the UFL bridge will thunk them to MBCS format on the way out and expect that format on the way in. There is a possibility of data loss in the conversion routines.
    Thank you
    Don
    Edited by: Don Williams on Jun 12, 2009 11:24 AM

  • Using Sql Functions in Crystal Reports

    Can SQL table-valued functions be used in Crystal Reports?  The only options I see in the Database Expert are Tables, Views, and Stored Procedures.

    Hi Dan,
    Are you referring to user-defined SQL functions? If yes, then these are not accessible in Crystal Reports.
    You would need to create a stored procedure which calls the function and does the processing and use this procedure in CR.
    - Abhilash

  • How to use CRAXDDRT.DLL in crystal report 2008?

    Hello All,
    We have purchased Crystal report 2008 Full software.
    We need to insert BLOB field into Crystal report 2008 at runtime using *CRAXDDRT.DLL*.
    How can I insert OLE object and bind it at Runtime using crystal report 2008?
    Is it possible to insert Ole Object runtime using crystal report 2008? If yes how and if not is there alternative to perform this job.
    Please let me know your feedback.
    Thanks

    CrxDDrt.dll is only provided in order for the Crystal Reports designer in the .NET IDE.
    1) You are not licensed to use this CraxDDrt.dll
    2) Even if you were, in previous versions of CR, there were licensing implications to using the craxDDrt.dll (read $$)
    3) Once your project would be done, using CR 2008, you would not be able to distribute the runtime as there is no CR MSM or MSI that contains the craxDDrt.dll and it's supporting runtime.
    In your original post you say:
    "I need to show Word and Pdf file in to Crystal report 2008 using CRAXDDRT.DLL";
    I do not understand why you'd need to do this using the craxddrt.dll? You should be able to insert a BLOB field using the RAS SDK for .NET and CR 2008. Now, one hting you will have to keep in mind. If you insert a multipage .doc or .pdf file into the report, you will only get the first page of that document. I suggest you try this in the CR designer first. Always remember that if you can not do a certain thing in the designer, you will not be able to do it at runtime either. Giving all the limitations above, if you are still interested in doing this using RAS, let me know and I'll set you up with some resources to get you going.
    Ludek

  • How to use stored procedure in crystal report for eclipse

    Hi;
    I am working on crystal report for eclipse 2.0 and  trying to use stored procedure in report .It is created from Oracle but it is not showing any dependencies
    CREATE OR REPLACE procedure ACT_DB.getCostTransferDetails
            p_In_Contract_ID         varchar2 DEFAULT  '*',
            p_In_Status_ID           varchar2 DEFAULT  '*',
            p_In_COST_TRAN_DATE      varchar2 DEFAULT  '*',
            p_In_DEPT_ID             varchar2 DEFAULT  '*',
            p_In_PROJECT_ID          varchar2 DEFAULT  '*',
            p_In_EMPLOYEE_ID         varchar2 DEFAULT  '*',
            p_Out_CostTransfer_Cusor OUT COST_TRANSFER_PACKAGE.COST_TRANSFER_TYPE
    AS
    BEGIN    
            OPEN p_Out_CostTransfer_Cusor FOR
            SELECT
                header.cost_tran_id,
                header.cost_tran_date,
                header.total_credit_amount,
                header.total_debit_amount,
                header.transfer_status,
                header.updated_by,
                header.added_by,
                header.trf_over_ninety_days,
                header.business_unit_id,
                header.equip_approval,
                header.batch_desc,
                details.opr_unit_id,
                status.status_id,
                details.fund_code_id,
                details.prgm_code_id,
                details.class_id,
                details.activity_id,
                details.product_id,
                details.status_id,
                details.transaction_amount,
                details.jrnl_date,
                details.adjust_prcnt,
                details.adjust_amnt,
                details.details_equip_approval,
                details.detail_desc,
                details.account_id,
                details.project_id,
                details.dept_id,
                details.contract_id,
                details.reason_code_id,
                details.jrnl_id,
                employee.f_name,
                employee.l_name,
                employee.employee_id,
                project.project_id,
                project.project_status,
                --header.transfer_status,
                contracts.contract_desc 
              FROM header, details, status, employee, department, project, contracts
             WHERE     (header.cost_tran_id = details.cost_tran_id)
                    AND (header.cost_tran_date = details.cost_tran_date)
                    AND (header.transfer_status = status.status_id)
                    AND (department.dept_id = details.dept_id)
                    AND (department.dept_id = employee.dept_id)
                    AND (project.project_id = details.project_id)
                    AND (contracts.contract_id = details.contract_id)
                    AND (details.Contract_ID = p_In_Contract_ID OR p_In_Contract_ID ='*' )
                    AND (header.TRANSFER_STATUS = p_In_Status_ID OR p_In_Status_ID ='*' )
                    AND (TO_CHAR(details.COST_TRAN_DATE, 'MM/DD/YYYY') = p_In_COST_TRAN_DATE OR p_In_COST_TRAN_DATE ='*' )
                    AND (details.DEPT_ID  = p_In_DEPT_ID  OR p_In_DEPT_ID  ='*' )
                    AND (details.PROJECT_ID  = p_In_PROJECT_ID  OR p_In_PROJECT_ID  ='*' )
                    AND (header.ADDED_BY  = p_In_EMPLOYEE_ID  OR '*'=p_In_EMPLOYEE_ID  )
    Can any another way to make procedure
    Thanx
    Regards ,
    Amol

    Hi Amol,
    Are you able to execute your stored procedure from oracle?.
    - If "Yes" then use  the Crystal Report XIR2 Designer to create the report.
    - Import this report in the Crystal Report For Eclipse Workbench.
    - The latest version for Crystal Report For Eclipse is SP1.
    Please let me know the results.
    Thanks,
    Neeraj

  • How to use CSSClas property in Crystal Reports?

    Hi,
    In object properties --> Common, there is an option to select CSSClass Name.
    I am trying to find where we can define the class definition. So that we can use CSSClass for an object for formatting.
    Any idea would be greatly appreaciated.
    Thanks in advance
    Regards,
    Gowtham.

    Hi Ashwin,
    Thanks for reply.
    I am using Crystal Reports XI R2. But the steps given in the provided in link are different. When I open a report and right click, so such option available.
    Am I missing anything here?
    Thanks in advance.
    Regards,
    Gowtham.

  • How to use OLAP cubes in Crystal Reports R2?

    Dear All,
    I hope someone can help me with the following issue: We are trying to link Crystal Reports XI-R2 with an OLAP cube but the login keeps on failing while the same setup/connection works with Excel.
    The OLAP cubes are created through SSAS 2008 and require a windows account for authentication. Because it works via Excel (through pivot table --> external data) the cubes are accessible and the username & password are correctly as well.
    Through the OLAP wizard in Crystal Reports the following message is displayed: "The connection could not be established. The logon attempt failed".
    Thank you in advance.

    Hi,
    Please check the trouble shooting guide in this article: /people/reuben.cox/blog/2009/12/10/troubleshooting-olap-connectivity-in-business-objects-products
    If, after performing these tasks, it still doesn't work, please reply back to this thread with more details about what you have tried and what doesn't work.
    Reuben

  • How to use serial numbers in Crystal Reports?

    I want to use serial numbers in Invoices and Packing Lists in the report I built in Crystal. Is there a easy way to do that? I searched the forum but no helpful answers could be found.......

    I need more help! I did the following for my Invoice: OSRD-INV1 join by ItemCode and DocEntry
    DLN1-OSRD join by DocEntry and INV1-OINV join by DocEntry
    I'm sure this is not good. What are the right joins and which field from which table has to be placed in the Report? Thanks for your help, we just got life from April 1st, so I'm new with this....
    Edited by: Frits Pen on Apr 13, 2009 2:38 PM
    Edited by: Paulo Calado on Jun 12, 2009 4:56 PM

  • Using HTML script in Crystal Reports??

    Can anyone let me know how to use HTML scripts in Crystal Reports?
    I just need to develop report using HTML so that the output of the report will be in RIch text fomat

    Hi,
    You can't design a report using HTML script.  I'm not exactly clear on what you want to do but if you have an HTML app, you have to design the report in Crystal and from your application, call the viewer.  This will allow you to have the report appear in your program. 
    If you are talking about formatting the report, you can set each object as a class in your CSS and call it from your program. 
    I guess a little more information on what you are trying to accomplish may help answer your question more directly.
    Thanks,
    Brian

  • How to use dynamic parameter when a report is created using Stored Procedures

    Hi all,
    any one have the idea of how to use dynamic parameter in crystal report XI R2
    when report is created using Stored Procedure.
    Regards
    shashi kant chauhan

    Hi
    You can create an SQL command in Database Expert > Expand your datasource > Add command
    Then enter the SQL query that will create the list of values to supply to the user
    eg select field1,field2 from table
    Then edit the parameter of the report.  These will be the SP parameters adn can be seen in field explorer.
    Change the parameter type to Dynamic
    Under the word Value click on Click here to add item
    Scroll down to your Command and select one of the values that you want to appear in the list
    e.g field1
    Then click on the Parameters field - this is essential to create the param
    You can edit other options as required
    That should do it for you.
    I must say that i use CR 2008 connected to Oracle 10g SP, but i reckon this will work for SQL DB and CR XI as well
    Best of luck

  • Using a SQL user-defined function in Crystal Reports XI

    Post Author: JoannKarp
    CA Forum: Formula
    Is it possible to use a user defined function in SQL and use this in multiple Crystal reports?
    JoannKarp

    SELECT COALESCE(ufn_GetAddressByBusinessEntityIDandAddressTypeID(table1.BusinessEntityID,712),ufn_GetAddressByBusinessEntityIDandAddressTypeID(table1.BusinessEntityID,712)) AS Zipcode
      FROM table1
    Nope. This is two function calls. coalesce(a, b, c, ...) is just syntatic sugar for
       CASE WHEN a IS NOT NULL THEN a
            WHEN b IS NOT NULL THEN b
            WHEN c IS NOT NULL THEN c
       END
    But if you use isnull it's a different matter. (But isnull() permits two arguments.)
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How to implement the Oracle Group by function in Crystal reports?

    Hi all,
    In SQL, for example we have a group function like:
    select  district,state, country, continent, sum(no.of people) from world.
    Now, How to implement this group function in crystal reports? Please advise.
    Thanks in advance..
    Regards,
    sriram

    Hi Vinay,
    Thanks for the prompt reply.
    In one of our report, we are supposed to perform group by for 14 columns to get sum of 3 columns and there by displaying 17 columns in the report.
    When we tried in crystal reports to implement this oracle group by functionality:
    1. We created 14 groups from the Insert->Group option.
    2. By performing this, we got 14 group sections vertically(one inside the other).
    3. Then we created the sum(15th column),sum(16th column), sum(17th column)  by Insert->Summary option.
    4. We suppresed all the group sections except for the last group.
    5. Then, dragged all the groups to the last group section along with the summary fields.
    This is how, we tried to acheive the oracle group by function in Crystal reports.
    Please advise, whether our approach is right. If not, please suggest the appropriate approach with a bit detailed explanation.
    Thanks,
    Sriram.

  • How to use SO_OBJECT_SEND function module

    Hi friends,
       how to use SO_OBJECT_SEND function module in 4.0B Server .

    hi
    good
    check this code
    REPORT ZTSAPMAIL.
    DATA: X_OBJECT_TYPE LIKE SOOD-OBJTP.
    DATA: BEGIN OF X_OBJECT_HD_CHANGE.
    INCLUDE STRUCTURE SOOD1.
    DATA: END OF X_OBJECT_HD_CHANGE.
    DATA: BEGIN OF X_OBJCONT OCCURS 10.
    INCLUDE STRUCTURE SOLI.
    DATA: END OF X_OBJCONT.
    DATA: BEGIN OF X_OBJHEAD OCCURS 0.
    INCLUDE STRUCTURE SOLI.
    DATA: END OF X_OBJHEAD.
    DATA: BEGIN OF RAW_HEAD.
    INCLUDE STRUCTURE SORH.
    DATA: END OF RAW_HEAD.
    DATA: BEGIN OF X_RECEIVERS OCCURS 0.
    INCLUDE STRUCTURE SOOS1.
    DATA: END OF X_RECEIVERS.
    PARAMETERS: RECEIVER LIKE X_RECEIVERS-RECNAM. " Name
    *BUILD MESSAGE HEADER
    MOVE 'Sort field goes here' TO X_OBJECT_HD_CHANGE-OBJSRT. " Sort field
    MOVE 'Name of the object goes here' TO X_OBJECT_HD_CHANGE-OBJNAM. " Name
    MOVE 'Document title goes here' TO X_OBJECT_HD_CHANGE-OBJDES. " Title
    MOVE 'F' TO X_OBJECT_HD_CHANGE-OBJSNS. " Functional OBJECT
    MOVE 'E' TO X_OBJECT_HD_CHANGE-OBJLA. " Language
    Object type of the new document
    MOVE 'RAW' TO X_OBJECT_TYPE.
    CLEAR X_OBJCONT.
    MOVE 'Contents of mail' TO X_OBJCONT-LINE.
    APPEND X_OBJCONT.
    CLEAR X_OBJCONT-LINE. APPEND X_OBJCONT.
    MOVE 'More contents' TO X_OBJCONT-LINE.
    APPEND X_OBJCONT.
    MOVE 'Still more contents'
    to x_objcont-line.
    APPEND X_OBJCONT.
    MOVE ' ' TO X_OBJCONT-LINE.
    APPEND X_OBJCONT.
    Specific header (Dependent on the object type, here RAW)
    REFRESH X_OBJHEAD.
    DESCRIBE TABLE X_OBJCONT LINES RAW_HEAD-RAWSIZ.
    MOVE RAW_HEAD TO X_OBJHEAD.
    APPEND X_OBJHEAD.
    *RECEIVERS table
    CLEAR X_RECEIVERS.
    REFRESH X_RECEIVERS.
    MOVE RECEIVER TO X_RECEIVERS-RECNAM. " Name
    MOVE 'B' TO X_RECEIVERS-RECESC. " Receiver type
    MOVE 'X' TO X_RECEIVERS-SNDCP. " Send as a copy
    MOVE 'X' TO X_RECEIVERS-SNDEX. " EXPRESS DOCUMENT
    APPEND X_RECEIVERS.
    CALL FUNCTION 'SO_OBJECT_SEND'
    EXPORTING
    folder_id = 'OUTBOX'
    forwarder = x_forwarder
    object_fl_change = x_object_fl_change
    OBJECT_HD_CHANGE = X_OBJECT_HD_CHANGE
    object_id = x_object_id
    OBJECT_TYPE = X_OBJECT_TYPE
    OUTBOX_FLAG = 'X'
    OWNER = SY-UNAME
    store_flag = x_store_flag
    importing
    object_id_new = x_object_id_new
    sent_to_all = x_sent_to_all "May need to use
    TABLES
    OBJCONT = X_OBJCONT
    OBJHEAD = X_OBJHEAD
    objpara = x_objpara
    objparb = x_objparb
    RECEIVERS = X_RECEIVERS.
    reward point if hlepful.
    thanks
    mrutyun^

Maybe you are looking for

  • Drawing No at Equipment master

    Dear Matserss I would like to add the Drawing No for all my equipment. B ut there is no field in std functionality. Creation of class is huge task. Because it wont support for the LSWM. The charecteritcis value we cant do thro LSMW. I dont think the

  • USB charges devices but they are not recognized in 'my computer'

    I have a A135-S2356. It has 4 USB ports, only 3 are visible in device manager. Only 1 charges/sees my device....iphone charges, laptop external fans runs, external hard drive lights up, but nothing is recognized in 'my computer' I get an error messag

  • IMac freezes. Is it overheating?

    I have an iMac that I purchased on Jan. 18, 2009. On the receipt, it says that it is an iMac 20/2.6/2GB/320/SD. The part number is MB324LL/A. For several months the screen has been freezing randomly and the only way I can shut down the computer is by

  • WDS keep existing computer name

    Hello, We have WDS up and running on a recently setup server.  Most of it is all defaults apart from the fact that we have added boot images and system images.  We have an unattend file with the %MACHINENAME% in it, but for some reason it always gene

  • How to reverse the itunes organization that completely tore my library apart??

    Ok I am infuriated by whats just happened. I love music and have been pretty much building up a colection for many years. I've got (I had) more than 100 gigs of music nicely packed into their seperate folders of my choosing. I decided it's time to tr