SAP Central Management Console Parameters not aligned - crystal-reports

I have been designing Crystal Reports, and publishing them to the SAP Central Management Console, for the past couple of years; but I have never come across this really strange issue before!
The report in question has 7 Parameters:
1 is a static String Parameter,
1 is a static Date Range Parameter
3 are static Number Parameters
1 is a static String Parameter with a pre-defined list of values
1 is a multi-level dynamic String Parameter
All of these parameters work fine when running reports from the Designer application itself, but as soon as it's published to the Central Management Console it all messes up:
If you choose the first Parameter, you get the first parameter input screen.
If you choose the second Parameter, you get the first parameter input screen.
If you choose the third Parameter, you get the second parameter input screen.
If you choose the fourth Parameter, you get the third parameter input screen.
etc
This means that there is no way of selecting the 7th Parameter as it shows you the 6th parameter input screen.
This behavior started when I added two of the static Number Parameters. Before this everything worked fine, and I cannot find online documentation/help which would allude to a Parameter limit in CMC.
Crystal Reports Designer Version: Crystal Reports 2008, Version 12.3.0.601
Central Management Console Version: SAP BusinessObjects Enterprise XI, Product 12.1.0
Thanks in advance for any help!

After investigating I realised that the problem was Central Management Console does not interact well with multi-level parameters.
I changed the multi-level parameter to two separate parameters, and everything is working.

Related

Crystal Report: Parameter damages the whole report

While using Crystal Reports I have encountered a strange bug, that repeats itself already with a number of my reports.
I still didn't fully get how I replicate it, but usually it goes as follows:
I add a parameter of any type to an existing report document, however it doesn't appear in a parameter prompt at all.
After I change parameter order in the Parameter Fields Section, my Parameter disappears and instead I see a duplicate of another parameter in a parameter list, and in the "Set Parameter Order"-Window I see this duplicated parameter as [ParameterName, ParameterName]. If I save the document in this moment and try to reopen it, CR crushes.
If I try to load this document in Vstudio with CREngine, the code exits with the message "Access violation".
Here is a pic of what is happening:
The reason you are not being prompted for the new "test" parameter is that it is not used by the report for anything.
The rest of the behavior is indeed strange. Consider removing the '#' character from the name of the first parameter to see if that fixes it.
If some of those parameters are from a stored procedure, perhaps your report is simply out of sync with the data source. Do Database, Verify Database...

my report run but does not display anything in oracle

I have designed report in 10g. When I call report through forms 10g than report executed but do not display anything. Kindly help me what I have to do to resolve this issue. I use .rep report and desformat is PDF. One thing more when in this desformat my report started downloading instead of giving a preview in internet explorer and downloaded pdf is empty (contain nothing).
Report displays the result of a query. So the most obvious question is: does the query, when you run it outside of the Forms/Reports application, work correctly and returns the result?
If it accepts certain parameters, verify that they are correctly passed. Mind the datatype, especially if DATE is involved as people usually have problems with different format masks, NLS settings and stuff.
Also, check whether those parameters are obligatory or not. If not, report's query should contain something like
where (some_value = :parameter_value or :parameter_value is null)
Furthermore, make sure that all those parameters are passed to the report. You can display their values in the report, just to see what's going on. Open Reports Paper Layout Editor, go to the margin and - using the ampersand notation - display those values, such as
Parameter one = &parameter_one
Parameter two = &parameter_two

SSRS report parameter.label showing parameter.value

I have a SSRS report, in my report I have a dataset which has an ID and NAME field, then I created a parameter and set its value to ID from dataset and Label to NAME of dataset. I can see the label when I preview report and select it, but I am also showing the selected parameter on report for this I am using expression :
=Parameters!P_TargetBrand.Label
But when report runs it is showing parameter VALUE instead of Label.
My SQL version is :
Microsoft SQL Server 2008 R2 (SP1) - 10.50.2550.0 (X64) Jun 11 2012 16:41:53 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.1 (Build 7601: Service Pack 1)
Case when your parameter is Single Value :
=Parameters!<ParameterName>.Label
Case when your parameter is Multi Values :
=Parameters!<ParameterName>.Label(0)
OR
=Join(Parameters!<MultivalueParameterName>.Label,", ")
For Additional information try here.
I came across this problem and as far as I can tell it is a bug unsupported feature.
On this page - http://technet.microsoft.com/en-us/library/gg731894.aspx
They have two issues that are related to our problem:
"The Label reference does not display properly. The Value property is set to the Parameters!MyParm.Value parameter."
Addtl. Info: "The parameter must be explicitly bound to data using a dataset in the Visual Studio Tools for Microsoft Dynamics AX report model."
and
"The parameter is explicitly bound to datasets with two columns, label and value. The value displays properly. The Label reference displays properly everywhere except in the client."
Addtl. Info: "The report viewer control does not support the ability to specify report parameter labels, only values."
In my case we're not using a bound dataset. Just our own backend and adding the parameter values to the reporting view object. So we're SOL. Really lame that we have to get a label/value pair. Then hit the database again to get the label for the selected value since we don't have direct access to the label.
I would love to be proven wrong.

