ReportDocument Export always exports top level of report!

<p> I use the following code to export data from a reportdocument object which is persisted by being written to the filesystem when page unloads and reloaded when the page is loaded</p><p>Now i have modified the export options whithin the viewer to accept a custom export format which basically runs code below the problem is that when the code below runs it exports a</p><p>high level view of the report even if you have drilled down into a group??? do I have to do something special to get the currently viewed page to be able to export it. The default formats within </p><p>the viewer work fine and export the correct data.</p><p class="coloredcode"><span class="kwd">Dim</span> dfo <span class="kwd">As</span> CrystalDecisions.<span class="kwd">Shared</span>.DiskFileDestinationOptions = <span class="kwd">New</span> CrystalDecisions.<span class="kwd">Shared</span>.DiskFileDestinationOptions() dfo.DiskFileName = rptPath & <span class="st">".tsv"</span> rptDoc.ExportOptions.DestinationOptions = dfo rptDoc.ExportOptions.ExportDestinationType = CrystalDecisions.<span class="kwd">Shared</span>.ExportDestinationType.DiskFile rptDoc.ExportOptions.ExportFormatType = ExportFormatType.TabSeperatedText rptDoc.Export()</p><p> any help would be great thanks</p><p>k</p>

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using CrystalDecisions.ReportSource;
using System.Data.SqlClient;
using RH;
namespace RH
    public partial class frmAnalyzeReports : System.Web.UI.Page
        #region Variable Declaretions
        ReportDocument rptDoc = new ReportDocument();
        Database crDb = null;
        Tables crTables = null;
        ConnectionInfo cnInfo = new ConnectionInfo();
        conModel con = new conModel();
        #endregion
        protected void Page_Load(object sender, EventArgs e)
            Response.Cache.SetCacheability(HttpCacheability.NoCache);
            if (Session["RoleID"] == null || Session["RoleID"].ToString() == "")
                Response.Redirect("frmUserLogin.aspx");
            else
            rptDoc.Load(Server.MapPath("Reports/PieChart.rpt"));
            rptDoc.SetDatabaseLogon(ConfigurationManager.AppSettings["DBLogin"].ToString(), ConfigurationManager.AppSettings["DBPassword"].ToString(), ConfigurationManager.AppSettings["DBServer"].ToString(), ConfigurationManager.AppSettings["DBase"].ToString());
            con.ReportConnection(rptDoc, cnInfo, crDb, crTables);
            if (!Page.IsPostBack)
                ParameterDiscreteValue paraDiscVal = new ParameterDiscreteValue();
                ParameterValues paraRpt = new ParameterValues();
                foreach (ParameterFieldDefinition paraDefTemp in rptDoc.DataDefinition.ParameterFields)
                    //Decalring Values to stored procedure
                SqlCommand cmdSearch = new SqlCommand();
                cmdSearch.Connection = con.con;
                cmdSearch.CommandText = "[dbo].[sp_Report_Query]";
                cmdSearch.CommandType = CommandType.StoredProcedure;
                //Assigning value to stored procedure
                ExportOptions crExportOptions;
                DiskFileDestinationOptions crDiskFileDestinationOptions = new DiskFileDestinationOptions(); ;
                string Fname;
                Fname = Server.MapPath("ReportOutputs/test.pdf");
                crDiskFileDestinationOptions = new DiskFileDestinationOptions();
                crDiskFileDestinationOptions.DiskFileName = Fname;
                crExportOptions = rptDoc.ExportOptions;
                    crDiskFileDestinationOptions.DiskFileName = Server.MapPath("ReportOutputs/test.pdf");
                    crExportOptions.DestinationOptions = crDiskFileDestinationOptions;
                    crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
                    crExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
                rptDoc.Export();
                Session.Add("report", rptDoc);
            CrystalReportViewer1.ReportSource = (ReportDocument)Session["report"];
        protected void CrystalReportViewer1_Init(object sender, EventArgs e)
            TableLogOnInfo li = new TableLogOnInfo();
            li.ConnectionInfo.ServerName = ConfigurationManager.AppSettings["DBServer"].ToString();
            li.ConnectionInfo.UserID = ConfigurationManager.AppSettings["DBLogin"].ToString();
            li.ConnectionInfo.Password = ConfigurationManager.AppSettings["DBPassword"].ToString();
            li.ConnectionInfo.DatabaseName = ConfigurationManager.AppSettings["DBase"].ToString();
            CrystalReportViewer1.ReportSource = CrystalReportSource1;
            CrystalReportViewer1.LogOnInfo.Add(li);
            CrystalReportViewer1.HasCrystalLogo = false;
            CrystalReportViewer1.HasPageNavigationButtons = false;
            //CrystalReportViewer1.HasAttributes = false;
            CrystalReportViewer1.HasViewList = false;
            CrystalReportViewer1.HasToggleGroupTreeButton = false;
            //CrystalReportViewer1.HasDrillUpButton = false;
            CrystalReportViewer1.DisplayGroupTree = false;
            //CrystalReportViewer1.to
        protected void LinkButton2_Click(object sender, EventArgs e)
            Session.Abandon();
            Response.Redirect("frmUserLogin.aspx");
