Skip to main content
Solved

How to use Parametrized SQL view in report designer?

  • November 24, 2024
  • 2 replies
  • 56 views

For complex report , I am creating CTE based sql view. In my view script there are multiple CTE. I want to filter every CTE with report input parameter so that less data get read by every CTE and  report performance gets improve.

To achieve this I would like to follow the same steps to create sql view with parameter. 

https://stackoverflow.com/questions/2281890/can-i-create-view-with-parameter-in-mysql

but I am confused as how to pass that parameter in DAC @p1 value so that the same parameter get reads by every cte.

 

Best answer by justen0351

Meghalad,

I am the one that posted the question that Darylbowan put a link to. The way I did it, was to add what i wanted to use as a “parameter” to every row. to do that, i added it to the sql  anchor, recursive, and select statement of the CTE. Then, when i pulled it into a GI, I used this Field as the parameter. Screenshots below.  Hope this helps you.

 

View original
Did this topic help you find an answer to your question?

2 replies

darylbowman
Captain II
Forum|alt.badge.img+13

This seems similar to this question


Forum|alt.badge.img
  • Jr Varsity II
  • 14 replies
  • Answer
  • December 6, 2024

Meghalad,

I am the one that posted the question that Darylbowan put a link to. The way I did it, was to add what i wanted to use as a “parameter” to every row. to do that, i added it to the sql  anchor, recursive, and select statement of the CTE. Then, when i pulled it into a GI, I used this Field as the parameter. Screenshots below.  Hope this helps you.

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings