Displaying multi valued number parameters on a report.
I need to display the contents of some muti valued parameters on my report. I have received two suggestions neither of which I can get to work.
The first suggestion uses the Join function as follows:
WhilePrintingRecords;
Join({?Parameter}, Chr(10));
This only seems to work with string arrays. I can't seem to get it to work with number arrays.
The second suggestion is as follows.
WhilePrintingRecords;
Shared numberVar counter;
//increments the loop so that all parameter entries can be displayed
Shared stringVar display;
//creates a string "running total" so that all entries can be displayed
for counter := 1 to Count({?Parameter}) do
display := display + ToText({?Parameter}[counter],0,"") + Chr(10);
display;
Even though the Parameter is a multi valued number parameter it gives the following error when converting it to Text:
"A number, currency amount, boolean, date, time, date-time, or string is required here."
The formula for multi-value numeric parameter works just fine.
WhilePrintingRecords;
Shared numberVar counter;
//increments the loop so that all parameter entries can be displayed
Shared stringVar display;
//creates a string "running total" so that all entries can be displayed
for counter := 1 to Count({?Parameter}) do
display := display + ToText({?Parameter}[counter],0,"") + Chr(10);
display;
Please double check the "options" area of the multi-value numeric parameter. The only way I can replicate the error you receive is if I choose both "Multiple Values = True" and "Range Values = True". If this is the case then set Range values to false and see if it works while leaving Multiple Values = true.
Similar Messages
-
In Report Builder 3.0, I have made a main report in which the user can filter the underlying dataset using three parameters (all multi-value). The report shows totals grouped by these three parameters, as well as a grand total. What I want is to click
on a total, which then opens the drill-through report for the corresponding records. I have achieved this for the grand total; the action in the corresponding text box passes all selected values of the parameters to the drill-through report.
What I cannot figure out is how to make this work right when clicking on a subtotal. When I use the same expression as for the grand total, the same values for the parameters are passed, instead of the subset that apply to the corresponding text box in the
main report. I expected this to work, because Report Builder /does/ correctly calculate the SUMs for the different levels, even though the expressions are the same.
My question is: how do I pass different drill-through (multi-) values for parameters, corresponding to the respective subtotals in the main report?
(FYI: I am using Microsoft SQL Server 2008 R2 and Report Builder 3.0 .)Hello Katherine,
Thanks once more for your quick reply.
I was aware of the textbox action "Go to report", and how to pass parameters in general. My question concerned how to determine the scope of the passed multi-value parameters (to the values that apply to the respective group/subtotal). The article you linked
to is informative, but not a solution to my problem.
A colleague of mine came up with a pragmatic solution: instead of trying to determine the scope of the parameter values, now I "look to the left in the results table". The two screenshots below should illustrate this. (Screenshots are in Dutch. Specific information
is pixelated.)
Unfortunately, I am not able to post images. Once my account is verified, I will edit them in. For now, I hope the text speaks for itself enough.
[Screenshot: Drill-through parameters - 01: Report Builder tablix with subtotals]
[Screenshot: Drill-through parameters - 02: Textbox properties (selected in screenshot 01) - Action - Go to report]
The first screenshot shows the tablix in the Report Builder. The second screenshot shows the properties of the textbox selected in the first.
Notice that I do not pass parameters for the first two columns, but the actual values. I only pass the parameter (containing /all/ user-selected values) for the third column. In the textbox below the selected one, I pass the actual values for the first column,
and parameters for the last two. In the textbox above the selected one, I pass the actual values for all three columns.
The only (cosmetic) flaw this approach has is that in the drill-through report, the list of selected parameters might show values that do not occur in the (corresponding part of the) results, and only for those parameters for which the main report passes (all
user-selected) parameter values, and not the actual values in the results. The results are correct, though.
If there is a way to directly determine the scope of multi-value parameters for passing to a drill-through report, I would still like know. But for now, this seems to work. -
How to display multi line headings in procedural alv report
Hi experts,
How to display multi line heading in alv( procedural alv report) report.
some columns single line and some columns multi line in the same report.
ex:
solvent consumed solvent recovered
fresh | recovery recovery | spent batch no storage
I am using procedural alv .pls give me idea.Hi Ram,
Check the sample report [how to display multi line headings in procedural alv report|http://sample-code-abap.blogspot.com/2008/01/printing-multiple-line-header-and.html]
Thanks,
Duy -
Passing value to multi value parameter from SSIS using Report server webservice
Hi
I am triggering SSRS report from SSIS(Script task). I am passing parameter values from SSIS package.
So far working fine. Now, I have a report which has 2 parameters. One is single value parameter and the other is multi value parameter.
No issue assigning value to single value parameter. But how can I pass multi value to multi value parameter?
My code as below
ReportExecutionService rs = new ReportExecutionService()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
rs.Url = _webserviceURL;
rs.LoadReport(_reportPath, null);
ParameterValue[] paramval = new ParameterValue[2];
paramval[0] = new ParameterValue();
paramval[0].Name = "CountryCode";
paramval[0].Value = _countryNames;
**paramval[1] = new ParameterValue();
paramval[1].Name = "BusinessCode";
paramval[1].Value = _businessCode;****
rs.SetExecutionParameters(paramval, "en-us");
I am not sure how to pass value to BusinessCode(Multi value parameter)Hi Rajkm,
In order to pass a multi-value parameter through the Reporting Services Web services, you need to define the same numbers of ParameterValue objects as the number of the values of the multi-value parameter being past into the report. The Name property
of these ParameterValue objects must be specified same to the parameter name.
I found a good FAQ article for this scenario:
How do I pass a multi-value parameter into a report with Reporting Services Web service API?:
http://blogs.msdn.com/b/sqlforum/archive/2010/12/21/faq-how-do-i-pass-a-multi-value-parameter-into-a-report-with-sql-server-reporting-services-ssrs-web-services-api.aspx
Hope this helps.
Elvis Long
TechNet Community Support -
Multi value Cascading Parameters Not working
Hi ,
I have created two report parameters and want them as Cascading. District Parameter depends on Region Parameter which should allow Multi selection. When I select single value in Region it works perfectly. But when I choose multiple values, District turns
out to be a blank text box. Can you please advise on how to fix this?
I have used the In clause in my code
SELECT
DISTINCT
SalesDistrict
FROMDistrict(NOLOCK)
WHERESalesRegion
IN(@SalesRegion)
SGthat's because "public sector,East" is passed as a string rather than multiple values.
you should split them into multiple rows... there are several functions that do that.. you can pass the string to the function and use IN clause look them in the district table.
below example is using xml but you can also use functions, if you want... just google "split comma delimited string to multiple rows" function
declare @District table (Distrcit int,Region varchar(20))
Insert into @District values (1,'East'),(2,'West'),(3,'Public Sector')
declare @xml xml, @s nvarchar(max)
select @s = N'public sector,East'
set @xml = N'<root><r>' + replace(@s,',','</r><r>') + '</r></root>'
select * from @District where Region in
(select t.value('.','varchar(max)') as [delimited items]
from @xml.nodes('//root/r') as a(t))
refer http://www.kodyaz.com/articles/t-sql-convert-split-delimeted-string-as-rows-using-xml.aspx
Hope it Helps!! -
Creating List of Values for Parameters in Crystal Report
Dear All,
I have created a Report using Crystal Report XI and integrated that with VB Dot Net. It uses a Stored Procedure (SQL 2000) to retrieve data. The stored procedure has some parameters. When I run the VB dot net exe, it prompts for the parameters. However, I like to pass a List of Values to the Parameters, which the end user must select from the same.
How can I create a List of Values and attach to the Crystal Report.
Please help me in this regard,
Naren.Are you trying to set a bunch of default values (e.g.; 1st name, last name, address, order number, etc.), or an actual List of Values?
Also, remember to search the forums for possible solutions. When I enter "parameter" in the search box, I get over 7 pages of links...
The [notes|https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_ossnotes&query=&adv=true] database and [articles|https://www.sdn.sap.com/irj/sdn/businessobjects-articles] are great information resources also.
Oh, and confirm exact version of CR used.
Ludek -
To display a value in particular cell in report
HI all,
I have Qty ,added qty and gross qty( key figures) in rows and posting periods in columns.
Iam getting Qty for all the periods.But for the added qty it should compare period to period and the value should get displayed in the operand period.
Ex: period1 period2 period3
Qty 1 2 3
Added Qty 1 1
here added qty for period 2 is 1 which gets displayed under 2.
I have taken 2 restricted key figures one with period 1 and Qty and the other with period 2 and qty
I created one Calculated key figure as RKF2-RKF1 and taken that CKF into the report hiding the RKF's.
When I execute the report in the row added qty the both qty values are getting dislayed and the exact value 1 is showing in overall result.
period 1 period 2 overall result
EX: Added qty 1 2 1
how to get the exact value 1 in the period 2 column for added qty which showing in overall result?
Will cell editor workout in this type of situation? if yes then plz explain in detail how to use cell editor in a report ?
Please answer
ThanksHI Patricia,
Tell me can we create 2 structures on Key figures?
Actually I have only one key figure Qty and Iam trying to define Added qty.
Now my keyfigures are in rows and posting periods are in columns.....
Please explain me in detail as I have tried few times defining the cell definition but its not working for me.
("Added Qty" cell 2 = "Qty" cell 2 - "Qty" cell 1
"Added Qty" cell 3 = "Qty" cell 3 - "Qty" cell 2)
If this works out then will I get all the values in the same (added Qty) row for all the periods in columns.?
Please explain
Thx -
Display the values in Docment Currency in Report Painter-FDI4
Hi,
Am new to report painter. i created report painter in FDI4. this report is to display the due amount.
when i click on table cell, which is amount field . Am chosen cell type as 'Select with Key figure' option .
After then i try to select key figure for that cell (Popup:Element definition).
In F4 selection there is only one Key figure which is Amount in LC.
I need to display the field value as Amount in Document currency.
How to bring Amount in Docment curreny in that F4. Is it possible.
I didnt get any thread related to my requirement in SDN.
pl help.Hi there,
Could you insert the field FAEDT (Net due date) in customer reports? (reports from transaction FDI3). This field is not in a table, only in a structure. I defined it in TKAF like that:
USGFL
D
ROLNM
FAEDT_FPOS
CHTAB
RFPOSXEXT
CHFIE
FAEDT
ORTAB
RFPOSXEXT
ORFIE
FAEDT
DIMPR
2
RSLIN
1
And I also added it in the RFRRD20, but did not work. Can you tell me how to do it? I will reward with point. Thanx!! -
SCOM Alerting : How to change displayed "Has value" number on email to user
Our end users who receive these alerts want to see only a whole number value for Logical Disk with a counter % Free Space
Presently the alert fires -email is sent and the out put that is displayed for "has a value" displays 12.8447532653809
Users want only the whole number 12 - I will even take 12.84
Where or what can I do to achieve this for the customer
Any help would be greatly appreciated
KevinPA17111Hi,
Use this custom MP by Kevin Holman
http://www.systemcentercentral.com/pack-catalog/logical-disk-free-space-addendum-mp-for-windows-20032008/
Disabled the current disk monitors in the MPs you are using and use those in this MP
Blog: http://theinfraguys.com
Follow me at Facebook
The Infra Guys Facebook Page
Please remember to click Mark as Answer on the answer if it helps you in anyway -
How to display Base values (AFS Grid) in the Report
Hi Friends,
We ar using AFS, in that we have Grid value like 0003A34
(8 chars: first 4 chars colour (0003), A represents Cup, 34 represents size of the Material), in that we can able to store the Base values like for International or US,
and for size 34 equivalent to 70 like wise.
In our reports we are using ALV grids, and showing the existing grid value like 0003A34, but we need to show Base value list like INTL or US etc, based on the region / area, the report should show the equivalent grid value like 0003A70 etc.
Please help me how to do this.
Thanks
ShankarDear Shankar;
I think you will be able to achieve what you try to do using grid conversion in AFS. Base Grid values can be converted to other values based on the customer, vendor or material depending on your requirement. This need to be configured in IMG and then the ID must be assigned in the Vendor or the Material Master as per the requirement.
This is somewhat complex config. Please contact me if you need any more clarifications ([email protected])
Azwath Mohammad
http://www.sapafs.net -
Multi Value error observed in one report after migration from BO 3.1 to BO 4.0
Hi,
Can someone help me resolving the #multivalue error after migration of report from BO 3.1 to 4.0 environment
I have compared all the formulas and they are same in both the
I have observed, if I create a new tab with the report, The multivalue error is not observed
Can somebody please help me regarding this issue
Thanks
JaveedHi Javed,
MultiValue error appears if you have multiple result values for the same row values combination.
Try including an object from object panel which can differentiate the values for that row.
For Example,
Lets say you have an item & you have a keyfigure Invoiced amount where it has 2 different values at schedule line level.
So the values in webi BOBJ depends your BW architecture like how the infoprovider is designed. If your infoprovider has the invoiced amount values based on item and schedule line level then if you dont add the schedule line in webi report, you ll get the "#MULTIVALUE" Error.
If you are using any Variables in the webi Report, try using
=[keyfigure] in [Dimension]
Hope this helps.
Regards,
Naveen -
Crystal Reports For Eclipse - Multi-values not showing on page..
Tried two different ways to set params, but to no avail. Values seems to be set, but only one value appears on the report.The value is updated, so not an old value or anything.
Also if I look at the values I can see the values are set! The Field is set to multi=true and the height is big enough to display lots of date grow=true.
<%@page import="com.businessobjects.samples.JRCHelperSample" %>
<%@page import="com.crystaldecisions.report.web.viewer.CrystalReportViewer" %>
<%@page import="com.crystaldecisions.reports.sdk.ReportClientDocument" %>
<%@page import="com.crystaldecisions.sdk.occa.report.application.OpenReportOptions" %>
<%@page import="com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase" %>
<%@page import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSource" %>
<%@page import="com.crystaldecisions.sdk.occa.report.data.Fields" %>
<%@page import="com.crystaldecisions.sdk.occa.report.data.ParameterField" %>
<%@page import="com.crystaldecisions.sdk.occa.report.data.ParameterFieldDiscreteValue" %>
<%@page import="com.crystaldecisions.sdk.occa.report.data.Values" %>
<%@page import="com.crystaldecisions.reports.sdk.*" %>
<%@page import="com.crystaldecisions.sdk.occa.report.lib.*" %>
<%@page import="com.crystaldecisions.sdk.occa.report.data.*" %>
<%
// This sample code calls methods from the JRCHelperSample class, which
// contains examples of how to use the BusinessObjects APIs. You are free to
// modify and distribute the source code contained in the JRCHelperSample class.
try {
String reportName = "Report1.rpt";
ReportClientDocument clientDoc = (ReportClientDocument) session.getAttribute(reportName);
if (clientDoc == null) {
// Report can be opened from the relative location specified in the CRConfig.xml, or the report location
// tag can be removed to open the reports as Java resources or using an absolute path
// (absolute path not recommended for Web applications).
clientDoc = new ReportClientDocument();
// Open report
clientDoc.open(reportName, OpenReportOptions._openAsReadOnly);
// ****** BEGIN LOGON DATASOURCE SNIPPET ****************
// Database username and password
String connectString = "jdbc:oracle:thin:@localhost:1521:XE";
String driverName = "oracle.jdbc.OracleDriver";
String JNDIName = "";
String userName = "darren";
String password = "darren";
// logon to database
//JRCHelperSample.logonDataSource(clientDoc, userName, password);
// Switch all tables on the main report and sub reports
JRCHelperSample.changeDataSource(clientDoc, userName, password, connectString, driverName, JNDIName);
// ****** END LOGON DATASOURCE SNIPPET ****************
// Store the report document in session
session.setAttribute(reportName, clientDoc);
// Create the CrystalReportViewer object
CrystalReportViewer viewer = new CrystalReportViewer();
// set the reportsource property of the viewer
IReportSource reportSource = clientDoc.getReportSource();
viewer.setReportSource(reportSource);
// set viewer attributes
viewer.setOwnPage(true);
viewer.setOwnForm(true);
// MyParameter
String paramName = "MyParameter";
String theValue1 = "Hello";
String theValue2 = " World!";
// Method 2
//We will be using the ParameterFieldController quite a bit through-out the rest of this function.
ParameterFieldController paramFieldController = clientDoc.getDataDefController().getParameterFieldController();
// MULTI-VALUE DISCRETE PARAMETERS.
Object[] multiVals = {theValue1, theValue2};
// sReportName - the report that contains the specified parameter field.
// sFieldName - the parameter field name.
// newValue - the collection of values to be stored in the parameter field.
paramFieldController.setCurrentValues("", paramName, multiVals);
// Method 1
Values values = new Values();
values.add(theValue1);
values.add(theValue2);
ParameterField paramField = new ParameterField();
paramField.setName(paramName);
paramField.setAllowMultiValue(true);
paramField.setAllowCustomCurrentValues(true);
paramField.setCurrentValues(values);
Fields parameterFields = new Fields();
parameterFields.add(paramField);
viewer.setParameterFields(parameterFields);
viewer.setEnableParameterPrompt(true);
// Show parameter values to console
Fields fields = viewer.getParameterFields();
for (int i = 0; i < fields.size(); i++) {
ParameterField pf = (ParameterField)fields.get(i);
Values v = pf.getCurrentValues();
if (v.isEmpty()) {
System.out.println(pf.getName());
} else {
System.out.println("v.size(): " + v.size());
for (int j = 0; j < v.size(); j++) {
ParameterFieldDiscreteValue pfdv = (ParameterFieldDiscreteValue)v.get(j);
System.out.println(pf.getName() + " - " + pfdv.getValue());
// Apply the viewer preference attributes
viewer.refresh();
// Process the report
viewer.processHttpRequest(request, response, application, null);
Thanks in advance!This is not a support site but a community forum. For direct help purchase a case on line
-
Passing multi value parameter to the Drill through report
Hi
I have two reports say Report A and Report B.
Both reports using same parameters.
I am Navigating from Report A to Report B using Jump to Report option.
Now when I pass multiple parameter to the Report B it only displays first parameter results.
In report B I have parameter multi value select to true.
I would like to know if its possible or not to pass multi value parameter in drill through report?
I would appreciate if someone can help me here.
Regards
AmitYes you can pass multi value parameters to a drill through report.
It works similar to multi value parameters for subreports, which is discussed in detail in this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=163803&SiteID=1
-- Robert -
Optional Multi-Value Parameters in a URL
I have 3 summary reports, that each need to hyperlink to 4 detail reports. The summary reports use multi-value string parameters that are set to "optional" (this is crystal 2008). I need to construct URLs to support these optional parameters. The opendoc documentation says to use "no_value" as the param argument, but that doesn't work - I get the string "no_value" in the selection criteria which causes it to fail. Ideally, I'd use either lsMMyParam="NULL" or lsMMyParam="", but neither works. Anyone ever done this?
hi Bob,
have you tried doing this...
&lsMPromptName=[]
lsM prompt / parameter values have to be passed with square brackets as far as i know.
jamie -
I have a report(SSRS 2008) on top of a CUBE which have a subreport which needs to be opened in a new window, Passing the (MDX)parameters from URL, I have created a link which takes single value parameters and works fine, but when i tried to pass multi value MDX parameters it is not working can someone help me on this. Number is multivalue MDX parameter
="javascript:void window.open(" &"'"& Globals!ReportServerUrl &"/Pages/ReportViewer.aspx?"& Globals!ReportFolder &"/Report.rdl&Number="& Parameters!Number.Value &"&FromMonth="& Parameters!FromMonth.Value &"&FromYear="& Parameters!FromYear.Value &"&ToMonth="& Parameters!ToMonth.Value &"&ToYear="& Parameters!ToYear.Value &"','ReportWindow','left=370,top=180,width=575,height=350,status=no,menubar=no,scrollbars=no'" & ")"
Thanks in AdvanceHi Boyan, MDX is same between both the reports...my main report will show top 10 rows and when users wants to see more than ten rows he needs to click on the subreport link.
I found a way to pass multivalue parameter but the problem is i am passing a MDX parameter which will have & ([Division].[Division Name].&[USA]) before the value...so in the java script while passing the parameter value it is taking &value(&[USA]) as new parameter and throws a error message saying &USA not found.
="javascript:void window.open(" &"'"& Globals!ReportServerUrl &"/Pages/ReportViewer.aspx?"& Globals!ReportFolder &"/Report.rdl&Division="& Parameters!Division.Value &"&Number="& Parameters!Number.Value &"&FromMonth="& Parameters!FromMonth.Value &"&FromYear="& Parameters!FromYear.Value &"&ToMonth="& Parameters!ToMonth.Value &"&ToYear="& Parameters!ToYear.Value &"','ReportWindow','left=370,top=180,width=575,height=350,status=no,menubar=no,scrollbars=no,Location=yes'" & ")"
Here in the below link Division is a multi value parameter, after doing some research i found %2526% will replace &, but the problem is when passing the second parameter it is replacing &Division with %2526Division and asking me to enter division manually if i have selected more than one value.
="javascript:void window.open(" &"'"& Globals!ReportServerUrl &"/Pages/ReportViewer.aspx?"& Globals!ReportFolder &"/Report.rdl&Division="& replace(Join(Parameters!Division.Value,"&Division="), "&", "%2526") &"&Number="& Parameters!Number.Value &"&FromMonth="& Parameters!FromMonth.Value &"&FromYear="& Parameters!FromYear.Value &"&ToMonth="& Parameters!ToMonth.Value &"&ToYear="& Parameters!ToYear.Value &"','ReportWindow','left=370,top=180,width=575,height=350,status=no,menubar=no,scrollbars=no,Location=yes'" & ")"
Thanks.
Maybe you are looking for
-
Time Machine stops backing up in the middle of preparing items
Note: As it may soon become clear, I'm not all that computer literate (i.e. many of the solutions I've read here for problems similar to mine tend to leave my head spinning), so please be as patient & as simple as possible in answering. My Intel MacB
-
My old Apple ID is on my iPhone, but this has been transferred to a new Apple ID. The iCloud on my phone is requesting the password for the old Apple ID, but this no longer exists. How do I update the iCloud Apple ID on my iPhone? When I try to ge
-
Major start-up problems on IMac - Help, please
My IMac, new in Nov. 2008 and running OS 10.5.5 has been having trouble starting up and staying running over the past 10 days or so. I frequently get freeze-ups and get the grey screen with the flashing folder with a question mark during start-up att
-
Problem with Pro*C reading BLOB field from Oracle 10g
Hello Experts, We have a Pro*c application which is reading the BLOB data fields (a PNG image file) from Oracle data base. It holds the BLOB fields returned from the SQL query into a Unsigned Char structure in Pro*C. The program used work fine on AIX
-
Highlight current menu item whose page is displayed in an iFrame
Greetings, Looking for the Holy Grail here... So the parent page has static menu and an iframe which then loads in a specific pages as the user clicks on the menu items (which are ul li tags). I would like to be able to highlight a menu item based on