Error in RSS file when setting datasource in report

Hi,
I trying to prepare script to deploy my reports to reporting service 2008. Script is takes from
this question (Deploying Reports rss). Unfortunately code provided for data sources settings is not working in my case and I do not know why.
Sequence is following: removed reports path, re-craete it, create datasource and for each report following actions performed: deploy and set datasource.
After first report tried to set data source in itself scripts failed with error:
D:\_ST\FLASH>rs -i deploy.rss -s http://localhost/ReportServer_i2008
Parent folder Pipeline Reports created successfully.
Deploying report 'CRM Practice Report'
Report: CRM Practice Report published successfully.
Setting datasource to report 'CRM Practice Report'.
Error setting datasource to report 'CRM Practice Report'
ERROR while Publishing report: CRM Practice Report
Unhandled exception:
The data source 'Warehouse Datasource' cannot be found.
Here is the script I using to deploy datasource and reports:
Dim definition As [Byte]() = Nothing
Dim warnings As Warning() = Nothing
Dim destinationFolder As String = "Pipeline Reports"
Dim reportsTargetPath As String = "/" + destinationFolder
Dim reportsSourcePath As String = "D:\Depot\Internal\BDW\BDW_Phase4\Src\BDW_R4.17.2\Reports\BDW_Reports"
Dim datasourceName As String = "Warehouse Datasource"
Public Sub Main()
Try
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
If rs.GetItemType(reportsTargetPath) = ItemTypeEnum.Folder Then
rs.DeleteItem(reportsTargetPath)
End If
rs.CreateFolder(destinationFolder, "/", Nothing)
Console.WriteLine("Parent folder {0} created successfully.", destinationFolder)
CreateReportDataSource(datasourceName, "SQL", "Data Source=apopov\i2008;Initial Catalog=bdw")
PublishReport("CRM Practice Report")
PublishReport("CRM Report")
PublishReport("Pipeline Practice Report")
PublishReport("Pipeline Report")
Console.WriteLine("Tasks completed successfully.")
Catch ex As Exception
Throw ex
End Try
End Sub
Public Sub CreateReportDataSource(name As String, extension As String, connectionString As String)
Dim definition As New DataSourceDefinition()
definition.CredentialRetrieval = CredentialRetrievalEnum.Integrated
definition.ConnectString = connectionString
definition.Enabled = True
definition.Extension = extension
Try
rs.CreateDataSource(name, reportsTargetPath, False, definition, Nothing)
Catch e As Exception
Console.WriteLine("ERROR creating data source: " + name)
Throw e
End Try
End Sub
Public Sub PublishReport(ByVal reportName As String)
Try
Console.WriteLine("Deploying report '{0}'", reportName)
Dim stream As FileStream = File.OpenRead(reportsSourcePath + "\" + reportName + ".rdl")
definition = New [Byte](stream.Length-1) {}
stream.Read(definition, 0, CInt(stream.Length))
stream.Close()
rs.CreateReport(reportName, reportsTargetPath, False, definition, Nothing)
Console.WriteLine("Report: {0} published successfully.", reportName)
SetDatasource(reportName)
Catch e As Exception
Console.WriteLine("ERROR while Publishing report: " + reportName)
Throw e
End Try
End Sub
Public Sub SetDatasource(ByVal reportName As String)
Try
'Not working, I do not know why
Console.WriteLine("Setting datasource to report '{0}'.", reportName)
Dim reference As New DataSourceReference()
reference.Reference = reportsTargetPath + "/" + datasourceName
Dim source As New DataSource()
source.Item = reference
source.Name = datasourceName
Dim sources As DataSource() = New DataSource(0) {}
sources(0) = source
rs.SetItemDataSources(reportsTargetPath + "/" + reportName, sources)
Catch e As Exception
Console.WriteLine("Error setting datasource to report '{0}'", reportName)
Throw e
End Try
End Sub
I have not ideans why this error may occures.

Hi Alex,
I have test the script in my test environment, it works.
Based on the error message, the data source 'Warehouse Datasource' cannot be found. Please check, did you have add Warehouse Datasource.rds file in the same folder? In your case, it is located in: D:\Depot\Internal\BDW\BDW_Phase4\Src\BDW_R4.17.2\Reports\BDW_Reports
If the issue is persist, please feel free to ask.
Regards,
Alisa Tang
Alisa Tang
TechNet Community Support

Similar Messages

  • In your experience what are the most common errors in binding files when deploying?

    As the title suggest I'm interested in discussing the most common errors in binding files when deploying.
    Reason for this is that I'm currently working on a Powershell script that can parse a binding file and create a reader friendly report (rtf format) with various information.
    But the main purpose for this script is to find common errors in the binding file used. And so far these are the ones I've thought of:
    - Tracking enabled for either services or the pipelines they are using (if it's a binding meant for Prod).
    - Orchestrations logical ports not having any ports bound to them.
    - URI containing certain words that's not ok. For example if a binding meant for Prod contains the word "test" anywhere in the URI then that should be reported in the created rtf report. This also applies vice versa.
    So now I need your help with coming up with more ideas on common errors that need to be looked after and reported on if found! 
    Additional features the report should contain:
    - Listing the details of each orchestration, send port, receive port along with their associated receive location(s). To better understand and get a quick overview on exactly what settings are planned to be deployed. Especially the "TransportTypeData"
    section which otherwise can be quite tedious to read.
    - List each unique host instance, so that I can easier see directly which ones might need a restart after an import.
    I'd appreciate if you can come up with any more features that should be included in this script.
    /Christian @ IntegrationAdmin.com

    Filter on send port not on the same line as the Filter tag.
    This one is a nice one, I ran into it several times. Mostly after copy/paste of a port definition for a binding file, because Visual Studio is formatting after paste the XML in a way the filter will get invalid. This leads to a cryptic error
    during importing the binding.
    http://winterdom.com/2008/06/biztalkfiltersnotgettingimported
    Jean-Paul Smit | Didago IT Consultancy
    Blog |
    Twitter | LinkedIn
    MCTS BizTalk 2006/2010 + Certified SOA Architect
    Please indicate "Mark as Answer" if this post has answered the question.

  • " Errors have been discovered when checking the Expense Report"

    Hi all,
    I am getting this following error while trying to review the New Travel request
    Error : " Trip cannot be saved in this status "
    "Errors have been discovered when checking the Expense Report. Please correct them in order to proceed"
    I am unable to save the travel request and I am stuck here.
    Can someone provide me with a solution to this.
    (We are using EP7, ESS 1.0 , EA-HR - 600,SP17 )
    Thanks in advance,
    NR

    Hi all,
    When i checked in the default trace file ... a statement " No end date for validity of trip schema PL defined in customizing. Infinite validity is assumed.# " is present ..
    can some tell me what needs to changed in the SPRO settings ...

  • \\Error Reading Rules File when dimbuild with DLR

    Hi
    I am using Essbase 11.1.2.1.
    I create a DLR via the web console EAS (11.1.2.1 too) : a very simple one : dimbuild DLR, ";" as separator, 2 fields (parent and child)
    when i try do do a "Update Ouline..." with a very simple file (1 line : accounts;test) I have this error message "\\Error Reading Rules File"
    I don't know if it can help but if I create the same DLR on another 7.1 essbase serveur through this same wec eas console (11.1.2.1), I have no problem...
    another information, too : my 11.1.2.1 server has a //ESS_LOCALE English_UnitedStates.Latin1@Binary ESSLANG. My 7.1 server has a //ESS_LOCALE French_France.ISO-8859-15@Default ESSLANG. I really don't know if there is a link, or absolutely not.
    Thanks in advance for your help!
    Fanny

    unable to load essmsh.exe : the error message seems to indicate that it is a problem with a path in the environment variables.
    So if you say that the "Error Reading Rules File" is typically a path issue, all is probably linked!
    The admin will probably correct that tomorrow : I let you know if it solves the problem!
    Thanks!
    Fanny

  • "Error writing to file" when installing Oracle9i

    I am fairly new to Oracle and have not been able to install Oracle 9i on my Redhat 7.2 box. In three attempts to install I have encountered the same error at some point, usually early on 5% or 10% into the install.
    The error is:
         "Error in writing to file /usr/oracle/product/9.2.0/olap/wrksht/wks.jar"
    However, it has not happened on the same file each time. I have stopped the installation of that component, but it encounters the same error on other files. I have tried redownloading the oracle disks and reinstalling, but to no avail. I read on one posting that Oracle needs to have glib2.2(rather than glib1.2) installed, so I downloaded it and will be trying that later today. If anyone has encountered this error and knows how to solve it I would appreciate the help. Below I have listed my computer configuration and I have attached the portion of the install log that identifies the error that takes place.
         Thanks
         Ed
         Here is my setup:
         Dual boot system running Redhat 7.2 and Win2k      server.
         Pentium III 400 MHZ
         256 MB of RAM
         30 GB Hard drive split in half-- 15GB for linux      15GB for windows.
         The mount points for linux are
         /          400 MB
         /boot      400 MB
         /home          1GB
         /tmp          600 MB
         /swap          600 MB
         /usr          12GB
         ORACLE_HOME is /usr/oracle/product/9.2.0
         all data files and software are under /usr/oracle
         Portion of the install log:
    Starting install install phase 1 of component Oracle OLAP Worksheet
    Calling query areasQueries2.2.0.7.0 getProductHome
    name = oracle.swd.jre
    startVersion = 1.1.8.0.0
    endVersion = 1.1.8.99.99
    acceptCompatible = null
    Query returned : /usr/oracle/jre/1.1.8
    Setting value of JDK_ROOT to /usr/oracle/jre/1.1.8
    Calling action fileActions2.2.0.10.0 copyGroupFromJar
         selectedNodes = null
         copyGroup = worksheet
         permissions = 644
         owner = null
         group = null
         copyAsText = null
         JarLoc = /tmp/OraInstall2003-01-23_03-02-09PM/temp57
         gpEntries = [[xsjwork.jar ->%ORACLE_HOME%/olap/wrksht/xsjwork.jar 1803268 plats=1=>
    Exception thrown from action: copyGroupFromJar
    Exception Name: IOException2
    Exception String: Error in writing to file /usr/oracle/product/9.2.0/olap/wrksht/wks.jar
    Exception Severity: 2
    *** Cancel Dialog:  ***
    User selected: Stop installation of all products.
    Exception handling set to prompt user with options to  RETRY  IGNORE
    User choice : User selected stop installation of all components
    Error in writing to file /usr/oracle/product/9.2.0/olap/wrksht/wks.jar
    Unable to read the list of homes from the inventory.
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi,
    Did you guys finally find solution to the problem?
    I have been trying to install Oracle 9.2.0.1 on redhat 8.0 box, for ages now. I get the following error first during install
    Error in writing to file libclntsh.so.9.0
    Then it is a series of errors, similar.
    In the end there is the dreaded linking error... for the ins_rdbms.mk sdo_on
    i just cant handle it.
    What the hell is wrong?
    I have done everything right as far as i know... any solutions?
    cheers

  • IMovie error - cannot create file when I attempt to share

    I am using MAC OS X 10.9.5, iMovie 10.0.5.  I have successfully create many movies by using Share to file - of long and short sizes. This particular time I made couple of minor edits to my movie which had previous shared to file with no problem, and when I went to Share to File I get an error message. The Share fails with the error "cannot create file".
    I have plenty of disk space.
    All other applications are closed, just imovie running.
    The destination is the mac internal hard drive.
    I deleted imovie and re-installed it.
    I deleted the Render Files.
    No luck.
    Any clues would be greatly appreciated.
    Super frustrated.
    Thanks.

    docjob2001 wrote:>
    Is there a way to go back download 9.02 again?
    you can download it from here: http://www.versiontracker.com/dyn/moreinfo/macosx/10057115&vid=11116557&mode=inf o
    My only backup is version 8.2 and will not open my itunes library - is there a workaround for this?
    maybe. you could try this:
    to downgrade to a previous iTunes version, you could try this user tip that seemed to have worked for some:
    +1) Quit iTunes.+
    +2) Delete iTunes from your Applications folder.+
    +3) Go to your ~/Music/iTunes folder. Delete or rename the "iTunes Library" file.+
    +4) Open the "Previous iTunes Libraries" folder and look for the backup of your old pre-9 library; it should be dated at about the time you first ran iTunes 9. Copy it back out to the ~/Music/iTunes folder, and rename it to "iTunes Library".+
    +6) click here to download iTunes 8.2.1. The page says it's for G3, but the Read Me file says it'll run on G4, G5, and Intel too. Open the disk image and run the installer.+
    +You should now be able to run iTunes 8.2.1 again.+
    +And your iTunes will restore to before you upgraded and you won't lose anything+.
    good luck !

  • [XI 3.1] Import Wizard Error 21: RSS file does not exist

    Hi,
    I would like to migrate from 6.5 to 3.1. I would like trasfer universe and reports with Import Wizard. But I receive this error:
    ERR21:Execute request to Cnx Server failed : RSS file does not exist : D:\Programmi\Business Objects\BusinessObjects Enterprise 12.0\win32_x86\dataAccess\connectionServer
    oledb\extensions\migration\sqlsrv2000.rss
    And this is from logs file:
    2008/11/21 11:11:28.663|>>|E| | 2792|3300| |||||||||||||||No localization information available
    2008/11/21 11:11:31.633|>>|E| | 2792|3300| |||||||||||||||Execute request to Cnx Server failed : RSS file does not exist : D:\Programmi\Business Objects\BusinessObjects Enterprise 12.0\win32_x86\dataAccess\connectionServer
    oledb\extensions\migration\sqlsrv2000.rss
    d:\Mira_RTM\src\Tools\export\iface\astools/I18nClassicCharset.h:59:class ucs2string &__thiscall ASTools::I18n::CharsetConverter<struct ASTools::I18n::DefaultLocaleFactory>::operator ()(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,class ucs2string &) const: TraceLog
    So I can' t see my universes and *.rep files.
    What I can do?
    Thanks

    Hello
    The following solution may work for u.
    You may receive the above error message if BusinessObjects Enterprise tries to access  database after the associated RSS file has been deleted or corrupted.You need to replace the deleted or corrupted RSS file with a clean copy of the file, either from another BusinessObjects Enterprise installation
    Regards
    mahesh

  • Import error on XMP files when bringing in image sequences to AE cs6

    Hey everyone,
    I'm having difficulty getting AE 6 to import my still image timelapse sequences.  It throws an error called-unsupported file type extension.  I did not have this problem with cs 5.5.
    My workflow goes as follows. 
    -bring RAW stills into bridge and batch edit them in camera raw. 
    -move stills to LR timelapse and de-flicker them
    -import still sequence into after effects.
    The xmp files should change as I edit them in camera raw and in LR timelapse but they will not import into AE cs6. 
    Any help would be greatly appreciated,
    Thanks for your time. 

    They are still pictures that were shot in RAW on a still camera.  It calls them cr2 files in windows explorer.  They are raw image files brought into bridge and when edited in camera raw-the metadata is saved to an xmp file that accompanies each image.  Then you bring the images into LR timelapse and it just adjusts the xmp(metadata) files to deflicker them.  Much in the same way that camera raw works.  You do not have to export the still at all because all of these changes are saved in the metadata.  Then you drop the still sequence into AE and export it as video.  It just wont let me export them into cs6 with these xmp files. 
    The raw files are called cr2 files and without the xmp file-they will import into AE.  I tried importing some other camera raw files (NEF files) into AE with the xmp's and it worked.  For some reason it does not like these RAW cr2 files with the xmp metadata. 
    Thanks for your time and help, 

  • Error writing to file when installing iTunes 10.

    When I updated to iTunes 10 yesterday, it updated fine, but when I went to run it today, it had to configure. It was almost completed when I got the error "Error writing to file: C\Program Files\iTunes\iTunes.Resources\ru.lproj\IPod touch License.rtf". I tried to access the file, but it says the file cannot be found.
    I uninstalled iTunes, and went to re-install it, but at about the same time I get the exact same error.

    Hi,
    Did you guys finally find solution to the problem?
    I have been trying to install Oracle 9.2.0.1 on redhat 8.0 box, for ages now. I get the following error first during install
    Error in writing to file libclntsh.so.9.0
    Then it is a series of errors, similar.
    In the end there is the dreaded linking error... for the ins_rdbms.mk sdo_on
    i just cant handle it.
    What the hell is wrong?
    I have done everything right as far as i know... any solutions?
    cheers

  • Got an error message in German when setting up iCloud

    Got the following message during setup of the iCloud control panel on my PC running Windows 7:  Der automatische Refresh konnte nicht gestartet werden

    And now, with the new iCloud Control Panel 1.1, still an error, in English this time:
    Outlook Setup Error
    Your setup couldn't be started because of an unexpected error.
    I was able to click the Report button, here's the beginning of the text it emailed:
    Help Apple improve its products by sending us diagnostic and usage information about iCloud.
    By sending this message, you agree that Apple will collect and use this information as part of its support services and to improve its products and services. To learn more about Apple's Privacy Policy, see http://www.apple.com/legal/privacy.
    Your setup couldn't be started because of an unexpected error.
    Error: 0x80004005: CopyPSTFoldersToCache
    Error: 0x80004005: GetZ1Store
    Error: 0x80004005: HrGetOneProp on Z1Store failed
    AppleOutlookDAVConfig version: 3.2.16.0
    Windows version (6.1.7601): Windows 7 Ultimate Edition Service Pack 1 (build 7601), 64-bit
    Local app data directory test: Pass
    Temp directory test: Pass
    Outlook version: 14 (14.0.6109.5005), x64
    Outlook location (installed): C:\Program Files\Microsoft Office\Office14\OUTLOOK.EXE
    MAPI location: C:\Program Files\Common Files\SYSTEM\MSMAPI\1033\MSMAPI32.DLL
    MAPI logon succeeded
    Message Stores Table:
      Outlook Data File, 4E495441F9BFB80100AA0037D96E0000
      Outlook Data File, 4E495441F9BFB80100AA0037D96E0000
      Outlook Data File, 4E495441F9BFB80100AA0037D96E0000
      Outlook Data File, 4E495441F9BFB80100AA0037D96E0000
      Outlook Hotmail Connector Store Service, 975C4FC305EB4BBBB1992A7570EC7CF9
      Outlook Data File, 4E495441F9BFB80100AA0037D96E0000
      Outlook Data File, 4E495441F9BFB80100AA0037D96E0000
      Outlook Data File, 4E495441F9BFB80100AA0037D96E0000
    Contents of C:\Program Files\Common Files\SYSTEM\MSMAPI\1033\mapisvc.inf
    [Services]
    NOTES=Lotus Notes Mail
    MSN_CON=Microsoft Outlook Hotmail Connector
    APLZODSERVICE=iCloud
    [NOTES]
    PR_SERVICE_DLL_NAME=nwnsp.dll
    PR_SERVICE_SUPPORT_FILES=nwnsp.dll
    PR_SERVICE_DELETE_FILES=nwnsp.dll
    PR_SERVICE_ENTRY_NAME=ServiceEntry
    continued...

  • Error writing to file when updating Itunes Windows 7

    Error message: C\Program files (x86) Common Files\Apple\Mobile Device Support\AppleMobileDeviceHelper.resources\clientdescription.plist MAKE SURE YOU HAVE ACCESS TO THAT DIRECTORY.
    HELP!!!

    I don't know where to go from this point, but I threw caution to the wind and double-clicked iTunes Windows Installer Package. It went to work until I got another error message: "Error writing to file: C:\Config.Msi\1279ed.rbf.  Verify that you have access to that directory."
    Are you running Kaspersky security software on that PC? I tend to identify that message with Kaspersky interfering with the install.
    If there is Kaspersky on board, we should try some general-principles getting-past-security-software-interference troubleshooting.
    Download and save a fresh copy of the iTunesSetup.exe (32-bit installer file) or iTunes64Setup.exe (64-bit installer file) to your Hard drive. (Don't run the install on line, and don't start the install just yet.)
    http://www.apple.com/itunes/download/
    Restart the PC. After the PC restarts do not open any applications. Disconnect from your network and/or the internet. Now switch off all your security software (firewall, antivirus, antispyware).
    Now start the install by doubleclicking the iTunesSetup.exe (or iTunes64Setup.exe) file you downloaded earlier.
    Reenable all security software prior to reconnecting to your network and/or the internet.
    Any better luck with the security software shut down?

  • Error "Multi-level error propagation carried out" when I run a report

    Hi All,
    When I run the report /SAPAPO/CDPS_REPT - Order and Resource Reporting with the below criteria I getting error "Multi-level error propagation carried out"
    Planning Version - Simulation Version XXX
    Evaluation Start - 05/03/2011
    Evaluation End - 12/31/2013
    Evaluation List - Extended Operation List
    I do not get error when I run the report with selection as Active version 000 and Evaluation List as Order List, Operation List.
    I have tried by ruuning Live cache consistancy check, but the issue is not fixed
    Please help me to resolve this issue
    Thanks & Regards,
    Rajkumar

    Hi Jack,
    Please do post the server log file here so that we can try and find a solution for the problem you are facing.
    I had a problem a while ago with the app server too. While trying to run an application, after a few times, it would give me an error message saying the Application Server cannot be started. I rebooted my machine and thankfully it worked again. Just try this too and see if it works.
    If it doesnt we can go through the server log and try to identify the cause of the problem.
    Cheers :-)

  • How to create a file when i run the report

    hi all
    i want to run the report and each time i run the same report to create a separate word file for the report o/p ?
    is there exist a procedure to create a fiel?

    hi magoo thanks for your consederation
    i use forms 10g
    But your answer is to create the file , but when i run the report next time the file overided by the new file ,
    But i want to generate a new file beside the old created file (how can i create separate file althouth the file name take the same name of the report)
    thanks.

  • Error in setting datasource - Crystal reports

    Good day,
    I am currently experiencing a problem with setting my datasource to a report in Crystal Reports.
    Strangely, the report works in VS 2010, but when running as an executable, the program fails when assigning the datasource.
    My code:
        Public Sub PurchasesByVendor()
            Try
                Dim sql As String = "SELECT tblVendors.VendorID, tblVendors.VendorName, tblPO.POID, tblPO.EnterDate, tblCustomers.Company, tblOrders.RefNum, Sum(tblPOItems.ExtPrice) AS SumOfExtPrice " & _
                                    "FROM (((tblPO INNER JOIN tblPOItems ON tblPO.POID = tblPOItems.POID) INNER JOIN tblVendors ON tblPO.VendorID = tblVendors.VendorID) LEFT JOIN tblOrders ON tblPO.OrderID = tblOrders.OrderID) LEFT JOIN tblCustomers ON tblOrders.CustomerID = tblCustomers.CustomerID " & _
                                    "WHERE (((tblPO.EnterDate) Between #" & dpStart.Text & "# And #" & dpFinish.Text & "#)) " & _
                                    "GROUP BY tblVendors.VendorID, tblVendors.VendorName, tblPO.POID, tblPO.EnterDate, tblCustomers.Company, tblOrders.RefNum; "
                Dim con As New OleDb.OleDbConnection
                Dim da As OleDb.OleDbDataAdapter
                Dim ds As New DataSet
                con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = C:\Program Files\Mail-Shop\MSApp2k.mdb"
                con.Open()
                da = New OleDb.OleDbDataAdapter(sql, con)
                da.Fill(ds, "PO")
                Dim povList As List(Of POV) = New List(Of POV)
                If ds.Tables("PO").Rows.Count > 0 Then
                    For i = 0 To ds.Tables("PO").Rows.Count - 1
                        Dim pov As POV = New POV()
                        pov.VendorName = ds.Tables("PO").Rows(i).Item(1)
                        pov.PONumber = ds.Tables("PO").Rows(i).Item(2)
                        pov.PODate = ds.Tables("PO").Rows(i).Item(3)
                        If IsDBNull(ds.Tables("PO").Rows(i).Item(4)) = False Then
                            pov.Company = ds.Tables("PO").Rows(i).Item(4)
                        End If
                        If IsDBNull(ds.Tables("PO").Rows(i).Item(5)) = False Then
                            pov.Order = ds.Tables("PO").Rows(i).Item(5)
                        End If
                        pov.Total = ds.Tables("PO").Rows(i).Item(6)
                        povList.Add(pov)
                    Next
                End If
                'MsgBox(povList.Count)
                Dim datas As POVD = New POVD()
                Dim dt As New DataTable("povd")
                'Dim dt As DataTable = datas.Tables.Add("hc")
                dt.Columns.Add("Vendor", GetType(String))
                dt.Columns.Add("PONumber", GetType(Integer))
                dt.Columns.Add("PODate", GetType(Date))
                dt.Columns.Add("Company", GetType(String))
                dt.Columns.Add("OrderNbr", GetType(Integer))
                dt.Columns.Add("Total", GetType(Double))
                dt.Columns.Add("Charged", GetType(Double))
                datas.Tables.Add(dt)
                For Each dr In povList
                    Dim vendor = dr.VendorName
                    Dim ponbr = dr.PONumber
                    Dim poDate As Date = DateValue(DateTime.Parse(dr.PODate))
                    Dim company = dr.Company
                    Dim order = dr.Order
                    Dim total = dr.Total
                    Dim charged = dr.getCharged(dr.PONumber)
                    Dim nw As DataRow = datas.Tables(0).NewRow()
                    nw(0) = vendor
                    nw(1) = ponbr
                    nw(2) = poDate
                    nw(3) = company
                    nw(4) = order
                    nw(5) = total
                    nw(6) = charged
                    datas.Tables(0).Rows.Add(nw)
                Next
                '' bind the datasource+
                Dim objRpt As New PurchaseByVendor
                objRpt.SetDataSource(datas.Tables(0))
                Dim wfp As New WindowFormReport()
                wfp.CrystalReportsViewer1.ViewerCore.ReportSource = objRpt
                Me.NavigationService.Navigate(wfp)
                con.Close()
                con.Dispose()
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Sub
    Thanks!

    What version fo CR you are using, what service pack?
    What CR components are installed on the client machine for deployment?
    When using datasets to pass the data to Crystal reports, the issue occurs due to datasets in 50% of cases.
    What exact error do you get?
    Could you try below steps which would tell you if its an issue with Crystal or with getting data into datasets.
    - Once the data is populated in the dataset and before doing a "objRpt.SetDataSource(datas.Tables(0))", write the data to a datagrid.
    - While deploying the EXE, you could observe the datagrid to check fi the datasets do return some data.
    This may not be a Crystal issue.
    if you get the data in the datagrid and not in the report then do a 'ds.writeXml("XMLfilepath.xml")'. this will generate the XML file with the data from the dataset. the open the report indeaigner and try to assign the XMl to the report and see if the report works in thed esigner.
    - Bhushan
    Senior Engineer
    SAP Active Global Support
    Follow us on Twitter
    Got Enhancement ideas? Try the SAP Idea Place
    Getting started and moving ahead with Crystal Reports .NET applications.

  • Error reading Remote file when the connection is slow

    I have a program that reads a file from a remote server. The file is an xml file.
    This uses URL inputstream.
    This works just fine but when the xml that it reads grow in size, the content of the file is not completely sent to the variable string.
    I have come to a conclusion that slow connection to the server could somehow cause this. The error is intermittent. Sometimes it works, sometimes it doesn't.
    I hope you guys could help me tune this code or if you have suggestions like other ways to read a remote file. Which will work even if the file grows bigger.
    Thanks
    public String readRemoteFile(String fName)
    try
    boolean bolContinue = true;
    URL tUrl = new URL(fName); //create a URL object with the server source file
    //Logger.log("Getting filesize : " + fName);
    InputStream is = tUrl.openStream();
    String strFileSize = "";
    StringBuffer sbXML = new StringBuffer();
    byte[] b1 = new byte[10];
                   int intBytesToDownload = 0;
    int i = is.read(b1);
    strFileSize = new String(b1, 0, i);
    //Logger.log(fName + " --- " + strFileSize);
    try
    intBytesToDownload = Integer.parseInt(strFileSize);
    catch (NumberFormatException nfe)
    Logger.log("Could not read the file : " + fName);
    return null;
    int bytesReadInTrip = intBytesToDownload;
    int bXMLLocation = 0;
    while (bytesReadInTrip > 0)
    bytesReadInTrip = 0;
    bolContinue = true;
    //System.out.println(strFileURLPath);
    tUrl = new URL(fName + "&fileOffset=" + bXMLLocation);
    //Logger.log("reading file1 : " + fName + "&fileOffset=" + bXMLLocation);
    is = tUrl.openStream(); //get Input stream of the server file.
    //continue download till continuation flag is set i.e. input stream
    // is available.
    while (bolContinue)
              byte[] bXML = new byte[intBytesToDownload];
    i = is.read(bXML);
    //Logger.log("i " + i);
    if (i > 0)
    bXMLLocation += i;
    bytesReadInTrip += i;
    String strTmpXML = new String(bXML,0,i);
         sbXML.append(strTmpXML);
    else
    bolContinue = false;
    is.close(); //close the input stream of the input file.
    //Logger.log("bytesReadInTrip : " + bytesReadInTrip);
    //Logger.log("Read file : "+ sbXML.toString());
    return sbXML.toString();
    catch (Exception e)
    Logger.log("Exception while reading the file : " + fName);
    return null;
    }

    well looks that ur run() method is being called more then one time (..)
    why dont u try file method exists() before writing it to ensure that it is not written previously

Maybe you are looking for