Database-field with false as value sent over XSD to Crystal Reports is evaluated as true

The application I work on is using a Crystal Reports to present reports to the user. I am using Visual 2010, but the report was created by a previous employee some years back using Visual2005.
The basic setup is that the client application make a request to the server that uses a xsd that define the data-set it sends back. Generally this work like expected, but I am having some problems with evaluating booleans.
A recent task consider of adding the dataset with a field name TrueWeekday that control if certain numbers should be printed out or not depending on if a date is a regular weekday or have some special local meaning that might affect the sampled data. The data is always used in some formulas so I can not exclude it from the dataset.
My first attempt involved defining the new field as a boolean and in the formula for the report I wrote
if {Header.TrueWeekday} then
CStr({Detail.Flow})
else
""
This had the result that no matter if the value in TrueWeekday was false or true the flow was presented. I debuged the server to verify that the variable indeed got the expected value so the problem happened in the Crystal Reports or in the transfer of data to Crystal Reports.
To solve this particular problem within the timeconstraints of the task I changed the field to the type string and wrote
if {Header.TrueWeekday} = "false" then
CStr({Detail.Flow})
else
""
This worked like a charm.
My problem here is not urgent since I have a working solution, but I am worried that this problem might create more subtle dataintrigity problems.
What might be the cause of this and how do I solve it?
Header.TrueWeekday is probably being passed as a string so that when you do if {Header.TrueWeekday} its testing a string as a boolean in which case if the string contains anything it evaluates to true and thus causes your problem
Work in a different project made me realize that .Net is probably serializing the boolean as the text string true/false. If then Crystal Reports does sloppy import and only check
input != 0
you will get the result that both true and false map to true after the transfer.

Crystal Reports - Default Parameters

In Crystal reports, you can define default values for the report parameters.
For example, I might have a date range and set a default start of 12/01/2008 and a default end of 12/31/2008.
Is it possible to modify these defaults at runtime? For example:
1 - Default to the first and last days of the current month?
2 - Default to the first and last days of a proprietary company fiscal calendar? (i.e., look it up in a database)
3 - First & Last days of the current year?
You get the point. Is this possible? I'd even be open to a solution that involved running an external application to reach into the reports and modify them, if anyone knows how to do that.
Edit:
To answer the question posed by Philippe Grondier, most of these reports are run from inside an application. I was hoping for something simpler than manipulating the crystal object at runtime; I have my hands full right now with figuring out other parts of that API. I might take a look in the future, though.
Are you planning to run your crystal report from the crystal reports interface or as an add-in embedded in another program (you can for example use the Crystal Reports ActiveX Designer Runtime Support - craxdrt.dll - in VB code) ? In this last case, it is possible to manipulate every object of the report before launching it. Objects such as parameters can then be updated according to your needs.
As a simple example of such runtime update, my report printing routine will allways check if there is a field named "printedBy" in the report. In case this field is found, its value will be settled to the the domain name of the user that requests the report and will be printed out.
At an higher level, you can even reshape the report SQL string to add specific filters that can be inherited from your code. By doing so you might not even need parameters anymore: let your code add the filtering values 'on the fly'
EDIT: some code examples:
(m_rapport is a CRAXDRT.report object, ActiveSession is my current session object)
If m_rapport.ParameterFields.Count > 0 Then
For i = 1 To m_rapport.ParameterFields.Count
If m_rapport.ParameterFields(i).Name = "{?PUB_DateDebutPeriode}" Then
m_rapport.ParameterFields(i).AddCurrentValue CDate(DateValue(sessionActive.dateDebutPeriode))
End If
If m_rapport.ParameterFields(i).Name = "{?PUB_DateFinPeriode}" Then
m_rapport.ParameterFields(i).AddCurrentValue CDate(DateValue(sessionActive.dateFinPeriode))
End If
If m_rapport.ParameterFields(i).Name = "{?PUB_id_Personne}" Then
m_rapport.ParameterFields(i).AddCurrentValue StringFromGUID(clientActif.id_Personne)
End If
Next i
Endif
I also have another function to change report's datasource at runtime, so that reports can be executed on different servers/locations.
Read my posting Crystal Reports: Named-Date-Range Parameters. Maybe you'll be able to leverage this technique for your purposes.