Skip to Content
0
Former Member
Jun 18, 2009 at 08:39 AM

using stored procedures instead of views as the report data source

23 Views

Hi,

I'm developing a c#.net application that uses RAS SDK to run reports.

Up untill now I based all my reports on views, and currently I'm exploring the option of basing my reports on stored procedures.

I created a sample report based on a stored procedure and was able to run it successfully with CR designer.

When I try to run this report using my application, I get a COM Exception: "Missing parameter values".

I assume that the missing parameter is the SP parameter...

I have 2 questions:

1. While creating the report a report parameter was created for the stored procedure parameter.

I update this report parameter in my code. Do i need to update the SP-parameter as well? if so, how?

2. Currently I update my tables' DB location at run time using:

foreach(Table table in crystalReport.Database.Tables)
{
    if (isNTAuthentication)
    {				
         crystalReport.DatabaseController.SetTableLocation(table, GetNewCrystalTable(table));
    }
    else \\SQL-authentication
   {		
          crystalReport.DatabaseController.SetTableLocationByServerDatabaseName
          (table.Alias,serverInfo.serverName,"",serverInfo.userName,serverInfo.pwd);	
   }					
}

should I use the same SDK for stored procedures?? if not, which method should i use?

I looked for documentation regarding this and couldnt find anything about stored procedures except

replaceConnection method but i didn't understand how to use it correctly...

Thank you,

Dana