COGNOS 8 Bi value prompt - reporting

Currently I have a value prompt added to my report (with UI selected as List-Box) and the date item used is name 'YEAR'. Now when I run the report the values in the value prompt are seen as below:
YEAR
2004
2005
2006
What I want to do is get rid of the year tag that is present in the output of the value prompt box, more clearly the output in the value prompt box should be as below:
2004
2005
2006
Can someone let me know how that can be achieved?

hi guys i kinda figured out how this can be done. its just two lines of script which does the job. Since i din get any answer i thought not many people know about this so i am posting it here.
Lets say i name my List Box 'promptYear'
Then the following piece of code put in an HTML item does the job.
<script> document.formWarpRequest._oLstChoicespromptYear.remove(0); document.formWarpRequest._oLstChoicespromptYear.remove(0); </script>

Related

the date format is asking to enter data in dd-mmm-yyyy format, how can I change it to ddmmyy

I'm newbie and I'm making Forms with Developer 6i, but the date format is asking to enter data in dd-mmm-yyyy format.
How can I change it to ddmmyy then I press Enter button so as to make it dd-mm-yyyy.
eg. I entered 120622 then its need to become 12-06-2022.
Hope you will get it.
I tried but gets nothing
Why are you using "6i"? It is 20+ years old and hasn't been supported for over 15 years. If you are trying to learn, doesn't it make sense to learn the new version (12.2.1.4)?
Regardless, if your issue is related to working with a text field/item, simply set the Format Mask for that field to "dd-mm-yyyy". Now when you enter something like 03012023 (Jan 3, 2023) you will see 03-01-2023 when you exit the field.

SSRS Expression to Open Specific Report

I have a SSRS dashboard that has a calender image on it and under the image properties I have an action to Go to Report and a specific report was listed. Depending on the measure the user is looking at in the dashboard when they click it a 12 or 24 month trend chart will load. It works fine when I just have it set to go to a specific report but when I put an expression into the Specify a Report option I get a weird error that I have been researching but the error seems possibly misleading so I thought I would just put the expression I am using out here to see if anyone has any direction for me as it seems like what I am trying to do is simple but I may be searching wrong. Thanks in advance!
I have the expression opening the 24 month chart of the definition type is CSH and eventually it will check for other conditions but I wanted one to work before I went on.
=IIF(Fields!MEAS_DEFINITION_TYPE = "CSH","FITDash_Trend24mo.rdl",Nothing)
I get this error and it started up after I added the expression above. The datatype of MEAS_DEFINTION_TYPE is nvarchar(25):
Severity Code Description Project File Line Suppression State
Error [rsCompilerErrorInExpression] The ActionInfo.Action.Drillthrough.ReportName expression for the image 'Calendar25' contains an error: [BC30311] Value of type 'Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.Field' cannot be converted to 'String'.
Common mistake, you have forgotten to specify the .Value property of the field
Try
=IIF(Fields!MEAS_DEFINITION_TYPE.Value = "CSH","FITDash_Trend24mo.rdl",Nothing)

ASP.NET Zero not mapping Paid Editions

I have recently started using the ASP.NET Zero system and noticed that when I'm attempting to change an edition to a paid edition, it does not show it when I go to edit the edition again. In my database, I have the other values that I entered so the edition is saving correctly. When editing the edition, the radio button will still say "Free."
I noticed that the EditionAppService.cs file utilizes the ObjectMapper to map from SubscribableEditions to EditionEditDto. When the SubscribableEdition enters the mapper, it has the values for Monthly and Annual prices. When it exits the mapper as the EditionEditDto, both values are null. Somehow, the ObjectMapper isn't pulling over these values.
I have attached two pictures below. The first shows the SubscribableEdition that has the AnnualPrice and the MonthlyPrice.
When I take the next step in the second picture to see the results of the ObjectMapper, you will see that it no longer has a value for either of those fields in the EditionEditDto.
This results in the edition appearing to be Free when editing it. I thought that maybe the fact that it was a nullable Decimal was the problem. But once I removed that and converted it to a normal decimal, it filled in the prices with zeroes instead of null values. When I downloaded and completed the PhoneBook tutorial, I noticed that project also had the same issue of the Edition not saving.
I am trying to figure out why the mapper isn't mapping the values over to the EditionEditDto correctly.
It's due to a missing map in CustomDtoMapper.cs that will be added in v5.1:
- configuration.CreateMap<EditionEditDto, SubscribableEdition>();
+ configuration.CreateMap<EditionEditDto, SubscribableEdition>().ReverseMap();

leveraging environment variables in SSIS process tasks

I'm using 7z to zip up some files in SSIS:
This works, but I need the date to be in the zip. So I tried this:
In the command line, this works perfect. In SSIS, it crashes. This tells me that SSIS has issues calling command variables. How do I get that date in there? It is the current date (date of execution) I'm looking for.
Thanks.
This will depend on the formatting you want to use for your string, but the way you add dynamic elements to your SSIS components is via the Expressions group in each item's Properties. With you Execute Process Task transformation selected:
Click in the Expressions box - which will be empty - in properties and then click the ... icon that appears to the right.
Click in the Property dropdown and select Arguments.
Click the ... icon.
Enter your expression, checking it works by clicking Evaluate Expression.
That's it! Click OK on everything and try to run your package.
You can get help all over the internet on how to build that expression. If you just want yyyy-mm-dd then left((DT_WSTR,50)getdate(),10) is what you need for the date part and you can fill in the rest.
Remember that some characters need a \ before it as they hold special meaning and need to be escaped. So if you wanted to return \\server\share your expression would be "\\\\server\\share" etc.
Just to add, it looks like you are adding your date to your filename in dd-mm-yyyy format? I would advise against this as it causes confusion between US and UK systems and when you have yyyy-mm-dd Score Backup.zip as your filename they will sort correctly in Windows Explorer, whereas with dd-mm-yyyy all the files for the first of each month will be at the top, regardless of month or year.

PowerBuilder and batch processing

I'm using PowerBuilder 10.5 and as a newbie I'm a bit stuck and since Google isn't giving me a satisfying answer I'm asking some advice from the Stack Overflow group.
I have a Rich Text Edit field in which the user can write something, insert pictures and so forth. Once finished, he goes to the „Search“ command button and clicking it searches for the batch file that will suit his needs (copy that text into an existing word document, create a new word and place the folder on web, and so fort – there are 6 different batches). The code in the clicked event of „Search“ command button is this:
String ls_s
GetFileOpenName('PB_app', ls_s, ls_s, 'BAT', "Win Batch Files (*.BAT),*.BAT", 'C:\Programs\Test')
And here come my problems: I can't connect my app and the selected batch file. I'd like the path of the selected batch file to be visible in the Single Line Edit filed, but I have no idea how to get there, not to mention I'm point blank at how to connect PB app, batch file, how to even say to the batch file – „That text in rich text edit field is the one you have to work with?“…?
So I need some advice, guidance, perhaps some links or names of any literature that would help me understand how it should be done. I've lost two days and got nowhere, and I just need some piece of advice to get me going…
Your problem is that the original programmer used one variable for two return values. If you declare a new string variable and pass it instead of the first ls_s, you'll see this will return you the path. If you run into trouble, PB has a good help file (and the manuals are also online) which covers GetFileOpenName().
Good luck,
Terry

Resources