New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsReportsReportsUsing EXECUTE in Reports Module QueryUsing EXECUTE in Reports Module Query
Previous
 
Next
New Post
9/20/2007 6:47 PM
 

Reports Module 4.5.2

I have a stored procedure I'm looking to call from a Reports Module query, then use the returned value in the remainder of the query:

DECLARE @myVar INT
EXECUTE @myVar = mySPROC_Get

SELECT ...

WHERE tblCol1 > @myVar

What I find is that EXECUTE runs and Reports Module renders only the value returned from the EXECUTE call; SELECT never executes.

Is there another way I should use EXECUTE in Reports Module?


If a problem can be solved, there's no use worrying about it.
If it can't be solved, worrying will do no good.
 
New Post
1/9/2008 5:47 AM
 

I think the best is to create one stored procedure which will execute all your statement in one EXEC command.

Then you will get the result of the SELECT which will be the result of this  new procedure.

I personnaly use stored procedure for all my queries in reports to have a unique maintenance point and be able to test before portal implementation.


Bruno Généré
 
New Post
1/10/2008 4:44 PM
 

The Reports Module only considers the first resultset returned by your query, in this case it appears that the EXECUTE is returning a resultset. I'm not a SQL guru, but making the whole thing one SPROC might help.


Andrew Nurse
DotNetNuke Core Team Member and Reports Module Project Lead
Microsoft Certified Professional Developer

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsReportsReportsUsing EXECUTE in Reports Module QueryUsing EXECUTE in Reports Module Query


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.