Reorder or hide columns when exporting

Hello,
When woking with Reports and previewing it before sent to the client, may appear the desire to change the report before sanding.
by ex, one of our customers says: "This would be a nice extension of the column hiding & reordering capability, and would help with customers' requests that their reports come with certain data "eliminated."
I work mainly with the CrstalReports "ReportClass:ReportDocument" class.
Well, is there a possibility to hide some columns (when exporting)? To reorder them?
thanks.

Hello,
you could delete report fields and runtime without saving the report.
I attach code below for CS in VS2005:
//File Name:          CS__Delete_Field_inproc.sln
//Created:            April 4, 2008
//Author ID:          FLI
//Purpose:            This C# .NET sample Windows application demonstrates
//                              how to delete a dbfield from a report
//                              using unmanaged RAS.
// Note this is available without a dedicated RAS with SP2 for XI R2
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.ReportAppServer.ClientDoc;
namespace CS_Delete_Field_inproc
    public partial class Form1 : Form
        // CR Declarations
        ReportDocument boReportDocument;
        ISCDReportClientDocument boReportClientDocument;
        CrystalDecisions.ReportAppServer.ReportDefModel.ReportObject boReportObject;
        public Form1()
            InitializeComponent();
            //Create a new ReportDocument
            boReportDocument = new ReportDocument();
            // load the RPT file
            boReportDocument.Load("..
DeleteField.rpt");
            //Access the ReportClientDocument in the ReportDocument (EROM bridge)
            boReportClientDocument = boReportDocument.ReportClientDocument;
            // show in reportviewer
            crystalReportViewer1.ReportSource = boReportDocument;
        private void button1_Click(object sender, EventArgs e)
            //find the object in the report
            boReportObject = (CrystalDecisions.ReportAppServer.ReportDefModel.ReportObject) boReportClientDocument.ReportDefController.ReportDefinition.FindObjectByName("City1");;
            //Delete the object from the report
            boReportClientDocument.ReportDefController.ReportObjectController.Remove(boReportObject);
            //show in reportviewer
            crystalReportViewer1.ReportSource = boReportDocument;
        private void button2_Click(object sender, EventArgs e)
            //save report with new title
            boReportDocument.SaveAs("Test.rpt");

Similar Messages

  • Formatting Columns when exported to HTML

    Is there a way to specify the WIDTH of a column when exporting
    to an HTML file?
    Inside of Discoverer 3.1 or when printed on paper the columns
    are fine, however when exported they are 'resized' to the width
    of the column heading(or longest value in column).
    Thanks in advance

    Scott,
    You will need to look through your xml files with Discoverer.
    Support has a document on how you can alter and change the look
    and feel of the html. If they are unable to locate tell them to
    talk with development.
    Christopher
    www.iloveapple.net:88

  • Lost collapsing columns when export to excel

    I have created a report with row grouping, works correctly working in Report Server Browser, 
    after export the report to excel, when clicking on the + in Excel only 1 or 2 of about 100 lines appears, or there is no + head to click for other groups
    a similar report works when exported to excel.
    any solution what to do or whats possibly wrong?
    thank you

    Hi Karl,
    According to your description that you are experiencing the issue when you export the report to excel, drill down report not display all the fields after expand the "+"and some group which should have "+" not shown, right?
    I have tested on my local environment and can’t reproduce the issue, the issue can be caused by the incorrect setting of the visibility and also can be related to the excel rendering.
    Microsoft Excel has limitations with how it manages hidden and displayed report items when they are exported. Groups, rows, and columns that contain report items that can be toggled are rendered as Excel outlines. Excel creates outlines that expand and collapse
    rows and columns across the entire row or column which can cause the collapse of report items that are not intended to be collapsed. In addition, Excel's outlining symbols can become cluttered with overlapping outlines. To address these issues, the following
    outlining rules are applied when using the Excel rendering extension:
    The report item in the top-left corner that can be toggled can continue to be toggled in Excel. Report items that can be toggled and share vertical or horizontal space with the report item that can be toggled in the top-left corner cannot be toggled in
    Excel.
    To determine whether a data region will be collapsible by rows or columns, the position of the report item that controls the toggling and the position of the report item that is toggled are determined. If the item controlling the toggling appears before
    the item to be toggled, the item is collapsible by rows. Otherwise, the item is collapsible by columns. If the item controlling the toggling appears beside and above the area to be toggled equally, the item is rendered with row collapsible by rows.
    To determine where the subtotals are placed in the rendered report, the rendering extension examines the first instance of a dynamic member. If a peer static member appears immediately above it, the dynamic member is assumed to be the subtotals. Outlines
    are set to indicate that this is summary data. If there are no static siblings of a dynamic member, the first instance of the instance is the subtotal.
    Due to an Excel limitation, outlines can be nested up to 7 levels only.
    Article about the show and hide in the excel for your reference:
    http://msdn.microsoft.com/en-us/library/dd255234.aspx
    Thanks for your understanding.
    Regards
    Vicky Liu

  • Megge column when export to excel

    User is requesting Excel column header to split for infoobjects that are displaying key & text. See attachment showing the column header splitting.
    (Currently all key & text headers merge when exported into Excel apart from last object in row.

    Hi,
    this is not posibble. You can switch on the parameter REPEATED_TEXTS_DISPLAYED at the Analysis Item, but this only repeats the characteristic values, not the headers.
    The export to Excel shows the same as you see in the Analysis Item in Web.
    best regards
    ARNE

  • Merge columns when exporting to excel data only

    Hi,
    I have a report with headers in fowling format.
             Quantity         |
    first day   |  last day |
    When exporting to excel data only I want output in following format and want to merge upper header cells.
    Quantity
    First Day
    Last Day
    Please reply.Thanks.

    Hi,
    You can achieve this requirement Please follow the below document.
    How to WYSIWYG SAP Crystal Reports Export to XLS
    I hope this is the best formatting example suited for this requirement.
    Ludek thanks for preparing this document and sharing with us......This is the best formatting ex.
    Refer Link: Crystal Reports Crystal to Excel
    Thanks,
    DJ

  • Limit the columns when export RDL to TIFF or PDF image

    I am working on a report page with around 10 columns. When the report appears, there is a export button for user to export the report to csv, excel, tiff and pdf. There is a problem with the PDF and TIFF image when there are many columns,
    as width of the image file is shorter than the total columns width, some columns are 'split' to the next page. Is there any way to limit the columns in the export feature to TIFF where we can specify the maximum columns to be
    exported to the image file?
     

    One method you can try is to set visbility expressions for the column you want to hide based on RenderFormat. You can get this value from Globals collection. So expression for hidden property of those columns would be as below
    IIF(Globals!RenderFormat.Name = "IMAGE" Or Globals!RenderFormat.Name = "PDF",True,False)
    so as to not render them in those formats
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Removing the ID of a lookup column when exporting SharePoint list to Excel

    Hi,
    I export a list in Excel and I noticed the lookup column contains an ID together with the name (e.g. John Doe, #12). Is there a way I can avoid exporting the ID in Excel?
    Thanks.

    LookUp Field Values have a string representation of “(ID);#(VALUE)”, i.e. “2;#Second Entry”.
    If you export the list in excel you could create a formula or macro that split/copy only the value in a
    new column and then hide the real one.
    Try the following blog post for same samples:
    http://sharepoint-freak.blogspot.it/2011/04/when-you-use-lookup-fields-or-any.html
    http://excel.shilor.org/2010/07/export-sharepoint-2007-list-with-multi.html
    Marco Rizzi @Avanade Italy http://blog.marcorizzi.com

  • Extra columns when exporting to CSV format

    Using Crystal Pro XI R2, I have a report that is listing three fields, each 1" in width next to each other (no gap between columns).  When I export to Excel, the resulting file has no blank columns before the data.  However, when I export to CSV, even after checking the box to not include header/footers, I get three extra commas preceding the first column of the report.  The report only has a single detail section unsuppressed.  Since the CSV file is being imported into another application, I must either manually remove the extra commas or fix this problem.  Since I am not a member of the punctuation police, I am hoping to find a Crystal solution.
    Fuskie
    Who originally had six extra commas preceding his data, but reduced it to three after blocking export of headers/footers...

    The 3 comas is a good indication that you you have 3 empty fields in your report. Not sure how they may have gotten there without you knowing about it, but that would be my first guess.
    See if you can find them. they may be the save color as the back ground, making them "invisible". Try selecting your entire details section and see if you don't see anything unusual.
    I've also noticed that CR will allow you to place fields off the edge of the report... even to the left of it. Once their over there you may not be able to select them to remove them.
    Assuming that you don't find the offending fields on the report you can try this:
    Make a copy of your report using the Save As...
    In the copy, while in design view, do a Ctrl+A to select all objects on the report and delete them.
    Then simply reinsert the fields you want to export for your CSV export.
    Hope this helps,
    Jason

  • ALV  hide  column when no values

    Hi friends,
          Is it possible to hide a column in ALV  when there is no value for that column
    Thanks
    Chandra

    Yes by using the FM ALV_OPTIMIZE_OUTPUT you can acheive it
    ALV_OPTIMIZE_OUTPUT   :  Suppress Blank Columns in ALV Output
    Execute SE37 enter FM name
    Check the Function Module Documentation for more details

  • Cannot Maintain Columns when exporting to Excel

    I am trying to export a device report from PDF to Excel however the columns all show up but the information is not placed accurately as to each column.

    You either need the Acrobat Forum or the ExportPDF Forum, where people who use the correct software can help. You CANNOT export using Reader alone.

  • Hide/Show columns only when exporting to .CSV

    Hi, how can i hide a particular column when exporting the report to excel

    Hi,
    You can set column conditionally by request.
    E.g. columns that you do not like export set condition PL/SQL function body returning a boolean
    RETURN NVL(:REQUEST,'EMPTY') NOT IN('CSV','XLS','PDF','XML','RTF');I have sample here
    http://apex.oracle.com/pls/otn/f?p=40323:63
    EMPNO column is not exported from report
    Br,Jari

  • Hide column in SSRS is not working while exporting to CSV format.

    Hi,
    I have a report where some columns are hidden based on parameter value. When I export to Excel all the hidden columns are hiding which is fine, but the issue is when I exported to CSV all the hidden columns are exporting to csv.
    I tried to using  " =IIF(Globals!RenderFormat.Name = "CSV", True,False)" in Column visibility but It is not working. When I select Hide option it is working fine. But I want to hide based on expression.
    Any help !!!!!!!!

    Hi sumancv,
    In SQL Server Reporting Services (SSRS), we can control whether an item is visible in CSV separately from whether an item is visible in other renderers. As Shahfaisal Muhammed posted earlier, the CSV renderers use the DataElementOutput property to control
    visibility. When an item has DataElementOutput=Output, it will appear in the CSV.  When an item has DataElementOutput=NoOutput, it will not appear in CSV.
    Based on my test, we cannot use expression to control column visibility in the report when it is export to CSV.
    Reference:
    http://connect.microsoft.com/SQLServer/feedback/details/742658/ssrs-csv-export-issue-for-hiding-certain-columns-using-expressions
    Since the issue is by design, I recommend you that submit a wish to the Microsoft Connect at
    https://connect.microsoft.com/SQLServer/Feedback. Your feedback is valuable for us to improve our products and increase the level of service provided.
    Regards,
    Alisa Tang
    If you have any feedback on our support, please click
    here.
    Alisa Tang
    TechNet Community Support

  • How to hide the file name (the bizarre number assigned by the camera) when exporting an image version in aperture from an album. Pl understand I want to keep the file name in the project library version.

    how to hide the file name (the bizarre number assigned by the camera) when exporting an image version in aperture from an album. Pl understand I want to keep the file name in the project library version.

    Within Aperture you have Images, which are constructed on-the-fly from two files (the Master and the Version).  You get an image-format file _only_ when you export an Image.  You select the file name (usually a scheme) when you create an image-format file (that is, when you export).  Look under "Aperture→Presets→File Naming" for built-in Presets.  You can, of course, create your own or customize any provided.
    The Preset is applied to only the file newly created by your "export" command.  It is not applied to the Image in Aperture (unless you rename your Versions or your Masters).

  • #NAME in Content column when  Activities Overview is exported to Excel

    When exporting Acitivities Overview to Excel, some of the columns under Content have #NAME in them and Excel indicates that it thinks there is an invalid function involved.  When the text is veiwed in the address bar, there is an = sign preceding the text.  This seems to only apply for activities of the CS Follow up type and not all of the follow up ones are affected. I noticed that when you create a Follow up, there is a blank line at the top of the contents tab above the text from the activity it was based on.  It isn't possible to create this blank line manually, so I am wondering if SAP puts some kind of unprintable character in the blank line that is causing this. If I make any small change to one of the followup activity text, without touching the blank line and then update, the blank line disappears.
    Our customer exports their activities regularly and would like to see all of the text in the Content column instead of this error. Does anyone know why this is happening?

    I have come across two scenarios that may be causing this:
    The number of characters in the text box is larger than can be handled by the Excel macro that exports them. It is an Excel limitation. I had the same issue in XL Reporter with the same field.
    The other thing one of my customers had is when syncing activities from Outlook. Where the activities had been synced from Outlook on their terminal server, the double quote character synced as a square box, syncing the same from their blackberry synced properly. This caused the contents to be unreadable when exporting to Excel
    Just a couple of things to look at!

  • Column headings are mismatched when export to excel (Data Only)

    Hi All,
    We have an old Crystal Web Portal designed using CE10 in VS 2003.   The crystal viewer shipped with VS 2003 exports to excel (Data only) in correct order where all the columns headers are matched with the corresponding data.
    We have re-written the entire new web portal in VS 2008 with using CE10 on windows 2003 server.  Everything works we can view the report, page navigation, export to PDF, export to MS Excel 97-2000.   However when export to MS Excel 97-2000 (Data only) option, the column headings are mismatched with the corresponding data.   I don't understand what changed between VS 2003 Crystal Viewer and VS 2008 Crystal Viewer.   I think this has to be the crystal viewer problem because I'm exporting from the viewer tool bar.
    Here is the API referencing in the code:
    In Visual Studio I'm referencing all CE10 10.0.3300 version api's.  Howerver since Crystal Viewer with VS 2008 is newer and has 10.5.3700 version I'm using CrystalDecision.Shared and CrystalDecision.Web are version 10.5.3700.   These seems to have no problem.  The entire web portal works fine. 
    More about Web Portal:
    -User is validated upon login with CE10
    -use selects the report from the list
    -Report ID is then passed to reportdocument
    -reportdocument API loads the report and
    -Viwer.reportsource= reportdocument.reportsource
    We cannot update Crystal Enterprise 10 right now.   I'm in the middle of deploying new web portal with VS 2008.   I have to resolve the Export excel (Data only) option and have the column headers matched with the data in excel.   I have tried everthing.
    Can some help here.
    thanks

    Hi, 
    The report saves the printer information and if it can connect to the exact same printer then the print options will get passed to the printer. 
    If the report is being sent to a different printer, Crystal doesn't know if this new printer will support the same settings, ie. duplex or color.  In our case we were setting the report to print duplex printing and landscape.  When our application went to print it actually crashed because some of the printers didn't support duplex. 
    What we did is disable the print button on the viewer and added the PrintDialog control to our form.  Use the ReportDocument.PrintOptions method to set the properties for the PrintDialog control. 
    var printDialog1 = new PrintDialog();
    printDialog1.UseEXDialog = true;
    printDialog1.AllowSomePages = true;
    if (myLink.Parent.SavedPrinterSettings != null)
         printDialog1.PrinterSettings = myLink.Parent.SavedPrinterSettings; //Use any saved printer settigns
         printDialog1.PrinterSettings.Copies = Convert.ToInt16(copies);
         dr = printDialog1.ShowDialog();
         if (dr == DialogResult.OK)
         myLink.Parent.SavedPrinterSettings = printDialog1.PrinterSettings;     //Save the latest printer settings
         nCopy = printDialog1.PrinterSettings.Copies;               //Get the number of Copies
         sPage = printDialog1.PrinterSettings.FromPage;               //Get the number of Start Page
         ePage = printDialog1.PrinterSettings.ToPage;                    //Get the number of End Page
         myReport.PrintOptions.PrinterName = printDialog1.PrinterSettings.PrinterName;     //Get the printer name
         myReport.PrintOptions.CustomPaperSource = printDialog1.PrinterSettings.DefaultPageSettings.PaperSource;
         if (printDialog1.PrinterSettings.Duplex == System.Drawing.Printing.Duplex.Vertical)
              myReport.PrintOptions.PrinterDuplex = PrinterDuplex.Vertical;
         else if (printDialog1.PrinterSettings.Duplex == System.Drawing.Printing.Duplex.Horizontal)
              myReport.PrintOptions.PrinterDuplex = PrinterDuplex.Horizontal;
         else if (printDialog1.PrinterSettings.Duplex == System.Drawing.Printing.Duplex.Simplex)
              myReport.PrintOptions.PrinterDuplex = PrinterDuplex.Simplex;
    Hope this helps,
    Brian

Maybe you are looking for

  • Internal server error in Requistion create - E-rec 600

    Hi All, We are in process of upgrading the 4.6c to ECC 6.0. E-rec 600 installed in the same box (server). We wish to use the Requistion management services for creating the RR via the BSP's through WAS. I assigned assigned manager role (SAP_RCF_MANAG

  • HT201317 Some of my older camera roll pictures are not on my photo stream, how do I get them on my photo stream?

    I just now turned on my photo stream so my pictures from my iphone 4S can go to my desk top.  Not sure why I didn't do this sooner, and a bunch of pictures from my photo stream didn't make it to my computer.  Also, a bunch of pictures that are on my

  • Summation query

    Hello, I have a report which shows the spend amount for the vendors for the last 12 months. I am trying to add a column which shows summation of the amounts by vendor. Now it shows only the total for each month. How can I also show the totals for the

  • Want to trigger an event in Javascript using Actionscript

    Hello forum, I am trying to trigger an event in Javascript from an SWF.  In HTML the triggering event is this: <a href="#" onclick="return GB_showFullScreenSet(page_setWEB1, 1)"><img src="images/Thumbnails/IMAGE-NAME.jpg" /><br />Link Label</a> This

  • Why is my 2008 Macbook faster than my 2012 MacBook Pro?

    I got a basic, 13Inch Macbook back in 2008. It has been used, nonstop, for the past almost 5 yrs since i bought it. I never turn it off, it always gets used on a bed/couch, tonnes of windows/programs constantly open. Its full of crappy DLed programs,