Only 1st level exported by above code. Please help me export other levels too...
Arindam Roy
- Work is workship

Similar Messages

  • Top-level KW and exiftools

    My KW are in overarching categories - animals, places, etc. - with a bunch of kw in each - monkey, deer, Peru, Canada, etc. The top level words are set not to export, and all works fine for exporting. The top level kw are still written to the XMP of the DNG though, and when doing kw copy operations with exiftools they get copied. Any thoughts on avoiding this?
    THANKS

    A checkbox under "Include on Export" that reads "Do not write to file XMP" would be a good addition. If you open the raw in a program like ACDSee, these show up as well.

  • Nonsensical top level PDF bookmark in Crystal report exported from InfoView

    Thank you for any help or suggestions!
    I am using Crystal Reports 2008, the CMC repository, and InfoView.  I am producing PDF reports, many with bookmarks based on the group tree. 
    I have found that when I run my report off my workstation, all is fine, but when I run the same report out of InfoView, the top level bookmark is a string of nonsensical numbers and characters.
    Is there a way for me to ensure that this top level bookmark is something readable, perhaps the name of the report? 
    Thank you for your help!

    Hi,
    I ran into this problem just recently myself.  The report would export just fine out of the designer but when I would try to export it from CMC it would give me a root bookmark named along the lines of "~crw{33FB2DCD-838A-(more gibberish)....}.rpt"
    I eventually figured out how to solve it.  I am using Crystal XI R2, not 2008, but I suspect you may be able to resolve the issue using the same steps.  I believe that the gibberish name that you are seeing is the actual technical name of the report as it is stored on the Enterprise server.  In order to get it to display a nice formatted name of your choosing, open up your report in the report designer.  Now go to the File menu and select Summary Info.  In the Title section, provide the name of the report that you would like to see at the root of the bookmark.  You are esentially setting up an alias for it.  Now when you export, you should see the new name that you typed in as the main part of the bookmark.
    Hope this works for you!
    Edited by: Wjrudo on Nov 30, 2009 8:55 PM

  • How to exclude top-level keywords from export?

    Hi,
    I have keywords organised into a hierarchical structure; I never want the top-level keywords to appear in the exported image but can't find a quick way to do it.
    I can make it work by going to one of it's children and editing that keyword tag, unchecking the "export containing keywords" however I can't see a way of batch performing this action and the number of keywords I have make it impractical to do one by one.
    I tried clicking on the top-level keyword and unchecking the export option. It still exports and is even listed when I make the keyword tags dropdown "Will Export".
    If any of your gurus know the answer or can explain how I am misunderstanding the export terminology, please let me know...
    Thanks,
    Steve
    PS I have tried exporting with & without option "Write Keywords as Lightroom Hierachy"

    Thanks for that - its nearly right but I had tried doing that already and it didn't work.
    The reason why is when simply unchecked the Export Containing Keywords and Export Synonyms remain ticked but greyed out. I assumed that having been greyed out they are no longer effecting the output in any way but I was wrong.
    So, simply uncheck ALL the items in that dialogue box for top-level terms.
    Thanks again!

  • Export Layers as Files: Top Level Layers and Layers Sets

    Is there a script that can do the following that ImageReady was capable of?
    File/Export Layers as Files/
    I know there is a script that can just export the layer as files, but what I want to do is export the "Top Level Layers and Layer Sets" so that I can send several layers grouped under a folder as one image.
    Thanks! - j

    Something like this should work:
    // enable double clicking from the
    // Macintosh Finder or the Windows Explorer
    #target photoshop
    // Make Photoshop the frontmost application
    app.bringToFront();
    // Start at the top of the layers stack and select each
    // layer in turn
    for (var i = 0; i < activeDocument.layers.length; i++) {
    activeDocument.activeLayer = activeDocument.layers[i];
    // Put all your processing functions... //
    duplicateSelectedLayers(activeDocument.activeLayer.name);
    var psdSaveOptions = new PhotoshopSaveOptions();
    app.activeDocument.saveAs( File( "~/Desktop/" + activeDocument.name + ".psd" ), psdSaveOptions);
    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
    // ...in the area between these two comments. //
    function duplicateSelectedLayers(soParent){
    var id2277 = charIDToTypeID( "Mk " );
    var desc304 = new ActionDescriptor();
    var id2278 = charIDToTypeID( "null" );
    var ref144 = new ActionReference();
    var id2279 = charIDToTypeID( "Dcmn" );
    ref144.putClass( id2279 );
    desc304.putReference( id2278, ref144 );
    var id2280 = charIDToTypeID( "Nm " );
    desc304.putString( id2280, soParent );
    var id2281 = charIDToTypeID( "Usng" );
    var ref145 = new ActionReference();
    var id2282 = charIDToTypeID( "Lyr " );
    var id2283 = charIDToTypeID( "Ordn" );
    var id2284 = charIDToTypeID( "Trgt" );
    ref145.putEnumerated( id2282, id2283, id2284 );
    desc304.putReference( id2281, ref145 );
    executeAction( id2277, desc304, DialogModes.NO );

  • Export link on top

    Hi ,
    can any one tel me..
    normally we will get 'EXPORT' report link on the bottom of the report,
    is there any workaround to get that link at the top of the report????

    Hi,
    Yes. refer my pre.post
    http://obieeelegant.blogspot.com/2012/07/customize-excel-download-link.html
    Thanks
    Deva

  • Regarding Issue when Exporting the Output of the Discoverer Report to Excel

    Hi,
    Can Any of you guys help me out in this issue. I am exporting the Discoverer Report Output to Excel sheet, I am able to export but while I am opening the excel sheet I am getting an error saying "UNABLE TO READ FILE".
    Please help me out in this Issue, it is so urgent.
    Thanks in Advance..
    Raja.

    Hi,
    Is there any way to export the output of scheduled Discoverer Reports to a particular server using Discoverer plus.Only by openning and exporting each report manually.
    is there any way to get the output name in a particular syntax. I want to concatenate date in the output name.Only by entering the filename when you do the export.
    The best way to do this is to use Discoverer Desktop and a third party scheduler. Then you can export all your reports automatically and define the filename used in the output. Search this forum for more information on third party schedulers.
    Rod West

  • How to make the report shows only top level steps

    HI,
    I use many subsequences in my tests.  I have no interest to see them in the report.  How can I force the report to show only top level steps?
    Thanks
    Rafi

    I needed to prevent 'Skipped' steps from appearing in my reports.  One way to do this is to override the SequenceFilePostResultListEntry callback in the model.  You do this by clicking on Edit and then Sequence File Callbacks and then find SequenceFilePostResultListEntry in the list and click the Add button.
    Edit your new callback in your sequence file to check for a pre-condition.  In my case I checked for Parameters.Result.Status == "Skipped" since that parameter is set to Skipped, Done, etc. based on the result.
    If the condition was true then my only step in the callback was to set Parameters.DiscardResults = True.  The TestStand model will then throw that result away when it processes the report.  You could add a step for every type of data you wish to discard.
    A second method that is easier to implement, but time consuming, is to select each step you DON'T want in your report and bring up the Properties for that step.  Under the Run Options tab, deselect the Record Results box.  That will keep the results of that step out of the report, but you have to do this for EVERY step you don't want to have reported.  The first approach I provided acts to filter the results.
    If you aren't sure what the Parameters.Result.Status will be, then set a breakpoint after that step is executed and scan the parameters when the sequence is halted there.  You can then detect the actual text used as a result for that step, such as "Done" and can set your pre-condition appropriately.

  • In application builder the top level vi is always set to "run when opened"; how do I turn this off so I don't have to change it each and every time I build a .exe??

    I build a lot of executables using Application Builder under LabVIEW and in every one I build, I don't want the top level vi to take off and run when I open the executable. Currently, I edit each .exe I build within Application Builder and change the option of "run when opened" from Yes to No for the top level vi. All the other subvi's are already set to No. It would seem as though there should be some way to "turn this off" if you will so the top level vi is not always set to "run when opened" by default within Application Builder. Is there such a solution that anyone knows of?? Any help would be apprec
    iated... thanks...

    Indeed the Application builder forces "run when opened" to true for top levels VIs. If you don't want your VI to make any real work when the application starts, you should simply put a do-nothing loop in the beginning of the VI that will loop until the user presses a boolean. It will be more intuitive for users to press a Run button on the FP than clicking on the white Run arrow in the bar.
    LabVIEW, C'est LabVIEW

  • Is it possible to export the out put of Crystal report into text file?

    Hi All,
    Is it possible to export the out put of Crystal report into text file?

    Hi
    Yes, Go to File --> Export --> Export Report --> Under Format select TEXT & select the destination as "Disk file"(defaultly selected)
    Give the proper details as per your requirement for "Characters per inch" & "Number of lines per page" & click on 'OK"
    In "Choose Export file" window, select the destination folder & provide file name. click on "SAVE"
    Regards
    Ashwini

  • 'Control terminals on connector pane not on top level block diagram.' comment on CLD report

    Hello All
    Could anybody enlighten me please , what does that comment mean on CLD report
    'Control terminals on connector pane not on top level block diagram.
    Does it mean that some terminals are hidden within some case structures and not showing on block diagram without going into case structures or by 'top level block diagram' it means
    main.vi and controls on main.vi must also be connected to its connector pane?
    Thank you
    K.Waris
    Solved!
    Go to Solution.

    For one thing it means that they run VI analyzer on your VIs since that is a verbatim warning that you receive.  It simply means a terminal which is wired to the ConPane is not on the top level diagram, ie. inside a case structure.
    As to why it is often not a good idea to do this read this classic thread:
    http://forums.ni.com/t5/LabVIEW/case-structure-parameter-efficiency/m-p/382516#M191622

  • Export always go to 4x3

    I have HDV footage, my project settings are for that type of footage. It all looks right in editing but no matter how I export, either export movie or built in encoder, I get a squished 4x3 image. I have tried literally every setting there is.
    If I do a straight 16 x 9 export, then take that file to sorenson squeeze I can get it back to widescreen proportions but I can't export a full res movie in the orginal format without it getting disorted to 4x3.
    . What is going on here?

    I open the exported .mov in the quicktime player on my computer. If I bring that exported movie into Encore and make a DVD it looks fine. If I bring it into Sorenson Squeeze to make an flv, I choose 16x9 and that seems to fix the problem. The problem comes when I take that exported movie and upload to vimeo, which is how many of my projects are being used right now. It seems that Sorenson, or Encore are fixing the problem but vimeo is just taking what I give it. It I see a squished 4x3 in the exported .mov played right in the computer, that's probably how it actually is. (I think)
    To add another wrinkle, I get a thin black border on the sides, as if it's not the full width but only 98%.
    Something I'm not clear on. In choosing export settings, I select NTSC widescreen 16x9 but the numbers still say 720 x 480. Shouldn't they change proportionally?
    Thanks for the help by the way, this is a real problem with my client right now that I HAVE to solve.

  • How do I use CreateBookmarksFromGroupTree and NOT guid in the name for my top level?

    Post Author: Barbdcg
    CA Forum: Deployment
    I have a report that I have created that uses uses groups and I wanted export a PDF using the CreateBookmarksFromGroupTree option. While that works, I get an ugly top level bookmark name that starts with the name of my report, then followed by a GUID;
    Report {49E72CC5-7FFD-44F8-831B-EA8F543F7D82}.rpt
    So, how do I Put in a name of my own choosing as the top-level bookmark or at least get rid of the guid?
    Any help or suggestions would be appricated.
    Thanks,
    Barb

    Post Author: Barbdcg
    CA Forum: Deployment
    Still no answer??? I can not figure this one out!!  HELP!!!

  • How do I use CreateBookmarksFromGroupTree and NOT get a "temp_" for my top level?

    I have a report that I have created that uses uses groups and I wanted export a PDF using the CreateBookmarksFromGroupTree option. While that works, I get an ugly top level bookmark name that starts with "temp_" then followed by two GUIDs "temp_13fef8e3-30ec-4bc5-ba77-b55d23c95e8f {87823BCB-7789-407C-8A7F-5096BE07A83E}".
    So, how do I:
    1) Get rid of this top level so it matches the Crystal Viewer (which has multiple top level bookmarks)
    2) Put in a name of my own choosing as the top-level bookmark.
    <!break>
    Any help or suggestions would be appricated.
    Thanks,
    Jim

    I would very much like to know how to avoid this also!!!

  • How can i NOT include top level keyword in the metadata of an image?

    Hello,
    I want to know how can i NOT include top level keyword in the metadata of an image. I know there is an option for not applying a keyword to an exported image, but is there an option for not applying the top level keyword to the actual image?
    I have organized my geographical (by location) keywords like this:
    Places
    USA
    New York
    Miami
    Spain.
    If i add geographical keywords to all my images, all my images will have the keyword "Places", i dont think that it have any sence to have all your images with one keyword. How can i fix this? Any sugestion? i will appreciate it a lot any help or information that you could give me.
    Excuse my english, i know it is not good. I hope that you could understand me.
    Thanks,
    Marcelo :)

    Explicitly excluding a keyword only applies when "exporting". Unfortunately, there's currently no way to stop the keyword being written to the file when "Save Metadata to File" command is used. The natural reaction of users to this difference is to suggest that it is stupid. Nevertheless, there are good reasons why the difference exists:
    1. "Export" creates a new file whereas "Save Metadata to File" writes the metadata back into the existing file.
    2. There are very good reasons why certain keywords should not be written to file, and the example given in the OP is one. Saving metadata to file is more often used as means of backing up important image related metadata, independently of the catalog or allowing the metadata to be visible in other aplications. It would be rare that such a file would be shared with a third party, so the reason for not including certain keywords is less obvious. Actually, not including it can result in no end of confusion and grief. For example, if the top level (or any keyword) was excluded during the save metadata process then the other keywords would be orphaned when image is imported back into the catalog (e.g. buiding a new catalog).
    The development team are aware of the need, in some circumstances, to exclude certain keywords when save metadata command is used. How and when the issue is resolved, without adding even more confusion/complexity, is some way off.

Maybe you are looking for