Crystal reports show rows of a field in detail section in number of columns while exporting in ms excel

Hi,
I have a crystal report and a field called source.
The source field can contain more than one records.
When I export it to ms excel then source field is shown in three rows in excel.
Name
Source
Batch No
ABC
A0001
K1
K2
K3
But now I want to export to excel in the following format
Name
Source
Batch No
ABC
A0001
K1
K2
K3
The Name and Batch No field are in Group Header and Source in detail section.
Also the Source field can vary in number i.e. there can be any number of Source.
And I only want this type of output when exporting to MS Excel.
Is there any way to do this?
Please reply.
Thanks.

Try this:
1) Create a formula with this code and place it on the Details Section:
whileprintingrecords;
numbervar x := x + 1;
stringvar col1;
stringvar col2;
stringvar col3;
if x = 1 then col1 = {Source}
else if x = 2 then col2 = {Source}
else if x = 3 then col3 = {Source};
2) Create another formula and place this on the Group Header:
whileprintingrecords;
numbervar x := 0;
stringvar col1 := "";
stringvar col2 := "";
stringvar col3 := "";
3) Create three separate formulae - one each for the three Source columns and place these on the Group Footer:
E.g. for first Source column:
whileprintingrecords;
stringvar col1;
E.g. for second Source column:
whileprintingrecords;
stringvar col2;
Drag and drop these formulae beside each other on the GF.
4) Move the 'Name' and 'Batch No.' fields from the Group Header to the Group Footer
5) Suppress Group Header and the Details Section.
-Abhilash

