May 5, 2008 at 11:07 am
I want to show (print) parameters on the print of the Reports, not on the Preview/Excel/Screen.
Example: User Selected From and To date for report. I am not showing From and To dates on the screen, but when I click on print and printing report then I want to print From and To date on paper.
Is it possible in SSRS without using .net?
May 6, 2008 at 6:24 am
Hi Deepti,
Well..nothing is IMPOSSIBLE...
But, in SSRS...When we choose any parameters..any kind of...it gets the report content according to that condition only...And unless and untill you place it on Report by any means...[Using textboxes..or on table itself..]...I think..it will not be displayed on paper....:)
..from my side, definitely I will try for this..
But..if you find any solution for the same...pls let me know...Ok...
Thanks,
Niraj
May 6, 2008 at 10:18 pm
May 7, 2008 at 12:38 am
Hi Deepti,
As recommended by JayKay that's what I do too.
Example:="Report Period: " & Format("dd-mm-yyyy",Parameters!StartDate.Value) & " to " & Format("dd/mm/yyyy",Parameters!EndDate.Value)
To show multivalue parameters can try something like this:
= Join(Parameters!Customer_Group.Value,", ") & " customers. Records Found: (" & CountRows().ToString & ")"
Regards,
Barkha.
May 7, 2008 at 1:59 am
Thanks to you all. But my client wants to show these parameters when they print the report not in preview. Because at the time of preview all the parameters are visible on the top, but when we print the report SSRS not prints the parameters.
I did the same, on the top header row I am showing all the parameters and report title, but now they don't want this row in preview. I have given option of text boxes also but they are not agreeing.
As per my understanding we can't change the visibility of the objects (Text Box or row) on the click of print option and we don’t have any setting/property for print option to print parameters or not
May 7, 2008 at 7:35 am
Hi Deepti,
what i have always done with parameters is to put them on the very last page of the report by themselves, after the report total. this way the client view the report on the screen without looking at the parameters, can print the entire report, which will show the parameters at the very end of the report, or print (if rendered to pdf) all pages and exclude the parameter page if they wish. i also always make it a practice to put on the bottom of each page "page # of total# (example page 1 of 10). this way if they print 9 pages of a report, and state that the data on the report is not what they selected, you can ask them to produce page 10 (the parameters page) and recheck their results.
hope this helps
eaa
May 9, 2008 at 12:11 am
Can also set Visibility option Hidden to False for row containing textbox that displays parameters, and then set property for ToggleItem. Will allow user to click a textbox to display parameters for printing.
Barkha.
May 13, 2008 at 9:44 am
i would write a function in the Code section of my report something like ShowMyParameters:
public Shared Function ShowMyParameters(byval productType as Parameter) as string
Dim s as String = ""
'got product?
if productType.label.tostring() <> "ALL" then
s = s + "Product: " productType.Label.Tostring() + vbNewLine
end if
return s
end function
then, i'd place the text box on my report and entered this: =Code.ShowMyParameters(Parameters!productType)
this will do it. of course, you can add as many as you wish into your function :-).
does it answer your question?
April 20, 2009 at 2:20 pm
Dude,
I changed the values to reflect what is in my report, but I keep getting an "End of Statement Expected" error.
April 21, 2009 at 9:41 am
I have had a similar question some month ago and I couldn’t find a real solution after working some days on it!
The problem is: when you want to print out a report this report is already rendered with or without the parameters you are speaking of. There is no way in the report designer to implement anything depending on the target of rendering (HTML, XLS, PDF, …).
I have now inserted an additional parameter . If this parameter is set to true I show the parameter, if it is set to false I hide them.
The user has to decide whether he want to see the parameters or not.
If someone has a better idea, I’m also interested in a real solution.
April 21, 2009 at 10:28 am
In SSRS 2008 I used the following.
=Join(Parameters!Gender.Value,", ")
June 24, 2009 at 11:48 am
barkha.javed (5/7/2008)
Hi Deepti,As recommended by JayKay that's what I do too.
Example:="Report Period: " & Format("dd-mm-yyyy",Parameters!StartDate.Value) & " to " & Format("dd/mm/yyyy",Parameters!EndDate.Value)
To show multivalue parameters can try something like this:
= Join(Parameters!Customer_Group.Value,", ") & " customers. Records Found: (" & CountRows().ToString & ")"
Regards,
Barkha.
Barkha, thank you! That's exactly what I needed. I've been struggling with custom code all morning (2 hours so far!) and this simple little "Join" statement is all I needed. I changed .Value to .Label and I'm off and running.
October 20, 2010 at 5:05 pm
You might want to use your own Join function that will work with muti-value and single value parameters.
Public Shared Function MyJoin(ByVal parameter as Parameter, ByVal Delimiter as String) as String
On Error Goto ProcError
Dim s as String
s = ""
If parameter.IsMultiValue then
For i as integer = 0 to parameter.Count-1
s = s + Delimiter + CStr(parameter.value(i))
Next
if s.length > 0
if left(s, 1) = Delimiter then
s = right(s,len(s) - 1)
End If
End If
Else
s = CStr(parameter.Value)
End If
Return s
ProcError:
Return err.description
End Function
March 16, 2011 at 11:19 am
The purpose of the preview is to see how the reports will be printed.
If the customer doesn't want to see some data on the preview, I would create a different way to preview the data (a data grid or something like that) and when the user click on the print button, it will create a SSRS report directly to the printer.
Viewing 14 posts - 1 through 13 (of 13 total)
You must be logged in to reply to this topic. Login to reply