Tuesday, March 27, 2012

AddParameter to SubReport ? <VbScript>

Hello,

Can i pass parameter to a subreport inside a report with addParameter ?
Like that:

Dim webSource0
Set webSource0 = CreateObject("WebReportSource.WebReportSource")
webSource0.ReportSource = webBroker
webSource0.URL = "http://localhost/product.rpt"
webSource0.PromptOnRefresh = True
webSource0.AddParameter "password0", "cria"
webSource0.AddParameter "user0", "sa"
webSource0.AddParameter "prompt0", "1"
webSource0.AddParameter "subreport.password0", "cria" ?
webSource0.AddParameter "subreport.user0", "sa" ?

when i try to view the report with crystal viewer, it prompts for the
database settings of the subreport !

i'm using cr8.5 with oledb connection and vbscriptsee thread http://www.dev-archive.com/forum/showthread.php?t=315611

I think you have the same problem, caused by not understanding that each subreport's query must establish its own permissions with the server.

Dave

No comments:

Post a Comment