Similar Messages

  • Crystal report - how to split a field into more fields

    Hello,
    I`m new to Crystal reports and I`ve got a trouble. I have field which contains an address - street, city, zip code. The example is:
    STEHLIKOVA 977 165 00 PRAHA 620 - SUCHDOL 165 00.
    What I need to achieve is to split this string into three separated fields. I`ve trouhg a couple of forums but haven`t been able to find a proper answer. The problem is that the addresses differ so I can`t use an absolute defining of a start position. Looking at the DB (HEXA code) the parts in the string are divided by two dots:
    STEHLIKOVA 977..165 00 PRAHA 620 - SUCHDOL..165 00
    I`ve been able to work out this solution:
    stringVar array x := split({cparty.STREET_ADD},"..");
    Local numberVar i;
    Local stringVar outputString := "";
    For i:=1 to Count(x) do
    outputString := outputString + x[i] + Chr(10)
    outputString;
    It splits the string into three rows:
    STEHLIKOVA 977
    165 00 PRAHA 620 - SUCHDOL
    165 00
    And I don`t know how to find the end of each row so to be able to separate the strings and report them as three different fields.
    Would be anyone so kind and help me out with this?
    Thank you.
    Petr

    Hi
    Actually using a for loop is not necessary here. All you need to do is to add several formula fields: one for street, one for city and one for zipcode. In @street field you add formula:
    stringVar array x := split({cparty.STREET_ADD},Chr(13));
    x[1];
    Then you drag such formula field to details section of your report and watch preview to check if everything looks alright. Repeat for every formula field that you'd like see in your report.
    In @city you add almost identical formula but you change index, i. e. instead of x[1] you need to use x[2]. Then for @zip x[3].
    You may need to check if your address has all three parts - for example if you want to use formula in the second part of your address field you may need check first if there are at least two parts after split:
    stringVar array := split({cparty.STREET_ADD},Chr(13));
    numbervar c; 
    c := count(x); 
    if 2 <= c then 
    x[c]; 
    Var 'c' is used to store the number of elements in array after split. Then I'd like to check if the part (second) actually exists. So I try to check if number of part that I want to refer to is not bigger than the number of elements in array after split (here stored in var 'c').
    Actually the code presented above is not enough since you have no guarantee that you'll always get address structured in the very same way. For example in demo PL database I have zip code and city in the same row after split with Chr(13) as delimiter.
    You'll need to experiment or ask someone to prepare correctly structured data coming from B1 to your report.
    Kind regards,
    Radek

  • CRYSTAL Report showing emty

    Dear all,
    Crystal Report showing blank report for one invoice.but it's showing report other invoices.i write query like this.
    SELECT Distinct T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName], T0.[Address],T0.[Address2],  T0.[NumAtCard],T0.[ShipToCode], T0.[DocTotal], T0.[U_CST],T0.[U_STIN1], T0.[U_Fright], T0.[U_TPNAME], T0.[U_TNO], T0.[U_DNAME], T0.[U_Warranty],T0.[U_PONum] ,T0.[U_TINNo],T0.[VatSum],T0.[CntctCode],T1.[ItemCode], T1.[Dscription], T1.[Quantity], T1.[Price], T1.[TaxCode], T2.[PymntGroup], T3.[TaxId5], T3.[TaxId11], t0.[U_AmntinWrds],T1.[DiscPrcnt],t1.[linetotal],T0.[U_VAT],T0.[RoundDif],T0.[TotalExpns],T0.[U_Vat4],T0.[DocNum], T0.[U_VAT5], T0.[U_TCS1], T0.[U_CST1], T0.[U_VAT], T0.[U_Vat4], T0.[U_VAT5], T0.[U_TCS1]  FROM [dbo].[OINV]  T0 INNER JOIN [dbo].[INV1]  T1 ON T0.DocEntry = T1.DocEntry left JOIN [dbo].[OCTG]  T2 ON T0.GroupNum = T2.GroupNum INNER JOIN INV12 T3 ON T0.DocEntry = T3.DocEntry WHERE T0.[DocNum] ={?InvoiceNum}
    Thanks

    Hi,
    Try this query in query generator. Let me know the query result.
    SELECT Distinct T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName], T0.[Address],T0.[Address2],  T0.[NumAtCard],T0.[ShipToCode], T0.[DocTotal], T0.[U_CST],T0.[U_STIN1], T0.[U_Fright], T0.[U_TPNAME], T0.[U_TNO], T0.[U_DNAME], T0.[U_Warranty],T0.[U_PONum] ,T0.[U_TINNo],T0.[VatSum],T0.[CntctCode],T1.[ItemCode], T1.[Dscription], T1.[Quantity], T1.[Price], T1.[TaxCode], T2.[PymntGroup], T3.[TaxId5], T3.[TaxId11], t0.[U_AmntinWrds],T1.[DiscPrcnt],t1.[linetotal],T0.[U_VAT],T0.[RoundDif],T0.[TotalExpns],T0.[U_Vat4],T0.[DocNum], T0.[U_VAT5], T0.[U_TCS1], T0.[U_CST1], T0.[U_VAT], T0.[U_Vat4], T0.[U_VAT5], T0.[U_TCS1]  FROM [dbo].[OINV]  T0 INNER JOIN [dbo].[INV1]  T1 ON T0.DocEntry = T1.DocEntry left JOIN [dbo].[OCTG]  T2 ON T0.GroupNum = T2.GroupNum INNER JOIN INV12 T3 ON T0.DocEntry = T3.DocEntry WHERE T0.[DocNum] = [%0]
    Thanks & Regards,
    Nagarajan

  • Vertically align a field in details section.

    I am new to Crystal Reports so I will do my best to explain what I am trying to achieve......
    In MS Excel, it is possible to vertically align text so that it remains in the centre of the cell regardless of the cell height. I would like to do a similar thing in the details section of Crystal Reports.
    I have several fields in the details section of the report. They are all in a horizontal line. I have enabled the 'Can Grow' feature for one of the fields so that it will increase in height to accomodate large text entries. I would like the other fields to adjust so that the centres of each of the fields align vertically - in the same way as they would in excel is the text was aligned vertically.
    Any advise would be greatly appreciated.

    I do not want to horizontally align the writing.
    I have 5 fields in a row in the details section. One of the fields (call it field A) can grow to usually no more than 2 lines.
    When field A takes up 1 line then the other fields look OK becuase the centres of all of the fields line up.
    When field A grows to 2 lines, I would like writing in the other fields to move down slightly so that they align with the centre of field A.
    Is this possible?

  • Change field in detail section

    In crystal report, after I draged a field [Order2009] to the detail section, how to change [Order2009] to [Order2010]?
    I did it as the way below:
    1) delete [Order2009]
    2) drag [Order2010] from field view to detail section
    I do not think this is the best way to replace field.
    Edited by: aspfun on Apr 27, 2011 2:32 PM

    This is the only way to REPLACE a field.
    But if you want to select which field to display based on a parameter for the year you could.
    if {?yearparamter} = 2009 then else
    if {?yearparamter} = 2010 then else
    "oops-wrong year"
    Debi

  • Crystal report duplicate row problem

    Hi expert,
    Need help about crystal report for my customer, want to make report about outgoing payment(OVPM) but it become duplicate row for detail because 1 payment include lot cheque(VPM1) more than 1,i just want to know if there got other method to avoid duplicate row.I also try put formula for detail area "{VPM1.CheckAct} = Next({VPM1.CheckAct})" or "{VPM1.CheckAct} = previous({VPM1.CheckAct})"..it useful for 1 row only,if i put more row,it will eliminate other row,just show 1 row.
    Here is my query take from crystal report.
    SELECT 
    "OVPM"."DocTotal", "OVPM"."DocNum", "OVPM"."DocDate",
    "NNM1"."SeriesName", "OVPM"."Address", "OVPM"."DocCurr", "VPM1"."CheckNum",
    "VPM4"."AcctCode", "OVPM"."CheckAcct", "OACT_1"."AcctName", "OACT_2"."AcctName",
      "VPM4"."Descrip", "OVPM"."Comments", "OVPM"."NoDocSum", "OVPM"."DocType", "VPM2"."DocEntry",
       "VPM2"."SumApplied", "OPCH"."DocDate", "VPM2"."InvType", "OCRD"."Phone1", "OCRD"."Fax",
        "OCRD"."CntctPrsn", "VPM2"."DocNum", "VPM1"."BankCode", "OVPM"."CardName", "OVPM"."CardCode",
         "VPM1"."CheckAct", "OACT_3"."AcctName", "VPM1"."CheckSum", "VPM1"."LineID", "VPM4"."OcrCode",
          "OVPM"."CounterRef", "OVPM"."TrsfrAcct", "OACT_4"."AcctName", "OVPM"."TrsfrSum",
           "OVPM"."PayToCode", "OVPM"."JrnlMemo", "VPM4"."SumApplied", "OVPM"."CashAcct", "VPM1"."U_Ref"
    FROM  
    "OVPM" "OVPM"
    LEFT OUTER JOIN "VPM2" "VPM2" ON "OVPM"."DocNum"="VPM2"."DocNum"
    LEFT OUTER JOIN "NNM1" "NNM1" ON "OVPM"."Series"="NNM1"."Series"
    LEFT outer JOIN "VPM1" "VPM1" ON "OVPM"."Docentry"="VPM1"."DocNum"
    LEFT OUTER JOIN "VPM4" "VPM4" ON "OVPM"."DocNum"="VPM4"."DocNum"
    LEFT OUTER JOIN "OACT" "OACT_2" ON "OVPM"."CheckAcct"="OACT_2"."AcctCode"
    LEFT OUTER JOIN "OCRD" "OCRD" ON "OVPM"."CardCode"="OCRD"."CardCode"
    LEFT OUTER JOIN "OACT" "OACT_4" ON "OVPM"."TrsfrAcct"="OACT_4"."AcctCode"
    LEFT OUTER JOIN "OACT" "OACT_3" ON "VPM1"."CheckAct"="OACT_3"."AcctCode"
    LEFT OUTER JOIN "OACT" "OACT_1" ON "VPM4"."AcctCode"="OACT_1"."AcctCode"
    LEFT OUTER JOIN "OPCH" "OPCH" ON "VPM2"."DocEntry"="OPCH"."DocEntry"
    WHERE  "OVPM"."DocNum"=9005070
    ORDER BY "OVPM"."DocNum", "VPM1"."LineID"

    Hi,
    Change LEFT outer JOIN "VPM1" "VPM1" ON "OVPM"."Docentry"="VPM1"."DocNum"
    to: LEFT JOIN "VPM1" "VPM1" ON "OVPM"."DoceNum"="VPM1"."DocNum"
    Remove: LEFT OUTER JOIN "OACT" "OACT_3" ON "VPM1"."CheckAct"="OACT_3"."AcctCode"
    Thanks,
    Gordon

  • Crystal Reports hides rows from source BW query

    Hi Experts,
    I currently have a BW query with two structures: 1) key figure structure in the columns and 2) another characteristics structure in the rows.
    Here are additional details:
    1.  I have the MDX connectivity transports installed
    2.  I have successfully linked a crystal report to this source BW query.
    My only problem is that if a certain row in the source BW report is blank (meaning it does not have any values), Crystal Reports automatically suppresses it and does not show my full row structure in the output.  I would like the report to show all rows regardless of any data values or lack of.  I do not have zero suppression in BW or Crystal Reports.
    Thanks

    Hi,
    I would recommend to extract the MDX query out of your CR report ( Database->Show SQL statement) and use the MDX transaction to test it directly against your BW server. This way you make sure if the suppression takes place already on the BW side or in the CR itself.
    Regards,
    Stratos

  • Crystal Report Bursting based on a field in the report

    Hi,
    I have a crystal report with  Invoice Number as a field in it.  I need to burst the report with following as the output.
    1. Destination: FTP server
    2.  Format : PDF : One PDF for every invoice.
    I was trying to use Publication through Infoview.  I would like to know how to achieve this.
    I do not have any parameters in the report or any group of users/recipients.  Hence, I have not created any Profiles.
    Thanks in advance.
    Girish

    Add your CR report as source document and then choose to have Dynamic recipients for your publication. Use there as source for the recipients' list the same report you want to burst. As Recipient identifier select the field that contains the invoice ID.
    In the personalization panel go to the Filters area and select in the Report field drop down your invoice field from the report. In the Dynamic recipients mapping drop down select again the field containing the invoice ID.
    Select the appropriate settings in the destination and format panels and let at least on BO user subscribe to the publication .
    After that you can run the publication.
    Regards,
    Stratos

  • Crystal report showing Incorrect data against Bex Query

    I have created Crystal report on top of Bex Query, I have not done any calculations in the report, just dragging structure and key figure in the report, ran for one month, when I compare with Bex Query with same period, it is showing incorrect data.
    I don't know what can be wrong here?
    We are Business Objects 3.1 SP3.
    Thanks,
    Ravi

    HI,
    I would suggest you trace the workflow in Web INtelligence according to these notes:
    Tracing:
    Unix : Note 1235111
    Windows : Note 1260004
    and then post a link for downloading the trace files here.
    regards
    Ingo

  • Crystal Report can't add Currency field when connect to SAP Infosets.

    Hi,
    I created a simple Crystal Report which connect SAP Infosets.
    Everything is fine except I add a "Currency" field into report. Three errors returned.
    Fail to retrieve data from database -> Database connector error :'Syntax error in program SAPLHRPADINA1' -> Database connector Error: 'RFC_CLOSED'
    Do you have any idea?

    Hi,
    can you run a InfoSet query based on the InfoSet ?
    Can you create a QuickView on top of the InfoSet ?
    ingo

  • Crystal Report 11 Not Interpreting HTML Field

    Post Author: Shakeel Ahmad
    CA Forum: General
    Hello Everybody!I am using the Crystal Report 11 and some of the fields displaying on the report has HTML data (<table> and other tags), but this field is not maintaining its formating even though I changed the Text Interpretation property of the Report field to HTML.For Example, I have the following data in a field<table cellspacing="1" cellpadding="1" width="200" border="1">    <tbody>        <tr>            <td>First</td>            <td>Second</td>        </tr>        <tr>            <td>Third</td>            <td>Fourth</td>        </tr>      </tbody></table>  But its output on the CR11 is
    FirstSecond
    ThirdFourth
    The majour problem is for the <td> tag. Thanks for any solution to this problem.

    Post Author: Shakeel Ahmad
    CA Forum: General
    Actually it dont interpret the <td> tag, that why It combibes the output of a single line while it interprets the <tr> tag like <br> that why it breaks up the line. The spaces cant solve the problem cuz we cant count how much spaces should be printed after text of a <td> for proper formatting.likesdklfjsadkfksd    askdjfksdjfsdfjdks              askdjfkdsjfkd

  • Crystal Reports Viewer 2008 and parameter fields

    Hello,
    I saw this product on the main Crystal Reports site this afternoon and decided to download it to try it out.  I have a number of users who would benefit from being able to preview their report results prior to actually running the report.  This seems like the perfect product.  I have a large number of Crystal Reports which were created in Crystal version XI.  I also downloaded the free 30 day version of Crystal Reports 2008 yesterday to see what new features are there.
    While testing Crystal Reports Viewer, I tried to run one of my reports which needs a parameter to run properly (account number).  This type of parameter is needed for probably 98% of this business' reports. 
    The problem: Crystal Reports Viewer does not prompt me to input the parameter.  In my actual Crystal Report, I had the box "Save Data with Report' left unchecked, as the account number frequently changes.  However, if that box is left unchecked, Crystal Reports Viewer will give me the error message "No Saved Data.  This report file does not contain saved data and cannot be viewed.  To get data into the report, please open and re-save it in the Crystal Reports designer application with the "Save Data with Report" option selected."
    Thinking that possibly it was the version of Crystal Reports in which the report was created (XI), I downloaded the free trial of Crystal 2008 and created a very simple test report with one parameter for account number where the account number is retrieved from our database.  And I am having the same trouble. 
    The "Help" section of Crystal Reports Viewer tells me that I can select my parameters in the parameter panel.  I do not see anything in my parameter panel other than the words "Current Data Set Last refreshed: 04/12/10 2:58 PM".  The help tells me that I can "select the parameter directly in this panel by entering a new value", but there is no option to do so.
    Any help would be appreciated.
    thanks,
    Noel

    What I've learned is that I was originally using Crystal Viewer XI and upon opening it I received a message indicating there was an update.
    I ran the update which put me on Crystal Viewer 2008.
    Since then I have not been able to refresh my screen to bring up the parameters.
    See the attached forum for another post concerning this same issue. 
    Paramter Prompts in Crystal Viewer

  • Crystal Reports 8.5 and Barcode field on Postscript printer

    Hi, I have a Crystal 8.5 document with a barcode Code128 inside (Azale font). If I print the document on a PLC printer using Azalea Truetype font the Barcode are printed. If I print the document on a PostScript printer the barcode are not printed. If I change font with PostScript version and I print on a PostScript printer the barcode are not printed to.
    If I print the same document with Crystal 2008 the barcode are printed in both case.
    There are some problems in Crystal 8.5 for Postscript print ?
    thanks Filippo

    Could be, all I can suggest is you go to the download page and install all patches available for CR 8.5. Click on the Businessobjects tab above and the Crystal Reports and then the link to get downloads.
    IF that doesn't resolve the issue you may want to get the latest print drivers for your printer. If that still doesn't fix the problem then you have no option but to upgrade and try again. Cr 8.5 is 10 years old, no new updates available now.
    Thank you
    Don

  • Remove/delete the row with Report Name above header while exporting SSRS to excel

    I wanted to make sure to delete the top most row with Report name in SSRS report while exporting to excel.
    I didn't find any way to do so, My report don't need a report name actually i deleted  the text still a blank row appears in excel.
    Is there any property hidden i need to look for this requirement?

    Invalid definition.
    The report definition is not valid.
    Details: The report definition has an invalid target namespace
    'http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition'
    which cannot be upgraded. (rsInvalidReportDefinition)

  • Crystal Report: Show Field only in Print-Preview

    Dear Experts,
    is it possible to show a field only in the print preview (when the report is generated) without printing this field?
    Thanks for Help.
    Jacqueline

    No, it is not possible to display a report object on screen then suppress it when printing.
    Fuskie
    Who thinks you would have to use 2 reports or use a parameter that offers the option of formatting for view versus for print...

Maybe you are looking for

  • Select Query in FM

    I am working on a function module. The input to the function is more one entry.... (zz1, zz2, zz3)... Based on the input i have to write a select query select f1            f2            from DBtable  into table itab2            for all entries in it

  • Sender Port Error in SAP ECC for IDoc

    Hi, I am creating scenario IDOC -> XI -> JDBC with Customer Master IDoc. After sending it with we19 he said "IDoc sent to SAP system or external program". In we02 and we05 the IDOC it says "Data passed to port OK". But in SM58, the IDoc ends in error

  • I want to use my iPhone 4s internet in laptop

    i want to use my iphone 4s internet in laptop, so how can i do this ???

  • Active Script  Easing Help (Solved)

    Okay I have a simple menu that worked great in MX2004, but i have upgrade to Flash 8 now the script doesn't work and was wonder what am i doing wrong. I have placed breaks within the code to see whats failing. It looks as if the button On Release() n

  • IWeb just "quits"

    I have all new iweb and system, I open iWeb, click on a page to open and edit it - then iWeb just "Quits". A few pages will open, but most I get a quit. Anyone having the same? Any solution? What good is iWeb update when you can not even run the prog