Pass parameter to ssrs report based on cube
hi folks:
I am working on a weekly report based on cube. Users are able to pull out data by themselves using excel. Now they want this to be scheduled to run on a weekly basis via SSRS. The date hierarchy (date.calendar) is like this: Year -> Quarter
-> Month -> Week
I want users to be able to pick any week (only one week) they want and run the report. I understand I need to create a parameter @week .
The problem is how to populate this parameter @week in mdx since the source is a cube db.
Any idea?
Thanks
Hui
--Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --
Thanks Charlie, your solution is pretty close now. When I try out the shareddataset via cube, I found the following statement in the query via query designer:
WHERE ( [Checkoutdate].[Fiscal Year Calendar].[Week].&[23]&[2014]&[2]&[6] )
23 is the week no, 2014 is the year, 2 is the quarter and 6 is the month. I intend to create 4 parameters so that users could pick year, quarter , month and week.
The question here is the sequence, do I have to strictly follow the sequence [week - year - quarter - month] or it doesn't matter?
SELECT {STRTOMEMBER("[Date].[Calendar Weeks].[Calendar Week].&["+@Week+"]&["+@Year+"]&["+@quarter+"]&["+@month+"]
")} ON 0
or can I go like this as it's more intuitive:
SELECT {STRTOMEMBER("[Date].[Calendar Weeks].[Calendar Week].&["+@year+"]&["+@quarter+"]&["+@month+"]&["+@week+"]
")} ON 0
--Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --
Similar Messages
-
Pass parameter to ssrs report in performance point webpart from textbox text
How to pass parameter to ssrs report in performance point webpart from textbox text
Please help me to solve this ...
Bikky KumarEdit your SharePoint page and add new text filter web part.
Then pass the text filter value to your performance point report using connections. Your report should include at least one parameter to get the value. More over you can set default value in text filter. -
How to use the same column value in the casecadeing parameter in ssrs report?
Hi frnz,
I have a table site contains one filed SiteCode
Now i have fields like below using the below quries
SThe above are the two results sets coming from the single table ,now i will use these two results /Query in my ssrs Casecade report
1.First result set/Query will use for the first dataset and use these values in the paramet1 selection as PrimaryCodes
2.Second result set/Query will use for the second Dataset and use these values in the parameter2 as SecondayCodes
3.Using these two datsets and create a Casecadeing paramet in ssrs report.
4.so using this information how can i create the Casecade report ,I have tried different ways but i didnt get the soluction
I have done the follw but ididnt get the o/p.
I have created two parameter and mapped to the results but while paramter selection i will able to see only the first paramet(PrimaryCodes) ,and i will not see the second paramter(SecondaryCodes) it could not show me the second paramter values in the drop
down list.
Note:Here i will use the Single Table to get the all the sitecodes
Can some one please help me out for this report.
Thanks.Hi,
Try below links for your reference:
http://blogs.msdn.com/b/sqlforum/archive/2011/05/26/ssrs-cascading-parameter-with-optional-select-all-in-sql-reporting-services-report.aspx
http://msdn.microsoft.com/en-us/library/dd255197.aspx
http://blogs.msdn.com/b/psssql/archive/2010/01/29/how-to-have-a-select-all-multi-value-cascading-parameter.aspx
sathya - www.allaboutmssql.com ** Mark as answered if my post solved your problem and Vote as helpful if my post was useful **. -
Passing Parameter from Main report to SQL command-based subreport
I am trying to cut down the run time of my reports and have recently figured out how to write SQL commands to limit the data by filtering prior to being pulled into the reports. However, many of my reports rely on multiple sub reports, which can cause a dramatic 'drag' on the report.
I am trying to filter the SQL command used in my sub report by passing the group parameter, which is selected by the user in the main report, to the sub report's SQL command. Without this parameter, the sub report has to sort through a lot more data than it would with this parameter, making the run time extremely slow.
Any suggestions on how I can accomplish this?
Thanks for any help you can provide,
Marlene Allen
Crystal Reports Developer
Crystal Reports Professional;
Product Type: Full;
Product Version 11.5Hi Marlene,
I don't believe you can pass a CR parameter to a Command object.
I suggest replacing all of the Command Objects with a Stored Procedure so all of the data filtering is done server side. DB servers are much more proficient at collecting the data and filtering than CR will ever be. It will also allow you to replace subreports to also speed up your report processing. All depends on your layout of course but something to look at.
Thank you
Don -
Help Needed in passing parameter to cryst report
Hello everyone, I am trying to create a report for a single record and as such am trying to pass parameters to a crystal report but I am not sure exactly how to do this. This is my own method that I am employeeing. I do not want to create a data table and put all the info I need in there and then base a report off of it. I do not want to deal with loops and arrays right now. I just want to pass for example parameter JuvenileID = 1 to my crystal report, then create a command under the database expert and set the parameter for my command to the parameter I passed my crystal report. How would I go about in doing this? I am using VS 2010 C#. This is a windows application. I have a dataentry form that is already populated with the info needed for the report. I just need to pass all the controls.text values to the report and populate it that way.
I'm not sure if I fully understand the issue, but since you have all the data you need in a data entry form that is already populated, why don't you simple create an ADO .NET Dataset and pass that to the report? Much easier to implement, faster execution with the small amount of data you have and less code.
Dataset sample app is here:
https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
More info on datasets is here:
[1511438 - How to use datasets to pass data to crystal reports|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533313331333433333338%7D.do].
- Ludek -
Passing Parameter to Crystal Report
Hi Experts,
I have created and designed a Report in Crystal Report 2005. I am displaying the report in SAP B1 using Win Form . Here I want to pass 2 parameters to Report ---@FromDate and @ToDate . I have coded to pass these two parameters this way :
Dim RptDoc As New ReportDocument
Dim ParamValue As String = String.Empty
Dim crtableLogoninfos As New CrystalDecisions.Shared.TableLogOnInfos
Dim crtableLogoninfo As New CrystalDecisions.Shared.TableLogOnInfo
Dim crConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo
Dim CrTables As CrystalDecisions.CrystalReports.Engine.Tables
Dim CrTable As CrystalDecisions.CrystalReports.Engine.Table
Try
RptDoc.Load(Application.StartupPath() & "\" & ReportName & ".rpt")
RptDoc.SetParameterValue("@FromDate", "01/01/2008")
RptDoc.SetParameterValue("@ToDate", "12/31/2008")
Dim oForm_ReportViewer As Frm_ReportViewer = New Frm_ReportViewer()
oForm_ReportViewer.CRViewer.ReportSource = RptDoc
With crConnectionInfo
.ServerName = oCompany.Server '"(local)"
.DatabaseName = oCompany.CompanyDB '"SBODemoIn"
.UserID = oCompany.DbUserName
.Password = "manager@123" 'oCompany.DbPassword
End With
CrTables = RptDoc.Database.Tables
'Loop through each table in the report and apply the
'LogonInfo information
For Each CrTable In CrTables
crtableLogoninfo = CrTable.LogOnInfo
crtableLogoninfo.ConnectionInfo = crConnectionInfo
CrTable.ApplyLogOnInfo(crtableLogoninfo)
Next
oForm_ReportViewer.Text = frmTitle
oForm_ReportViewer.WindowState = FormWindowState.Maximized
oForm_ReportViewer.ShowDialog()
Catch Ex As Exception
MessageBox.Show(Ex.ToString)
End Try
But When I view the report in B1 , it throws an Exception "Report or Procedure expects parameter @FromDate which is not supplied. "
Please help me where I am making mistake , what could be the cause of this exception..
Thanks and Regards,
Pooja Singh.Hi Pooja Singh,
You have only set Dim ParamValue As String = String.Empty. Where are two parameter @FromDate and @ToDate?
SetParameterValue will only work if you have defined the parameters already and the parameters have the right format.
You may check this thread:
Re: Crystal report open instead of PLD with same form reference.
Thanks,
Gordon -
How to get month value from custom calendar without passing parameter from SSRS in MDX query
Could you please throw some light to achieve below requirement?
I need to filter the data between two periods dynamically . The date calendar here works differently(ex:-Date 26-Aug-2014 will fall in period 7 which is last date and 27-Aug-2014 will fall in period 8 and it is first date of period 8),so I cannot go
with system date period/Month. Date Hierarchy is like YEAR,QUARTER,PERIOD ,WEEK and DAY.
I cannot use SSRS for passing parameter. Requirement is to extract last 2 period of data dynamically in Power Pivot with MDX.
Thanks ChandanHi Chandan,
You might try something like this
Tail(null:
Extract(
StrToMember("[FYDay].[DATE].&[ + cStr(Format(Now(),"yyyy-MM-ddT00:00:00")) + "]")
*[FYDay].[DateHierarchy].[Day]
,[FYDay].[DateHierarchy]).parent.parent
,2)
What it is doing is multiplying Day by the current date, which returns a set of one date with cardinality of (Date,Day). The Extract is pulling out just the datehierarchy Day. the the Tail() is getting it and the previous day.
Hope that helps,
Richard -
Need to display the first 5 values of a Multi value parameter in SSRS report
Hi All,
I have SSRS report with multi value parameter. I need to display the parameter selection values in a text box. I've more than 50 records in the multi value parameter list. I've included the code to display "All" if I choose "select
all" option otherwise it will show the selected values. But, I need to change the logic. I have to show only the 1st 5 records if I choose more than 5 records.
How can I implement this?
I have used the below code
=iif(
Parameters!Country.Count = Count(Fields!Country.Value,
"Country")
,"All"
,iif(Parameters!Country.Count>5
,"Display the 1st 5 values"
,Join(Parameters!Country.Value,",")
Regards,
JulieHi Julie,
Per my understanding that you want to always show the first values from the param country to a textbox when you have select more then five values from the dropdown list, if you checked "select all", textbox will display "All", if
you select <=5 amount of values. it will display the selected values, right?
I have tested on my local environment and that you can create an hide parameter(Param2) to display just the first five values from the Country and when you select more then five values from country you will get the Join(Parameters!Param2.Value,",")
to display.
Details information below for your reference:
Create an new DataSet2 which the Param2 will get the values from:
SELECT TOP (5) Country
FROM tablename
Create an new param2 and hide this parameter, Set the "Available values" and "Default values" by select the "Get the values from a query"(DataSet2)
You can also Specify first five value for the "Available values" and "Default values", thus you will not need to follow the step1 to create the dataset2
Modify the expression you have provided as below:
=iif(Parameters!Country.Count = Count(Fields!Country.Value, "DataSet1"),"All" ,iif(Parameters!Country.Count>5 ,Join(Parameters!Param2.Value,","),Join(Parameters!Country.Value,",")))
Preview like below
If you still have any problem, please feel free to ask.
Thanks,
Vicky Liu
If you have any feedback on our support, please click
here.
Vicky Liu
TechNet Community Support -
How to pass parameter to a report for Operator 'LIKE'
I need to pass a parameter to a report for "LIKE" operator. the parameter for "equal to or is in" operator is 'eq':
'https://secure-ausomxfts.crmondemand.com/OnDemand/user/analytics/saw.dll?Go&Path=/shared/Company_AFTA-D78SR_Shared_Folder/Work Order Asset Lookup&Options=r&Action=Navigate&P0=2&P1=eq&P2=Account.TEXT_61&P3=&p4=
What would 'p1' value for 'LIKE' operator?
ThanksHi, Hope the below helps
neq - Not equal to or not in
lt - Less than
gt - Greater than
ge - Greater than or equal to
le - Less than or equal to
bwith - Begins with
ewith - Ends with
cany - Contains any (of the values in &P3)
call - Contains all (of the values in &P3)
like - Is like (Type %25 rather than the % wildcard)
top - In the top n (&P3 contains 1+n, where n is the number of top items)
bottom - In the bottom n (&P3 contains 1+n, where n is the number of bottom
items)
bet - Between (&P3 must have two values)
null - Is null (&P3 must be 0 or omitted)
nnul - Is not null (&P3 must be 0 or omitted)
Venky CRMIT -
Most urgent:::: passing parameter list to reports containing record groups
hi
can any one help me , i am getting frm-41214 when i pass a paramter list containing record group as data parameter to run_report_object as parameter, calling report from forms 10g, but when i dont pass the parameter list the report runs displaying no data(as it should do), otherwise it dont run and display the frm-41214
zulfiqarHi!
To suppress Oracle Reports native Parameter Form just add:
add_parameter( pl_id, 'pARAMform', text_parameter, 'NO' );
Andrew Velichko
Brainbench MVP for Oracle Developer 2000 http://www.brainbench.com
null -
Passing parameter from WEBI report to xcelsius
hi
i transfered the parameter from WEBI report (3.1 sp2) table using a link to a gauhe from xcelsius
i can see the parameter the right number in the gauge value but the problem is that the pin does not moveHow are you connecting your report to Xcelsius? Live Office or QAAWS?
-
Pass parameter to a report link
HI,
This is what I am trying to do:
I want to create a report with 2 parameters - FromDate and ToDate.
The report link will be something like this - http://xyx.com/report1FromDate=1jan2012&ToDate=31jan2012
What I want is the users to change the date range in this URL and the report should automatically filter out the date selected. Is this possible? Has anyone does this before?
So when the user runs this report and wants to run for some other date, they will just modify the URL and the report will run for Feb as an example shown below:
http://xyx.com/report1FromDate=1feb2012&ToDate=29Feb2012
Edited by: 920645 on Mar 21, 2012 11:21 AMIt's not what you're doing wrong, but there is more right you can do.
In the Report, on the Customization Form Display Options Tab, make sure "Make Public" is checked for your Bind Parameter (:CNTRYLOC).
In the Page Properties, on the Parameters Tab, Add a Page parameter for CNTRYLOC. (I usually use the same name for the Page Parameter as the Report's Bind Parm. Warning: These parameters are CASE-SENSITIVE in places.)
Still on the Page Properties Parameters Tab, Expand the list of Portlets at the bottom and map your Portlet Parameter to the Page parameter you just made.
Hope that helps! -
Don't include last page of the SSRS report based on the parameter.
I created the report, which has 4 pages.
Each page contains bunch of tables and charts, which display data in scope of dataset, created for each page and reflecting certain subject.
Each page also has Header and Footer.
My users requested, the report has possibility to include or not include data on Page #4.
Other words, report should display 3 or 4 pages based on the entered parameter.
1. I created parameter named “Include #### metrics”, which contains options: Y, N
2. For each object on the page 4 I added dependency on the selected
parameter in the visibility option.
Now if user select parameter Not include Page #4, report displays 3 pages as expected and page #4 is empty, but with Header and Footer.
The problem: Their
preference is to not to show page 4 at all if someone chooses to not to include
#### metrics.
My question is how to force the report to display just 3 selected pages.Hi MK0526,
Per my understanding that you have add page break to make the report to display on three diferent pages and you want to show and hide the fourth page based on the parameter selected, now the issue is although the content on the fourth page have been hidden
but the page header and page footer still display, right?
I have tested on my local envoronment and can reproduce the issue, the issue can be caused by the page break you have set, you may have check the "Add a page break after", please find the details information below to reset the page break:
Please create four rectangles and add all the content from each pages to include in each rectangle
Please check the "Add a page break before" for rectangle2, rectangle3,rectangle4 in the rectangle properties and not add any page break in the first rectangle (Rectangle1)
Add expression below to show/hide the rectangle4:
=iif(Parameters!IncludePage4.Value="No",true,false)
Now you will not see the page header and footer in the fourth page when you select "No" in the parameter.
If you still have any problem, please feel free to ask.
Regards
Vicky Liu
Vicky Liu
TechNet Community Support -
Fact Sheet - Passing parameter to BI report
Hello,
I've created my own BI report which I want to use in the account fact sheet. I have managed to open the report in the fact sheet by creating a customer configuration of the BP_FACTSHEET/BIREPORTProxy view in component designer. In the view I have maintained attributes for the biproxy:
REPID (BI Report ID): Z_TEST_JOHAN_ZCUSTOMER_CARD_1101
BISYSTEM (RFC Destination of BI System): GYBCLNT100
ADDPARAMETER (Addtional Parameter for a BI Report URL): &FILTER_IOBJNM_1=0CUSTOMER&FILTER_VALUE_1=715
My question is how ADDPARAMETER works. I want to filter the data based on the customer number for which the account fact sheet is viewed. In my example, I've just tried to hard code that only data for customer 715 is displayed. This is not working, so all data is displayed.
How should the parameters in ADDPARAMETER be entered? How do I dynamically pass the correct customer number?
Kind regards,
Johan WigertHere is an example code for this badi implementation:
METHOD if_ex_bsp_dlc_fs~get_bi_rep_parameter.
DATA: lr_bol_entity TYPE REF TO cl_crm_bol_entity,
lr_value_node TYPE REF TO cl_bsp_wd_value_node,
lr_collection TYPE REF TO if_bol_bo_col,
lv_repid TYPE string.
**this is only a example
TRY.
lr_bol_entity ?= iv_data_collection->get_first( ).
lr_value_node ?= iv_data_collection->get_next( ).
IF lr_value_node IS BOUND AND lr_bol_entity IS BOUND.
lv_repid = lr_value_node->get_property_as_string( 'REPID' ).
IF lv_repid = 'SAMPLE7'.
REPLACE '&1' IN cv_addparameter WITH '0CRM_SOLDTO'.
REPLACE '&2' IN cv_addparameter WITH '156'.
ENDIF.
ENDIF.
CATCH cx_sy_move_cast_error.
ENDTRY.
ENDMETHOD. -
Pass parameter from main report to sub report?
Post Author: nomore
CA Forum: General
I have a report which is comparing turnover from present year to previous year.Im trying to make it dynamic - so i have added a parameter to the main report to allow user to enter a year, however I cannot work out how to pass this to the sub report so select records based on this. I have passed the data thruogh a fomula ok (WhilePrintingRecords; Shared NumberVar shYear;) and that is working spot on.Now i just need to enter that number as a record select paremeter. Also if I try to perform a summary on this field (it never changes, but its just a test) - the 'Insert Summary' option is unavailable, and it doesnt show up as a formula in formula editor.Post Author: V361
CA Forum: General
I have CR XI, you want to edit your subreport links, right click the sub, select Change subreport links, you should be able to select your field, and see your parameter listed. Once you set up the link the sub will run based on whatever link you picked.
Maybe you are looking for
-
What is difference between adobe photoshop and photoshop extended cs5
what is difference between adobe photoshop and photoshop extended cs5
-
ITunes 10.5 for windows vista 64 bits - error
I've been trying to install itunes 10.5 since december and even after the newer versions were out i've been having the same problem. An error occur: An error occurred during installation of assembly 'Microsoft.VC80.CRT type="Win32",version="8.0.50727
-
Windows 8.1 Network Share 0x8007003b Error Copying Files
Hi All, I'm having an issue when copying files from a Windows network share. If the file is above 5MB it will start copying and then after a minute or two I will get an error such as: Interrupted Action An unexpected error is keeping you from copying
-
Keyboard and Mouse no longer recognized when Boot Camp'ing into Windows XP
Mac Pro early 2008, Mac OS X 10.6.2, all updates applied. WinXP SP3. Standard wired Apple smooth mouse. I normally use Parallels 4.0 to access my Windows XP on this Mac. That's been working fine and continues to do so. I upgraded to Snow Leopard not
-
ITunes 7.1.1 won't update - Invalid Drive error
I have been trying to install the latest iTunes and each time a box pops up that says "iTunes + QuickTime" and Invalid Drive: F:\. Has anyone else had that problem? I can't seem to find any place that is directing it to drive F. Thanks!