Export to csv with blank row error apex 4.0.2

In a tabular form when I use the export to csv, it return a csv file and the data is fine but there is a blank row between the header and the first row of data.
It happens in the 4.0.2 release. I used the 3.1.2 release before and it worked perfect.
It is a bug? any idea to fix it? I want to avoid the manual export because it's a complex query with agrupation levels.
Thank you!

An easy solution to formatting columns as text in Excel exporting (even handles leading zeros properly). In the report SQL do the following code:
For Interactive reports:
decode(:REQUEST,'CSV','="'||your_column||'"',your_column) your_column_name,
For Standard reports:
decode(INSTR(NVL(:REQUEST,'FOO'),'FLOW_EXCEL'),0,your_column,'="'||your_column||'"') your_column_name,
Interactive report example
select address1,
address2,
city,
state,
decode(:REQUEST,'CSV','="'||zip_code||'"',zip_code) zipcode
from your_table
Standard report example
select address1,
address2,
city,
state,
decode(INSTR(NVL(:REQUEST,'FOO'),'FLOW_EXCEL'),0,zip_code,'="'||zip_code||'"') zipcode
from your_table
This will work without modification if users modify and save an interactive report as well.

Similar Messages

  • Error exporting to CSV with groups

    Post Author: HuskerSkip
    CA Forum: Exporting
    Iu2019m having a problem exporting reports to the CSV format.  Iu2019m seeing the problem both in the report designer and in my C# code.  Here are the conditions under which the problem appears:
    Report contains at least one group.
    Report Header & Footer, Page Header & Footer, and Group Headers are all suppressed.  Only Details is visible.
    Selection Formula is such that it returns no records.
    When I export the report as CSV from the report designer I get this error:  u201CFailed to export the report.u201D
    When I export from my C# code, I get this error:  u201CError in File C:\DOCUME~1\...EBDF30}.rpt:  Operation not yet implemented.u201D
    If the Selection Formula is such that it returns records, then everything works fine.  Other extract formats also work fine.  It only seems to be CSV with an empty dataset that has the problem.
    Has anyone else run into this problem?  If so, are there any workarounds?
    Thanks,
    Skip
    CR XI R2 SP3 Developer Full
    C# 2.0
    Visual Studio 2005

    I wouldn't think it would be a problem. Are you sure you have write permission where you want to save the PDF?

  • Exporting text files with wide row lengths

    Post Author: stingray454
    CA Forum: Exporting
    I'm using Crystal Reports v 9.2, and I'm trying to export a report to an ASCII text file that needs to have very wide rows of data, up to 420 characters long (wide) on each row.  This report will never be physically printed, only used to export an ASCII text file. 
    When designing the report, Crystal's page width is dependent on the printer driver used and the page width.  I obviously needed something wider than 8.5 x 14 in landscape mode to fit all the fields in a 420 character wide row.  I found by using an Adobe PDF generating printer driver, like CutePDF as the printer, I could go into the driver advanced setting, and set a customized PostScript page size up to 200 inches wide.  That works for creating a wide enough Report layout to place all my fields.  However, when I go to export the report to the TXT file, it cuts off at 22.5 inches or 180 characters wide when viewed in Notepad or any other text reader, even though the data is showing in Crystal Reports' preview mode. 
    My question is:  is there any way I could export an ASCII text file using Crystal Reports that has up to 420 characters wide in a single row?  Are there any characters per inch settings in Crystal? 
    Thanks!

    Post Author: mzellner
    CA Forum: Exporting
    Have you tested the limits of a csv? What you're doing sounds like creating a fixed length ascii record. I thought about writing a program to build fixed length records from a csv file. Maybe there's one out there somewhere, who knows?

  • Export to Excel with colored row

    Hi,
    I'm developing a alv report in web dynpro. The first  requirement is to put traffic lights based on some criteria. This part has been done.
    2nd requirement is to export this alv report into excel sheet. If traffic light of the row is 'RED' then in excel sheet it will be colored 'RED', if row is green excel sheet row will be 'GREEN' etc.
    Thanks in advance for providing  me solution of above problem  I'm new to dynpro.
    Thanks in advance,
    Abhijit.

    Hi ,
        If you need cell formatting you must use the Excel XML format. Build a spreadsheet with the features you want and then choose save as XML from within Excel. Then look at the resulting file with a text editor to see how the XML format is built. This is what you need to duplicate in ABAP using Concatenations, the iXML library or XSLTs.
       OR you can go through this link and check if it can help you:
      link : http://www.****************/Tutorials/WebDynproABAP/Excel/Index.htm

  • Export to csv with no duplication in records

    how can i export from a table to a CVS file with no duplications in writing?
    REGARDS
    I HAVE THIS QUERY I NEED HELP ON IT
    select iden_username, name , object_name from identification, groups, objects
    order by iden_username
    I WANT A RESULT FOR ALL NOT ALL THE RESULTS POSSIBLE

    I also want to help you but i cannot help you unfortunately.
    Regards
    Raj

  • How to fill the left space with blank rows in jTable?

    I have a master/detail BC4J/JClient application. The jTable has space to display up to 10 detail records. If I currently have 3 detail records, I want to display the three and have 7 blank lines for additional input on the form. Any suggestions on the best way to handle this.
    I think it is a common requirement in an application with a jTable.
    Can anyone give a hint for me to handle that issue best?

    Adding 7 blank lines is impossible and if it was possible it is not the correct way to do what you need to do.
    The appropriate thing is to add a JUNavigatorBar to act on the detail table and by this you will be able to add new lines in the table if needed.
    One more important thing, take care to add your table to a scroller object that will enhance your table with the scrolling ability if you have more lines the table can display.
    hope it helps

  • Trouble Exporting via FTP with LR2.0, Error message

    I'm trying to upload some resized images to a folder on my web site using the FTP Export. I can connect and browse to the desired directory when setting up the FTP, but when I try to export I get a pop up message saying:
    "Unable to upload because Lightoom cannot ascertain if the target destination exists."
    The funny thing is that it works for another site I FTP to just fine.
    Suggestions?

    What are your export settings?

  • Supressing blank rows

    Hi
    I'm sure the answer is already here, but I've been looking for two days and I can't find it.
    I have a master table where one of the columns is a check box.
    I would like to copy all rows where the check box is ticked to a slave table so that I can then work on the extracted data. The slave table needs to be updated when the master is updated.
    I can do this with a an =IF(Table 2 :: $E3="TRUE",Table 2 :: A3,"") formula, but I end up with blank rows in the slave table. I can't find out how to ignore the blank rows and end up with solid data. I realise this is not a very challenging query for you experts, but Im tearing my hair out here!
    Secondly, is there a Formula 'cookbook' for Numbers?
    Many thanks

    JEATT,
    Your request is not entirely clear to me, at least probably not as clear as it must seem to you, but I'll take a run at it.
    First, eliminating blanks. I find that the best way to eliminate blanks is to sort them to the end of the column. Doing a Sort will move all the blanks to either the top of bottom of the table, depending on how you sort.
    Second, the Formula 'cookbook' for Numbers is available from the Help menu. It's called the Numbers User Guide and chapter 5 deals with using formulas and functions n tables.
    Jerry

  • Full Export/Import Errors with Queue tables and ApEx

    I'm trying to take a full export of an existing database in order to build an identical copy in another database instance, but the import is failing each time and causing problems with queue tables and Apex tables.
    I have used both the export utility and Data Pump (both with partial and full exports) and the same problems are occurring.
    After import, queue tables in my schema are unstable. They cannot be dropped using the queue admin packages as they throw ORA-24002: QUEUE_TABLE <table> does not exist exceptions. Trying to drop the tables causes the ORA-24005: must use DBMS_AQADM.DROP_QUEUE_TABLE to drop queue tables error
    As a result, the schema cannot be dropped at all unless manual data dictionary clean up steps (as per metalink) are done.
    The Apex import fails when creating foreign keys to WWV_FLOW_FILE_OBJECTS$PART. It creates the table ok, but for some reason the characters after the $ are missing so the referencing tables try to refer to WWV_FLOW_FILE_OBJECTS$ only.
    I am exporting from Enterprise Edition 10.2.0.1 and importing into Standard edition 10.2.0.1, but we are not using any of the features not available in standard, and I doubt this would cause the issues I'm getting.
    Can anyone offer any advice on how I can resolve these problems so a full import will work reliably?

    Thanks for the lead!
    After digging around MetaLink some more, it sounds like I'm running into Bug 5875568 (MetaLink Note:5875568.8) which is in fact related to the multibyte character set. The bug is fixed in the server patch set 10.2.0.4 or release 11.1.0.6.

  • Export to excel. Subreport blank rows generated.

    Dear Forum
    Hoping you can help with a query.
    I have a report that has 3 subreports all are supressed if blank and not shown during preview or print.
    When i try and export the report to excel the returning result is a series of blank rows in excel.
    I know the subreports are the root cause of the issue as when each of them is supressed my blank row count reduces accordingly.
    Is this a know issue or is there indeed a resolution.
    Thank you forum for your assisatnce as ever
    With Kind Regards
    Paul Marks

    Hi Paul,
    Sorry to be a downer but It has been my experience that the more complex a report is the more problems I have when exporting especially to excel.
    Below is a link to the export limitations of Crystal 10...I haven't found a newer version for XI or 2008.  This document doesn't give an exact explanation for each limitation but sometimes it's enough to know that there is an issue related to exporting your report.  In your case there are limitations related to exporting suppressed items to an excel spreadsheet.
    [Crystal Reports 10 - Export Limitations|http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/d0b01060-3a62-2b10-73a1-d03a6c634914]
    I don't know how much data you have but my suggestion is to try exporting your report to a csv file instead because suppression is not as much a problem when exporting to that format.  CSV files can be opened directly by Excel you are just missing any nice formatting.
    If you need a nicely formatted spreadsheet, create a standalone spreadsheet formatted the way you want and either paste in the data from your exported Crystal report or link to the data in the csv file.  I have found this type of conversion takes a little longer to set up but is much easier to maintain. 
    If you do decide to export to csv format i must also suggest that the report be formatted for export (this also helps with data dumps to excel):
    1. Start rows of data at the left most margin and align any subsequent rows with this position.
    2. Make sure the next column (to the right) always starts where the last column ends.  This ensures no blank columns get inserted between your data.  Subsequent rows should have columns aligned in size and count to ensure proper layout.
    3. Make sure all objects in a row have the exact same height and use the "fit to section" command to prevent extra rows from being generated.
    4. Suppress all sections that do not contain any objects needed in your export.
    5. If your data isn't too wide (less than 256 bytes but it can be more if the printer driver used can print at a high dpi setting) consider using a formula to create each row of data i.e. properly padded for space delimited or with the commas where you want them for csv etc).  This also gives you more control on how each data type is formatted.
    Sorry to be so long winded but I hope this helps with your exporting.
    Marshall

  • Database, Dataset, Table Adaptors Error "Unable to load, Update requires a valid DeleteCommand when passed DataRow collection with deleted row"

    Microsoft Visual Basic 2010 Express.
    I am new to Visual Basic programing and i am trying to understand the relationships between Datasets, database, table Adaptors. I have to following code that is is giving me the following error" Unable to load, Update requires a valid DeleteCommand
    when passed DataRow collection with deleted rows". 
    I can track the error and its located in "OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)" code. What am i missing?
    It seems that i can delete the data on the DataGridView Table and it only displays the correct data. but my database is not updating, even though the data grid displays differently.I can determine this because, when i save the offset database, i have all
    the previous uploads and all the rows that i wanted to delete are still there.
    My final goal is to be able to import offset data from a CSV file, save this data on the pc, send a copy of this data to a NuermicUpDown so the customer can modify certain numbers. From here they download all the date to a controller.  IF the customer
    needs to modify the imported data, they can go to a tab with a data grid view and modify the table. They will also have to option to save the modified data into a csv file.  
    Im not sure if i am making this overcomplicated or if there is a easier way to program this.
    CODE:
    Private Function LoadOffSetData()
            Dim LoadOffsetDialog As New OpenFileDialog 'create a new open file dialog and setup its parameters
            LoadOffsetDialog.DefaultExt = "csv"
            LoadOffsetDialog.Filter = "csv|*.csv"
            LoadOffsetDialog.Title = "Load Offset Data"
            LoadOffsetDialog.FileName = "RollCoaterOffset.csv"
            If LoadOffsetDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then  'show the dialog and if the result is ok then
                Try
                    Dim myStream As New System.IO.StreamReader(LoadOffsetDialog.OpenFile) 'try to open the file with a stream reader
                    If (myStream IsNot Nothing) Then 'if the file is valid
                        For Each oldRow As MaterionOffsetDataSet.OffsetTableRow In MaterionOffsetDataSet.OffsetTable.Rows
                            oldRow.Delete()                       
    'delete all of the existing rows
                        Next
                        'OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)
                        Dim rowvalue As String
                        Dim cellvalue(25) As String
                        'Reading CSV file content
                        While myStream.Peek() <> -1
                            Dim NRow As MaterionOffsetDataSet.OffsetTableRow
                            rowvalue = myStream.ReadLine()
                            cellvalue = rowvalue.Split(","c) 'check what is ur separator
                            NRow = MaterionOffsetDataSet.OffsetTable.Rows.Add(cellvalue)
                            Me.OffsetTableTableAdapter.Update(NRow)
                        End While
                        Me.OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)
                        MainOffset.Value = OffsetTableTableAdapter.MainOffsetValue          'saves all the table offsets
    to the offset numericUpDown registers in the main window
                        StationOffset01.Value = OffsetTableTableAdapter.Station01Value
                        StationOffset02.Value = OffsetTableTableAdapter.Station02Value
                       myStream.Close() 'close the stream
                        Return True
                    Else 'if we were not able to open the file then
                        MsgBox("Unable to load, check file name and location") 'let the operator know that the file wasn't able to open
                        Return False
                    End If
                Catch ex As Exception
                    MsgBox("Unable to load, " + ex.Message)
                    Return False
                End Try
            Else
                Return False
            End If
        End Function

    Hello SaulMTZ,
    >>I can track the error and its located in "OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)" code. What am i missing?
    This error usually shows that you do not initialize the
    DeleteCommand object, you could check this
    article to see if you get a workaround.
    >> Im not sure if i am making this overcomplicated or if there is a easier way to program this.
    If you are working CSV file, you could use OleDB to read it which would treat the CSV file as a Table:
    http://www.codeproject.com/Articles/27802/Using-OleDb-to-Import-Text-Files-tab-CSV-custom
    which seems to be easier (in my opinion).
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • R3load export of  table REPOSRC with lob col - error ora-1555 and ora-22924

    Hello,
    i have tried to export data from our production system for system copy and then upgrade test. while i export the R3load job has reported error in table REPOSRC, which has lob column DATA. i have apsted below the conversation in which i have requested SAP to help and they said it comes under consulting support. this problem is in 2 rows of the table.
    but i would like to know if i delete these 2 rows and then copy from our development system to production system at oracle level, will there be any problem with upgrade or operation of these prorgams and will it have any license complications if i do it.
    Regards
    Ramakrishna Reddy
    __________________________ SAP SUPPORT COnveration_____________________________________________________
    Hello,
    we have are performing Data Export for System copy of our Production
    system, during the export, R3load Job gave error as
    R3LOAD Log----
    Compiled Aug 16 2008 04:47:59
    /sapmnt/DB1/exe/R3load -datacodepage 1100 -
    e /dataexport/syscopy/SAPSSEXC.cmd -l /dataexport/syscopy/SAPSSEXC.log -stop_on_error
    (DB) INFO: connected to DB
    (DB) INFO: DbSlControl(DBSL_CMD_NLS_CHARACTERSET_GET): WE8DEC
    (DB) INFO: Export without hintfile
    (NT) Error: TPRI_PAR: normal NameTab from 20090828184449 younger than
    alternate NameTab from 20030211191957!
    (SYSLOG) INFO: k CQF :
    TPRI_PAR&20030211191957&20090828184449& rscpgdio 47
    (CNV) WARNING: conversion from 8600 to 1100 not possible
    (GSI) INFO: dbname = "DB120050205010209
    (GSI) INFO: vname = "ORACLE "
    (GSI) INFO: hostname
    = "dbttsap "
    (GSI) INFO: sysname = "AIX"
    (GSI) INFO: nodename = "dbttsap"
    (GSI) INFO: release = "2"
    (GSI) INFO: version = "5"
    (GSI) INFO: machine = "00C8793E4C00"
    (GSI) INFO: instno = "0020111547"
    (DBC) Info: No commits during lob export
    DbSl Trace: OCI-call 'OCILobRead' failed: rc = 1555
    DbSl Trace: ORA-1555 occurred when reading from a LOB
    (EXP) ERROR: DbSlLobGetPiece failed
    rc = 99, table "REPOSRC"
    (SQL error 1555)
    error message returned by DbSl:
    ORA-01555: snapshot too old: rollback segment number with name "" too
    small
    ORA-22924: snapshot too old
    (DB) INFO: disconnected from DB
    /sapmnt/DB1/exe/R3load: job finished with 1 error(s)
    /sapmnt/DB1/exe/R3load: END OF LOG: 20100816104734
    END of R3LOAD Log----
    then as per the note 500340, i have chnaged the pctversion of table
    REPOSRC of lob column DATA to 30, but i get the error still,
    i have added more space to PSAPUNDO and PSAPTEMP also, still the same
    error.
    the i have run the export as
    exp SAPDB1/sap file=REPOSRC.dmp log=REPOSRC.log tables=REPOSRC
    exp log----
    dbttsap:oradb1 5> exp SAPDB1/sap file=REPOSRC.dmp log=REPOSRC.log
    tables=REPOSRC
    Export: Release 9.2.0.8.0 - Production on Mon Aug 16 13:40:27 2010
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to: Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit
    Production
    With the Partitioning option
    JServer Release 9.2.0.8.0 - Production
    Export done in WE8DEC character set and UTF8 NCHAR character set
    About to export specified tables via Conventional Path ...
    . . exporting table REPOSRC
    EXP-00056: ORACLE error 1555 encountered
    ORA-01555: snapshot too old: rollback segment number with name "" too
    small
    ORA-22924: snapshot too old
    Export terminated successfully with warnings.
    SQL> select table_name, segment_name, cache, nvl(to_char
    (pctversion),'NULL') pctversion, nvl(to_char(retention),'NULL')
    retention from dba_lobs where
    table_name = 'REPOSRC';
    TABLE_NAME | SEGMENT_NAME |CACHE | PCTVERSION | RETENTION
    REPOSRC SYS_LOB0000014507C00034$$ NO 30 21600
    please help to solve this problem.
    Regards
    Ramakrishna Reddy
    Dear customer,
    Thank you very much for contacting us at SAP global support.
    Regarding your issue would you please attach your ORACLE alert log and
    trace file to this message?
    Thanks and regards.
    Hello,
    Thanks for helping,
    i attached the alert log file. i have gone through is, but i could
    not find the corresponding Ora-01555 for table REPOSRC.
    Regards
    Ramakrishna Reddy
    +66 85835-4272
    Dear customer,
    I have found some previous issues with the similar symptom as your
    system. I think this symptom is described in note 983230.
    As you can see this symptom is mainly caused by ORACLE bug 5212539 and
    it should be fixed at 9.2.0.8 which is just your version. But although
    5212539 is implemented, only the occurrence of new corruptions will be
    avoided, the already existing ones will stay in the system regardless of the patch.
    The reason why metalink 452341.1 was created is bug 5212539, since this
    is the most common software caused lob corruption in recent times.
    Basically any system that was running without a patch for bug 5212539 at some time in the past could be potentially affected by the problem.
    In order to be sure about bug 5212539 can you please verify whether the
    affected lob really is a NOCACHE lob? You can do this as described in
    mentioned note #983230. If yes, then there are basically only two
    options left:
    -> You apply a backup to the system that does not contain these
    corruptions.
    -> In case a good backup is not available, it would be possible to
    rebuild the table including the lob segment with possible data loss . Since this is beyond the scope of support, this would have to be
    done via remote consulting.
    Any further question, please contact us freely.
    Thanks and regards.
    Hello,
    Thanks for the Help and support,
    i have gone through  the note 983230 and metalink 452341.1.
    and i have ran the script and found that there are 2 rows corrupted in
    the table REPOSRC. these rows belong to Standard SAP programs
    MABADRFENTRIES & SAPFGARC.
    and to reconfirm i have tried to display them in our development system
    and production system. the development systems shows the src code in
    Se38 but in production system it goes to short dump DBIF_REPO_SQL_ERROR.
    so is it possible to delete these 2 rows and update ourselves from our
    development system at oracle level. will it have any impact on SAP
    operation or upgrade in future.
    Regards
    Ramakrishna Reddy

    Hello, we have solved the problem.
    To help someone with the same error, what we have done is:
    1.- wait until all the processes has finished and the export is stopped.
    2.- startup SAP
    3.- SE14 and look up the tables. Crete the tables in the database.
    4.- stop SAP
    5.- Retry the export (if you did all the steps with sapinst running but the dialogue window in the screen) or begin the sapinst again with the option: "continue with the old options".
    Regards to all.

  • Create export-csv with dynamic (unknown amount) columns

    Hi,
    This is my first post, hopefully I include everything you need.  My code block is at the bottom of my post.....
    I have written a PS script that gives me the info I need, but I would like to format it differently.  Currently I import a CSV with 2 columns - username and print queue name.  The script then takes each username and looks it up in SCCM
    to find the workstations the username has logged into.  I then export to csv - this is where I would like to format it differently.  The export csv has 4 columns username, print queue name, workstation name, and details. 
    username1,printqueue,workstation1,details
    username1,printqueue,workstation2,details
    username2,printqueue,workstation1,details
    username2,printqueue,workstation2,details
    My problem is that if the user logs into 5 workstations I have 5 rows with duplicated username and print queue name.  If my next username logs into 8 workstations I have 8 rows, etc.  I would like to format the export dynamically using as many
    columns (not rows) as need.  For example
    username1, printqueue,workstation1,workstaion2, workstation3
    username2,printqueue,workstation1,workstation2, workstation3,workstation4
    I expect where I have my pscustomobject would be where I could change this - I have tried setting up a count variable and using that in my loop to be able to assign dynamic column name, I have tried using an array but still new to setting that up, maybe
    I just wasn't doing it correctly.  If anyone has any ideas that would be great.
    Thanks, Kevin
    Here is my code:
    #Declare variables
    $now = Get-date
    $date = get-date -uformat "%Y_%m_%d_%I%M%p"
    $Queues = Import-Csv "c:\Users.csv"
    $SiteName="XXX"
    $SCCMServer="your.sccm.server.com"
    $SCCMNameSpace="root\sms\site_$SiteName"
    $CSVPath1 = "c:\PrinterUsersByComputer_$date.CSV"
    #Notify user that script is starting
    Write-Host -ForegroundColor Green "Starting script"
    #Loop through each account and find any workstations from SCCM that the user has logged into
    foreach ($Queue in $Queues){
    $Queue.Username
    $WSs = Get-WmiObject -namespace $SCCMNameSpace -computer $SCCMServer -query "select Name from sms_r_system where LastLogonUserName = '$($queue.username)'" | Select-Object -ExpandProperty Name
    #Check if the workstation variable has data
    if ($WSs){
    foreach ($WS in $WSs) {
    #Check if workstation is ALIVE and if we have access to it to get OS version
    $rtn = (Test-Connection -Cn $WS -BufferSize 16 -Count 1 -Quiet)
    IF ($rtn -match 'True') {
    $OS = Get-WmiObject Win32_OperatingSystem -ComputerName $WS | Select-Object -ExpandProperty Caption -ErrorAction Stop
    #Write to screen device to show progress
    Write-Host -ForegroundColor Green "Computer information found: $WS"
    #Write to log file the username, workstation(s) logged into, and OS version
    [PSCustomObject] [Ordered] @{
    'UserName' = $Queue.Username
    'Print Queue' = $Queue.PrintQueue
    'ComputerName' = $WS
    'Operating System' = $OS
    } | Export-Csv $CSVpath1 -Append -NoTypeInformation

    Ok, just a sec, I'm not sure we are on the same page.  I don't think that isn't what I'm look for. Unless I'm missing something, your code above assume 4 workstation columns for every row.  What if there is 5 or 8.  My current output
    from the full script is this (based on checking if PC is pingable, whether I'm denied the WMI query, etc)
    UserName
    Print Queue
    ComputerName
    Operating System
    User1
    PQ1
    Computer1
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer2
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer3
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer4
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer5
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer6
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer7
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer8
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer9
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer10
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer11
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer12
    Microsoft Windows 7 Enterprise 
    User1
    PQ1
    Computer13
    No device name to query
    User1
    PQ1
    Computer14
    Microsoft Windows 7 Enterprise 
    User2
    PQ2
    Computer15
    Microsoft Windows 7 Enterprise 
    User3
    PQ3
    Computer1
    Microsoft Windows 7 Enterprise 
    User4
    PQ4
    Computer2
    Access denied connecting to device.    No access to it: Computer2
    What I would really like is this, getting rid of the OS name for now:
    User1
    PQ1
    Computer1
    Computer2
    Computer3
    Computer4
    Computer5
    User2
    PQ3
    Computer1
    User3
    PQ13
    Computer1
    Computer2
    I would just like to condense the workstations to columns instead of 1 workstation per row and be able to expand the # of columns required based on the amount of workstations in $WSs -

  • Export in Excel- always first row blank

    hi,
    if i export in excel file always i am getting first row as blank with line. how can i eliminate this row.

    Hi Kayadhu,
    Generally, if we design a report and the top of report body remain extra blank space, it will result in the extra blank row after export the report to Excel. Please see the screenshot below:
    In your case, please try to reduce the blank space in the report body. If the issue still persists, please post more information about your report design structure to us.
    Regards,
    Bin Long
    Bin Long
    TechNet Community Support

  • Excel export contains a blank row for the Report Header

    Hi,
    I am getting a blank row as the first row in my SSRS report when exported to excel. I have already taken care of following things,
    1. I have hidden all of the Page Header items using Globals
    2. The position of Report Body Tablix is 0, that means there is no space between report header and Report Body.
    I have developed this Report in SSRS 2012, please let me know if any more details are required. I think even after hiding Header Items, excel creates a placeholder for page header. I can't remove header from my reports as it is needed to be published in
    pdf.
    Regards
    Mohit

    Hi Mohit,
    According to your description, you are getting a blank row as the first row in your excel report when you export the report to excel, you have hidden all the items in the Page Header by using the Globals, right?
    This blank row is for the page header, although you have hidden all the items in it, but it will still display when export report to excel. Because we can’t hidden the page Header directly. Normally, we can hidden all the items in the page Header, So in
    the design phase we can also see the blank area above the report body when preview.
    We have an alternative way by add the “SimplePageHeaders” setting in “RSReportserver.config” file, after configuration the page Header will not display in the first row of the worksheet but is rendered to the Excel page header. In Reporting Services, the
    “SimplePageHeaders” default value is “FALSE” and it indicates that the page header is rendered to the first row of the worksheet. In order to display the page header in the Header/Footer section of Excel, we need to set the “SimplePageHeaders” setting value
    to “TRUE”. I did a test on my local machine and here are my steps:
    Navigate to RSReportserver.config file: <drive:> Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\RSReportserver.config.
    Backup the RSReportserver.config file before modify it, open the RSReportserver.config file with Notepad format.
    Set the Excel rendering extension code like this:
    <Render>
    <Extension Name="EXCELOPENXML" Type="Microsoft.ReportingServices.Rendering.ExcelOpenXmlRenderer.ExcelOpenXmlRenderer,Microsoft.ReportingServices.ExcelRendering">
    <Configuration>
    <DeviceInfo>
    <SimplePageHeaders>TRUE</SimplePageHeaders>
    </DeviceInfo>
    </Configuration>
    </Extension>
    </Render>
      4.  Save the RSReportserver.config file.
    Note: Changing the rendering extension parameters only affects rendering operations on the Report Server.
    When I access to Report Manager and export the report(includes a page header) to Excel format, the blank row will disappear now.
    Similar thread for your reference:
    SimplePageHeader property in SSRS 2008 not working
    Removing 2 top blank rows when export to excel in ssrs 2008
    r2 report
    You can find more detail in these articles about the page header and page footer:
    Exporting to Microsoft Excel (Report Builder and SSRS)
    If you still have any question, please feel free to ask.
    Regards
    Vicky Liu

Maybe you are looking for