I'm using SSRS 2008 and I have two reports (A and B). B has 4 parameters for which I have assigned a default value. Both reports work fine on its own
The problem is that I want to be able to call report B from report A and use the selected value to overwrite one of those parameters in report B.
So far what happens is that Report B appears when it's called from Report A but the parameter that should be overwritten remains blank and causes the data not to load at all, the. The other parameters show the default values but the 4th one remains blank.
I have tried:
taking off the default value and didn't work.
order: I also read a post here about the order of the parameters and I chose to leave the one that needs to be overwritten last in report B.
data types match among the parameter being overwritten and the value being sent from the parent report (string).
the omit parameter expression is set to false which enables the value to pass through to the drill-down report.
Any thoughts?
I've done this recently by setting a click action in a tablix control. Essentially, I went to the Text Box Properties I went to Action and then set the action as Go to URL. I've then put an expression in for the following (which you can modify to your needs depending on the destination report name and parameters):
=IIf(
Parameters!p_hide_links.Value="y",
Nothing,
"javascript: void( window.open('http://' + window.location.host + '/ReportServer/Pages/ReportViewer.aspx?/Property+Management/" & replace(Parameters!i_this_report.Value, " ", "+") &
"&p_from_date=" & Parameters!p_from_date.Value &
"&p_to_date=" & Parameters!p_to_date.Value &
"&p_lease_exec=" & Fields!submitted_by.Value &
"&p_building_state=" & Parameters!p_building_state.Value &
"&p_division_id=" & Parameters!p_division_id.Value &
"&p_building_id=" & Parameters!p_building_id.Value &
"&p_view_type=d" &
"') );"
)
Related
The intro for this little problem starts here:
Adding values to a Report when there is no Data in query SSRS
After that:
Adding values to a Report when there is no Data in query SSRS Between Datasets
Now a basic introduction of what Im trying to accomplish.
With this expression:
=IIF(IsNothing(Lookup(Trim(Fields!total_Cod_vendedor.Value) & "-" & ReportItems!G2.Value, Fields!AgregarMost.Value, Fields!most_atados.Value, "EfectividadDeFrecuencias_Most")) = True, "0", Lookup(Trim(Fields!total_Cod_vendedor.Value) & "-" & ReportItems!G2.Value, Fields!AgregarMost.Value, Fields!most_atados.Value, "EfectividadDeFrecuencias_Most"))
What I'm doing is check if the combination of a Somefield.Value-reportitemName.Value exists on the other Dataset where said content is saved in a calculated field inside that other Dataset. When the IsNothing is true, then put a "0" if not, "Dosomething" which in this case it doesn't matter.
So the idea was to put 0 each time it doesn't exist that combination for the Dataset Im right now.
Now, the idea is to do the same but when the other Dataset does not have values.
Imagine my tablix have "Dataset" where in a certain Textbox have that expression but at the same time it could be possible that "Dataset" does not have the values that "Dataset1" have. I can't Nest Lookups because I was trying to do the following:
=IIF(IsNothing(Lookup(Trim(Fields!total_Cod_vendedor.Value) & "-" & ReportItems!G1.Value, Fields!AgregarMost.Value, Fields!most_atados.Value, "EfectividadDeFrecuencias_Most")
AND IsNothing(Lookup(Lookup(Trim(Fields!total_Cod_vendedor.Value) & "-" & ReportItems!G1.Value, Fields!AgregarMost.Value, Fields!most_Cod_vendedor.Value, "EfectividadDeFrecuencias_Most") & "-" & ReportItems!G1.Value, Fields!Agregar.Value, Fields!total_atados.Value, "EfectividadDeFrecuencias_Total")
)) = True
, "0"
,Lookup(Trim(Fields!total_Cod_vendedor.Value) & "-" & ReportItems!G1.Value, Fields!AgregarMost.Value, Fields!most_atados.Value, "EfectividadDeFrecuencias_Most"))
So to give a more visual example, this was the original Case:
See how Dataset2 does not have the same values as Dataset1 so with this Expression it put 0s where is not Equal that combination (Sales Rep+Category).
Now the idea is to the same thing the other way around, when Dataset2 have data that Dataset1 does not have IN THE SAME expression (that means the same textbox where it resides the Tablix which at the same time have the Scope on Dataset).
How would you do this?
I'm working on a little project in Access using VBA. I created a report with some data from three different tables. In the Report_Open method I want to assign a query to the ControlSource of a TextBox.
Here is my code
Me.textImpactP.ControlSource = DLookup("[ImpactText]", "Root_cause_basic_reports", "[Report_id] =" & rid & " And [Root_cause_basic_id] =" & rootCauseId)
When I run this I keep getting the dialog "Enter Parameter Value".
The parameter "people" is the result of my DLookup and is supposed to be the value of my TextBox on my report.
Does anyone have an idea how to get the parameter "people" as a value in my TextBox?
Enter Parameter value does not represent, what you think it does. It normally pops up when you try to open a Report whose record Source is based on a Query which requests a parameter. Check the Query again.
I have a data entry form in an MS Access 2010 database which is bound to a table called CommunicationTable, which in turn contains a primary key CommunicationNumber, a foreign key ClientNumber, and a field called Level. When the user opens the form, the ClientNumber is automatically populated into a textbox called ClientNumber. I want the Level textbox to show a default value equal to the value that was recorded for Level in the most recent record (highest CommunicationNumber value) for the specified ClientNumber in CommunicationTable. How do I set this up?
Here is the code I am currently using in the Default Value expression builder for the Level textbox in the form's property sheet:
=DLookUp([Level],[CommunicationTable],[CommunicationNumber]=DMax([CommunicationNumber],[CommunicationTable],[ClientNumber]=[Me].[ClientNumber]))
This code is giving an empty value when I load the form with a valid ClientNumber. I thought this might be due to the DMax() function producing the current (blank) row about to be added to the CommunicationTable, but I get the same empty result when I use the following instead:
=DLookUp([Level],[CommunicationTable],[CommunicationNumber]=DMax([CommunicationNumber],[CommunicationTable],[ClientNumber]=[Me].[ClientNumber])-1 )
How can I change this expression so that it gives the most recent value of Level for the specified ClientNumber in CommunicationTable?
EDIT:
I tried the following, but it is giving a #type! error:
=DLookUp("[Level]","[CommunicationTable]","CommunicationNumber= " &
DMax("CommunicationNumber","[CommunicationTable]","[ClientNumber]=
" & [Forms]![Main]![NavigationSubform].[Form]![ClientNumber] & ""))
Note that the ClientNumber textbox in the form is itself populated using the expression:
[Forms]![Main]![NavigationSubform].[Form]![ClientNumber]
As I mentioned in my comment, you have to adjust your query a bit:
=DLookUp("[Level]","[CommunicationTable]","CommunicationNumber= " & DMax("CommunicationNumber","[CommunicationTable]"))
Update:
=DLookup("[Level]", "[CommunicationTable]", "CommunicationNumber= " & DMax("CommunicationNumber", "[CommunicationTable]", "[ClientNumber]= " & Me.ClientNumber.Value & ""))
I am developing a SSRS 2008 R2 RDL with a chart. Currently, I have a subreport built into this chart where if they click on a pie piece it goes directly to this subreport. It is currently configured as an action on the series via "Go to Report".
However, my customer wants it to instead open a new browser window so that they can still see original chart without having to rerun my report. Also, this subreport requires several input parameters. I tried the "Go to URL" Action link instead and entered the URL there. But this didn't work cause I couldn't pass in my input parameters. How can I do this?
This subreport takes multiple parameters. I have it configured as:
="javascript:void(window.open('http://evolvdb/Reports/Pages/Report.aspx?ItemPath=%2fIncoming%2fCensus_by_Date_Range2_Subreport&rs:Command=Render&startdate="+Parameters!startdate.Value+"&enddate="+Parameters!enddate.Value+"®ion="+Parameters!region.Value+"&state="+Parameters!state.Value+"&office="+Parameters!office.Value+"&status="+Parameters!status.Value+"&program_hyperlink="+Fields!program_code.Value+"&funding_source_param="+Parameters!funding_source.Value+"'))"
But when I try to click this subreport it is not clickable.
I also tried this, but this exceeds the 255 character count:
="javascript:void(window.open('http://evolvdb/Reports/Pages/Report.aspx?ItemPath=%2fIncoming%2fCensus_by_Date_Range2_Subreport&rs:Command=Render&startdate=" & Parameters!startdate.Value & "&enddate=" & Parameters!enddate.Value & "®ion=" & Parameters!region.Value & "&state=" & Parameters!state.Value & "&office=" & Parameters!office.Value & "&status=" & Parameters!status.Value & "&program_hyperlink=" & Fields!program_code.Value & "&funding_source_param=" & Parameters!funding_source.Value & "'))"
I also tried this, but this was not clickable either:
="javascript:void(window.open('http://evolvdb/Reports/Pages/Report.aspx?ItemPath=%2fIncoming%2fCensus_by_Date_Range2_Subreport&rs:Command=Render
&startdate="+Parameters!startdate.Value+"
&enddate="+Parameters!enddate.Value+"
®ion="+Parameters!region.Value+"
&state="+Parameters!state.Value+"
&office="+Parameters!office.Value+"
&status="+Parameters!status.Value+"
&program_hyperlink="+Fields!program_code.Value+"
&funding_source_param="+Parameters!funding_source.Value+"'))"
I'm looking at the last code snippet that you tried and here is my feedback:
The report path doesn't look correct. Should be in the format http://evolvdb/ReportServer/Path/To/Report&Parameters=XX
You can't concatenate strings in SSRS with + and need to use & instead.
Example:
="javascript:void(window.open('http://evolvdb/ReportServer/Incoming%2fCensus_by_Date_Range2_Subreport&rs:Command=Render
&startdate=" & Parameters!startdate.Value & "
&enddate=" & Parameters!enddate.Value & "
®ion=" & Parameters!region.Value & "
&state=" & Parameters!state.Value & "
&office=" & Parameters!office.Value & "
&status=" & Parameters!status.Value & "
&program_hyperlink=" & Fields!program_code.Value & "
&funding_source_param=" & Parameters!funding_source.Value & "'))"
My general advice for creating SSRS links is to take your browser and start there with zero programming. Ensure that your report path is correct, then manually add a parameter and ensure the report accepts the parameter value correctly. Once you have a working URL example, create a textbox in your report that spits out the URL string you are trying create. This is an easy way to ensure you are getting the expected output and you can compare to the URL that you manually crafted in the first step. Lastly, put the finished expression into the "Go to URL" action and you should most likely have a link that works as expected.
I m using sql 2008. I have one matrix on the report. Data will be as follow
Maths English Science
Gender 5 3 4
Male 1 2 2
Female 4 1 2
Count shows the number of students passed in respective subjects.Data is grouped by gender When user click on count it will be redirect to sub report. Now i want to pass Students Ids to sub report to show that students only. I have tried Join, Split but those functions can be used with parameters only. Not with Fields. Basically i want to pass string of comma separated students ids to sub report.
I have searched on Google but not finding any solution. So awaiting for solution.
I've done this recently by setting a click action in a tablix control. Essentially, I went to the Text Box Properties I went to Action and then set the action as Go to URL. I've then put an expression in for the following (which you can modify to your needs depending on the destination report name and parameters):
=IIf(
Parameters!p_hide_links.Value="y",
Nothing,
"javascript: void( window.open('http://' + window.location.host + '/ReportServer/Pages/ReportViewer.aspx?/Property+Management/" & replace(Parameters!i_this_report.Value, " ", "+") &
"&p_from_date=" & Parameters!p_from_date.Value &
"&p_to_date=" & Parameters!p_to_date.Value &
"&p_lease_exec=" & Fields!submitted_by.Value &
"&p_building_state=" & Parameters!p_building_state.Value &
"&p_division_id=" & Parameters!p_division_id.Value &
"&p_building_id=" & Parameters!p_building_id.Value &
"&p_view_type=d" &
"') );"
)
This might be the answer you are looking for:
Right Click on any text box select TextBox Properties and do as in below jpg.
Now select the detail report from the drop down [create new if its not there]
pass the parameters whichever you wanted to and this will be like input parameter to this sub report and using any details dataset you can show on the report view.
Let me know if you face any problems in that.