Is it possible in grails to render view into string in controller?

I found the similar question ([How can I render a GSP as a String?](https://stackoverflow.com/questions/14218133/how-can-i-render-a-gsp-as-a-string)) and the suggestion is **"grails.gsp.PageRenderer"**. 

So, I try it in controller 

```
import grails.gsp.PageRenderer

def getSomething(){
    PageRenderer groovyPageRenderer
    def x = groovyPageRenderer.render((view: 'report', model : [foo : 'bar'])
}

```

It told me "**Cannot invoke method render() on null object**"