Regarding the CrystalReport with asp.net

Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Thread Solved
Reply

Join Date: Sep 2007
Posts: 10
Reputation: vimalfor5 is an unknown quantity at this point 
Solved Threads: 1
vimalfor5 vimalfor5 is offline Offline
Newbie Poster

Regarding the CrystalReport with asp.net

 
0
  #1
Jan 10th, 2009
Hi all,

i want to create one crystalreport from following storeprocedure

  1. CREATE PROCEDURE dbo.usp_proc1
  2. (
  3. @ID as INT
  4. )
  5.  
  6. as
  7.  
  8. DECLARE @Var1 as VARCHAR(1000);
  9. SET @Var1 = ' select ID,Name,Email from Demo where ID='+Convert(VARCHAR,@ID)
  10.  
  11. print @Var1;
  12. exec(@Var1);

This is not the actual code but its a demo of original, i'm using this type of code because i want to join two or more databases with supplied database name like

@dbName+"Connection"

where @dbName is the supplied argument


the problem is when i choose this procedure as the database field for the crystal report the select fields (table columns of the query ) are not displaying

i also tried

  1. CREATE PROCEDURE dbo.usp_proc1
  2. (
  3. @ID as INT
  4. )
  5.  
  6. as
  7.  
  8. DECLARE @Var1 as VARCHAR(1000);
  9. SET @Var1 = ' select ID,Name,Email from Demo where ID='+Convert(VARCHAR,@ID)
  10.  
  11. print @Var1;
  12. exec(@Var1);
  13.  
  14. /* select '' as ID,'' as Name,'' as Email */

still it is not working

i dnt want to create a separate dataset or i dnt want to change the logic of the entire.. !!!
any other suggestions are always welcome
Thanks
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC