CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Visual Basic Programming > Crystal Reports
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old March 25th, 2004, 01:11 PM
    bshen bshen is offline
    Junior Member
     
    Join Date: Mar 2004
    Posts: 1
    bshen is an unknown quantity at this point (<10)
    exec statement in SP issue

    Hi guys,

    I am using Crystal report to export the report to an PDF file, but it's fail to get the right result. The issue I am wondering is I am using the Exec statement in my SP, my SP is like below:

    DECLARE @XMLDataFormat as nvarchar(4000)

    SELECT @XMLDataFormat = XMLDataFormat FROM tbDocs where DocID = @DocID

    DECLARE @s1 as varchar(8000)

    SET @s1 = '
    DECLARE @intDoc INT
    EXEC sp_xml_preparedocument @intDoc OUTPUT, '''+ REPLACE(@vstrXML, '''','''''') +'''
    SELECT ''' + @Title + ''' as Title, * FROM OPENXML(@intDoc , ''/data/form'') WITH ('+lower(@XMLDataFormat)+')
    EXEC sp_xml_removedocument @intDoc'

    --print @s1
    EXEC (@s1)

    When I using SQL Profiler trace the ReportDocuemnt.Export function, it called 6 SPs:

    exec [LandCanada_brokers]..sp_tables_rowset N'sprpt_GetXMLForm_RS;1', N'dbo', NULL
    exec [LandCanada_brokers]..sp_procedures_rowset N'sprpt_GetXMLForm_RS', 1, N'dbo'
    exec [LandCanada_brokers]..sp_procedure_params_rowset N'sprpt_GetXMLForm_RS', 1, N'dbo', NULL
    exec "LandCanada_brokers"."dbo"."sprpt_GetXMLForm_RS";1 0, 0
    exec [LandCanada_brokers]..sp_procedure_params_rowset N'sprpt_GetXMLForm_RS', 1, N'dbo', NULL
    exec [LandCanada_brokers]..sp_indexes_rowset N'sprpt_GetXMLForm_RS;1', NULL, N'dbo'

    Which I believe at the end, there is a call like:
    exec "LandCanada_brokers"."dbo"."sprpt_GetXMLForm_RS";1 1, 124
    is not fire, which means the SP can't take any param value in this case, so the result you can image.

    Any idea? Please give a hand.

    Thanks
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Visual Basic Programming > Crystal Reports


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 11:41 PM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009