How to enter multiple user defined values on data Refresh in Business Objects - business-objects

I am trying to run a Business Objects report in 5.1.9.
When I refresh the report it asks me in a box labelled "Enter and Select Values"
I can either enter a single free text value in the text box or I can type % to leave it unfiltered.
I would like to specify several values in this box rather than one or all. How do I do this? I have looked everywhere on google but perhaps I have the wrong search terms?

Wow - 5.1.9 almost 15 years old.
The box you're seeing is a prompt. Prompts can be defined either in the report's query, or in a universe object that's used in the query.
If it's defined in the query, then it's easy to change. Open up the query panel via Data -> Edit Data Provider (assuming you're using Full Client, WebI is a little different). You'll see the query panel with result object in the top-right pane and conditions in the lower-right pane. Look for a condition that includes the text you see in the prompt. That condition will likely have an "Equal To" operator. Change that to "In List", and the prompt should then accept multiple values.
If the prompt is not present in the conditions pane, then it is most likely applied via a universe object. If you want to make this change for this report only, you could modify the query's SQL (but only if you're using Full Client; for WebI, you'd need to modify the universe as described below). Hit the SQL button, and you will see the generated SQL. First, check off the "Do not generate SQL" checkbox in the lower-left of the dialog. Not doing so will cause your changes to be lost. Look through the SQL for a #prompt() function. Within that function, you should see mono -- change that to multi, and close the panel.
If you don't want to change the query's SQL, or if you want the change to apply to all reports, then you will need to modify the universe object that produces the prompt. You will need to access to Designer, and permission to import/export the universe. You will also need to locate the object that produces the prompt. Once you do, change mono to multi as described above, and export the universe.

Have you tried entering either of the following?
"FreeText1";"FreeText2";"FreeText3"
or
"FreeText1","FreeText2","FreeText3"
(obvs replacing FreeText with whatever your strings are)

Related

MS Access 2013 Using Expression Builder to only display the first 25 characters in a text field for a report

I use the MS Access 2013 Expression Builder regularly.
But one thing I've never managed is simply to show only the first (say 25) characters of of a text field on the report.
It would seem to be a no-brainer. I've done far more complex things in Expression Builder without an issue. But shortening a text field on a report always return #Type! no matter how I try to adjust the expression.
It would seem to me that all I need is:
=Left([CompanyName],25)
But it just doesn't work! The report shows a #Type! error.
I can do this no problem by creating a RecordSet SQL string and setting the report RecordSource to it (with OpenArgs). But I can't manage it in Expression Builder.
What am I doing wrong?
When you build expressions for a form, then ANY column that exists in the datasource can be used - EVEN if not placed on the form.
However, reports have a significant difference. Your expressions ONLY work against data bound controls. In other words, the control has to be on the report (no doubt in this case in the details section of the report.
What this means is you have to drop into the details section (and you can and should use in design mode - add existing fields:
So, you need to add the Company name field to the report.
Of course you don't want it to display, so you can delete the label part, and set the control visible part = false. Eg: this:
Remember, you can't have the control reference its self.
In your case, the control you dropped "most" likely is called CompanyName, and then you changing the datasource expression to its self!!!
The other way?
well, you need to RE-NAME your control!!!
If you JUST drop the control onto the report, then its name will be CompanyName.
But, you NOW using =left(CompanyName,25) which POINTS to its self!!!!
So, as noted, you can drop in a company name control and then set visible = false.
The other way, is to CHANGE the name of the control to be DIFFERENT then the company name.
So, you can use add fields, but then in the other tab, rename.
So, say I just dropped in a Description column, but want to use left(10) on it
So, we do this:
Note VERY careful how I re-named the control.
I can't use left(Description,10), since that would refer to the VERY SAME control that I am attempting to use the expression against!!!
I would be saying, please use left of a control called description, but that description s the expression I am wanting to execute against!!!!
So, re-name the control. And now I can do this:
Note the arrow in above - note VERY careful how the control name is DIFFERENT then the data expression (Description) in this example.
Note VERY careful, I can now place OTHER controls on the report, and reference now:
I can reference Description in the expression, OR I CAN USE DescripitonLEFT in that expression!!!!
As you can see, we need a way to distinguish which control we are referencing here. In fact, some developers i have known as a habit NEVER use the same name for their controls vs the datasource of the control for this reason.
In your case the very same expression, and very same control BOTH have the same name - and thus you can't evaluate the expression of a left(Descripiton,10) against the VERY same control with the VERY same name!!!
So, you have to dis-ambiguate the name and the expression you want. In this case CompanyName. As noted, your left("some control") is the VERY same name as your current control.
Try just re-name of the control you dropped into the report.

Is there a way to use buttons in MS Access to fill in text boxes in a report?

Here's the crux of the question, I have 26 compliance queries to run, in a previous question it was suggested that I should filter a single query, or two, on a single report. I like this idea, and have rewritten the query to pull all available data from all the fields, this query works fine. The report will work fine as well, as it does with a model query that I had coded up beforehand. What I would like to do is this:
The end user is being given an interface in access that is locked down, I want them to click a button, and that button will run the query and send to the text box just the field that is called for.
I have tried doing this through VB using the where clause and aliasing the column being called, this did not work at all. I have the report currently pulling the correct data, but not displaying the dates along side it. But it is filtering correctly aside from that.
So what needs to happen is this : Button click : Query runs, and is filtered for "Compliance Issue 1" and puts the dates in "Compliance Issue 1" in the text box on the report.
Right now... I get a list of names, the correct list of names, but an empty column.
I have tried using OpenArgs, but all it did was fill in the date column with "Compliance Issue 1" not the actual data in that column.
Is what I am trying to do even possible in access, and if so does someone have a reference or suggested starting point.
My background : 6 Months of python coding, 3 months of SQL , and some limited access from 20 years ago.
As noted, using the filter of the openreport is without question the way to go (one would not write a whole bunch of different queries - you can send/have any filter for that report - you can EVEN use a sub query in the filter that you send to the report.
As for displaying values in the report that are not from "rows" of data?
There are two approaches that work quite well.
First up, is you have that launcher form. This of course allows the user to select critrea - maybe even some nice combob boxes. These selections take care and you build up the filter in code that you pass to the report.
As for text boxes to be filled out from that form and inclluded in the report?
If they are static values from the report (say filter options, or even just a notes box that you could type in some text? To display such values in textboxes on the report?
You can directly set the text box data source (in the designer) to the report propter form like this:
=(forms!MyPromptForm!notes)
So, any value you shove into text boxes on the report prompt form can thus be displayed in any text box on the report with the above type of expression. And it does not even take code to achieve this goal. So, you could say with above enter some notes into that text box, and thus on the report, whatever you typed into that text box will now show up in the report. You just drop in a text box onto the report, and set the data source of the text box to the above expression that references the form with the values we want from that form.
The next approach, and I often use this in the case that some value/expression/calculation has to occur for each row. In this case, you can use the reports on-detail format event. This allows you to run code for EACH row of data.
You are free to run ANY code in that event - and that includes after running such code to set a text box in the reports detail section.
So, say the query only had the Hotel ID (PK). This is a lame example, but you could then write this code in the on-format event of the reports detail section.
dim strSQL as string
dim rst as DAO.RecordSet
strSQL = "SELECT HotelName from tblHotels where ID = " & me.HotelID
set rst = CurrentDb.OpenRecordSet(strSQL)
me.HotelName = rst!HotelName
rst.Close
So in above, we assume that a row text box is called HotelID, and then in code we build a whole sql query from scratch, pulled the row data from a table, and then SHOVE/SET the value of the un-bound text box called hotelName.
As noted, the above is a simple example, but we are free to run any code we want, pull any data we want, and set the value of ANY text box for the given detail section ONE row of values.
So, above shows two approaches. The first approach is code free - and you can put forms! expression directly into the report, and the values from that report prompt form will thus show up directly in the report. However, if you need VBA code to run for each row, pull values, walk the dog, and THEN set a text box on that one details row of data, then you are as above shows free to write procedural code in the report that fires + runs for each row of data - and that means you can quite much do anything you want in terms of running code. I mean, even that on detail format event COULD pull values from your report prompt form, but as the 1st example shows, you can shove in forms! expression directly into a text box - and those forms! expressions can be values from a existing form that is open before the report is launched.

Searchable MultiSelect or the best approach

Users of a report have requested the ability to be able to manually enter a code, currently they are are presented a multiselect with all the codes related to the previous parameters.
This is in Report Builder 3.
This multiselect can become quite long so I thought another approach would be a searchable multiselect. Is this possible in any: way, shape, or form?
Could I allow for a cascading parameter (which is the code) to be either selected either through manual typing or another means.
I would add a type-in text parameter (lets call it Search_Code), with a default of % (assuming your data source is SQL).
Then in the data source for the Code list, I would add to the WHERE clause e.g.
WHERE Code LIKE '%' + #Search_Code + '%'
This will restrict the Code list to strings which partially match the Search_Code value (if entered).

Show a Customized Text in the Prompt List

Goal:
Display the text "All State-Province" instead of "All geographies" at the prompt list in SSRS
Problem:
I tried googling around and in the end I don't know how to solve it.
Information:
*Im using SQL server 2012
I don't use Report Server 2012, but in 2008 the following applies.
It depends on how you're populating your parameter,
If you're declaring the values in a list
Right click on the parameter, and change the label text.
or.....
If you're populating from a query then you need to ensure that the value you're using to populate the label returns "All State-Province" instead of "All geographies".
One way round this would be to set up a calculated field on the query used to populate the dataset
something like
=iif(Fields!LabelText.Value="All geographies","All State-Province",Fields!LabelText.Value)
Then use that field as the label.
I see your update..
What I believe you need to do, is set up a new calculated field on your GeographyStateProvince dataset
Call it NewLabelText.
Then use the expression
=iif(Trim(Ucase(Fields!ParameterCaptionIndented.Value))="ALL GEOGRAPHIES","All State-Province",Fields!ParameterCaptionIndented.Value)
Then as shown in my previous screen print, use the new calculated field instead of ParameterCaptionIndented
You can see your datasets on the left of this picture.

My access 2010 database displays parameter query dialogue boxes instead of getting the values from my where clause

I have a database that I've been building and from time to time all of the queries that have paraeters defined by text boxes on a form (driven by the where clauses) do not work. Instead, Access asks me for values in the form of parameter dialogue boxes for all the quires set up to work off the form. I've run into this several times and I've stripped out the last change that I've made and it all functions as designed (until now).
The question is - what is causing this? It's like none of the where clauses function.
Thanks for any input....
Your SQL would be good however at a guess you probably need to specificly declare the type of the paramaters either by using the paramaters dialog box (Not sure where it is in 2010, we are still using 2003 here!) or by using the PARAMATERS keyword (from memory... may not be exactly correct...)
PARAMATERS [forms]![someForm]![someTextBox] DateTime,
[forms]![someForm]![someComboBox] Decimal;
SELECT x,y from tblZ
WHERE x=[forms]![someForm]![someTextBox]
AND y=[forms]![someForm]![someComboBox];