we have multiple subreports that hit the database thru
asp and coldfusion,our parameter known as a datapoint is different and hard coded for each sub, is there anyway around this??? [sig][/sig]
Can you write more details about your problem? It is not clear from your question! [sig]<p>Ossama Gharib<br><a href=mailtogharib@link.com.eg>ogharib@link.com.eg</a><br><a href=
We have a container report with multiple subreports inside. There are 10 parameters that we need passed into the container. The datapoint is the parameter that is used to plot each of the charts. The datapoint is hardcoded into each of the charts. We are having a problem passing those 10 in. We need the asp code that will allow us to pass those 10 into a stored procedure and distributed down through each of the subs. The charts done in CR8 are all down correctly, all we need is the code....
Here is the ASP code that lets you pass parameters to you report:
Set Session("ParamCollection" = Session("oRpt".Parameterfields
Set Param1 = Session("ParamCollection".Item(1) Call Param1.SetCurrentValue (CStr(FromDate), 12) Set Param2 = Session("ParamCollection".Item(2) Call Param4.SetCurrentValue (CDbl(StoreId), 7)
NOTE: The first parameter to the report is Session("ParamCollection".Item(1). For SetCurrentValue, to pass a parameter of type String (in SCR)), use CStr() to cast your string and use the second parameter as 12. For a parameter of type Number (in SCR), use CDbl() to cast your number and use the second parameter as 7. [sig]<p>Ossama Gharib<br><a href=mailtogharib@link.com.eg>ogharib@link.com.eg</a><br><a href=
Ok here is what i have for my sub report... it works 100% correctly but the thing is that when we made the subreport we made the report, in Report Designer, with a datapoint_id (which is Param(9)) with a default vale of lets say "88" how do i grab the default value from the subreport??
i looked throught the help files and the closest thing i could find was:
'response.write subparams.item(9).getnthcurrentvalue
or
'response.write subparams.item(9).value
And this "should" grab the default value of item(9).
'==================================================================
' WORKING WITH SETLOGONINFO (SUBREPORT) #1
'==================================================================
'open the subreport
Set CRSubreports = session("oRpt".OpenSubreport("rpt_nt_proc_pct_proc_tm.rpt"
' The Sample subreport in this example has 3 tables, each table must be
' logged onto using the SetLogOnInfo method.
'Set Subreport logon parameters for each table in the report.
set crtablesub = CRSubreports.Database.Tables.Item(1)
crtablesub.SetLogonInfo "yakko", "edba", "sa", ""
set subparams= crsubreports.parameterfields
response.write crtablesub.testconnectivity
Set ThisParam = subparams.item(1)
Set ThisParam2 = subparams.item(2)
Set ThisParam3 = subparams.item(3)
Set ThisParam4 = subparams.item(4)
Set ThisParam5 = subparams.item(5)
Set ThisParam6 = subparams.item(6)
Set ThisParam7 = subparams.item(7)
Set ThisParam8 = subparams.item(8)
Set ThisParam9 = subparams.item(9)
Set ThisParam10 = subparams.item(10)
Set ThisParam11 = subparams.item(11)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.