I'm trying to make a Crystal Reports 11 report off an Oracle database that's grouped by user. I've got over one thousand users. I want to create a parameter field that prompts the person to select which users they would like to view the results for. However my parameter selection field is only showing 221 of the possible users. The users appear in alphabetical order because of the SQL command's Order By statement. I'm wondering if there is a limit to the number of dynamic default values that a parameter field can store. Any help with this would be great.
The default limit in Crystal 11 appears to be 1000 (held in the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 11.0\Crystal Reports\DatabaseOptions\LOV\MaxRowsetRecords), so your problem may lie in the construction of the parameter field itself. Make sure it is a dynamic parameter field that will query the database when used, as the odd number of values shown makes me think this was the list generated when the report was first run and saved, and therefore a static parameter list.
I tried to reproduce your situation using a database table with 5,000+ records.
I created a dynamic parameter (Crystal Reports XI R3, full version) on this field. It generated a unique list of values that appeared to be about 1,000 (I started to count it, but estimated its total size based on the scroll bar's position).
I added the registry entry HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite \Crystal Reports\DatabaseOptions\LOV\MaxRowsetRecords (String) and set its value to -1.
With the registry entry change, the LoV included all values.
When the LoVs had the record limitation, it appeared to sample values from each letter of the alphabet indiscriminately. Maybe this is what you are encountering.
221 sounds awfully low to be the default selection limit, at least to me. But there is a way to increase the number of records that these dynamic parameters pull in. It involves editing the registry.
See Here
The following is for Crystal Reports 2013.
Add a new registry entry under:
For 32 Bit computer
HKEY_HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\DatabaseOptions
For 64 Bit Computer (Wow6432Node sub note)
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Suite XI 4.0\Crystal Reports\DatabaseOptions
Add a new key at that level called: \LOV
Add a string called MaxRowsetRecords
Set the value to whatever limit you want, I have selected 100000 in the development. (0 or -1, meaning all values, is no longer supported. )
After making changes to the registry, restart the affected service or application as required.
Just to clarify that the MaxRowsetRecords value does NOT refer to the number of distinct parameter values you can select from. It is the maximum number of records that Crystal will look at from which it extracts the dynamic parameter values. Most likely if you look at your query you will find that there are 221 unique values in the first 1000 records. Apply the registry change to a larger number and you should see more parameter values from which you can choose.
Related
Is it possible, if one does not want to take the AutoValue, to take as default value for a Large Integer, or even normal number, the largest value already used for this from the column and add to it?
I need an increment of 4, starting with a number I choose.
I'm using version 2016 of Office.
I found several possible solutions, which I've entered into the expression generator of the default value at Field Properties:
CODE: SELECT ALL
=Max([MyID])+1
Or
CODE: SELECT ALL
=DomMax("MyID"; "Table name")
I always get the error message:
Unknown function 'DMax' in the validity expression or default value in 'MyID.TableName'
I came across the tip that the references under VBA Editor --> Extras --> References must be correct. Here, however, I haven't the slightest idea which of these I would have to activate, if this is the problem at all.
The PrimaryKey of a table can sometimes be used as a part number in a Parts table or a userID in a Users table but otherwise is a number the user of a database should never see and certainly not manipulate. This is the first reason I suggest solution 2.
Solution 1. In Access just like with any other database I have seen that uses SQL, You can create an AutoNumber that increments by 4 using the Data Definition Language part of SQL. Maybe the Access designers considered changing the increment too rare or too advanced to put in the menu system. However, Altering the increment is not hard just open the query designer and go to the sql tab and type in appropriate SQL.
In Access 2007, how do I change the Auto Increment value?
First, Create your table as normal but don't insert any data. Then open the query designer, and open the sql pane (In this case it doesn't matter what you have in the design view as you are over writing any SQL), type
ALTER TABLE MyTableName
ALTER COLUMN MyAutoNumberColumnName AUTOINCREMENT(1,4);
The sql pane's ribbon should auto select Data Definition Language.
Run the query and solution 1 is done. When you enter Data in the table MyAutoNumberColumnName will start at 1 and increment by 4.
Solution 2: Don't use the primary key. Instead create another variable and display it. This is one example why data should be entered using forms. In the form's BeforeInsert Event calculate the variable and set it's textbox.
Private Sub Form_BeforeInsert(Cancel As Integer)
Me.txtBoxAlternateIDColumn.Value = Nz(DMax("MyAlternateIDColumn", "MyTableName") + 4, 1)
End Sub
'NZ handles the annoying case where the table is completely empty
I've used Solution 2 a couple times and I don't let the person doing data entry even see the alternateID textbox on the data entry form.
You can also use a Create Table statement in the DDL
Here is a youtube example of solution 2: https://www.youtube.com/watch?v=ZOg4P6v5ewA
I am still fairly new to SSRS, and I do not know what I need to/can provide as examples to help clarify my issue.
I am developing an SSRS report that accesses a NAV database and generates a report for an equipment number. My task is to generate a master report that can print multiple of those kind of reports(currently 10 max). I am using sub-reports to get the content that I need for an equipment number.
I am looking for a way to make this dynamic, where I can generate 1 to n sub-reports based on how many values were picked for the multi-value parameter. The end result should be one PDF file that contains the full report for each equipment number listed. I am trying to only use SSRS.
I have seen where I could hide sub-reports then make them visible if a condition is met, but this isn't the functionality that I am looking to use. So, what would be the best way to dynamically generate sub-reports based on a multi-value parameter?
I figured it out. I made the sub-report parameter equal no value. I made the main report with a parameter that can select multiple equipment numbers, a list, and a data set which filtered down to the appropriate equipment numbers to avoid duplication. I made the sub-report object in the main take in the cell value from the list equipment number. When the list proceeded to the next row, it copied all of the objects in the box area.
Recently I created a form which loads some records from an SQL (linked) database.
I want to display some field values (which are decimal numbers - 30,2 in the sql server).
The values are loaded in the form and displayed with a comma for the decimals and a point as a 1000 separator like this: 5.222,55. (Language settings on the computer).
Though the thing is, when I change the 5 before the point into any number then the value gets truncated and it sees the point as the decimal separator. So for example, if I only select the number 5 on the 5.222,55 number (so I leave the point) and then change it to a 2, the value is changed to 2,22.
Though when I select the whole number or the first number AND the point then it changes correctly. So how can I get this right? The easy way is to just select the whole number on changing but I just want it to work in every way. Perhaps I can achieve it with VBA? I tried setting the format option (back in access 2000 I believe I could set the text field to long integer or currency or something but I cant find this in the access 2013 field properties).
Additional information:
I am linking with a SQL server 2012,
The linked table in Access sees the fields record source (the SQL fields) as short text (while they are decimals in the SQL server)
Access cannot handle a 30,2 decimal, thus it is converted to text by teh ODBC driver.
So, either convert back and forth between text and numerics with Str and Val (the C* functions won't do), or change the data type of the field in SQL Server to, say, Money (= Currency in Access).
In an alternate application, the user has the ability to update their address and phone number. When these are changed, three fields will update: Old Value, New Value, and Field Changed. If the Field Changed was the address, I need to create two report pages - one with the old address and one with the new. However, if the Field Changed was the phone number, I only need to create one report page for the current address.
My initial plan was to do a Union that would have one record with the Old Value and another with the New Value. This should work when only the Address has changed. However, it won't whenever the Phone Number has changed. I assume I need to do some sort of case statement, but I'm not really sure if this is the right approach. Sorry if the data is a little confusing (I didn't design the data structure. This was provided by our professor's assistant). If you need more information, I'll try to provide it.
I'm not looking for exact SQL, but I am wondering if I'm approaching this the correct way.
What do you mean by a 1 or 2 page report? Are you outputting to a CSV, PDF, XLSX or something eles?
If you need to do this through "pure" sql I would recommend a stored procedure that is given a value stating whether it's the address or phone number that is being updated. It can then do the update and you can simply do an if statement which determines which report to run and return.
I'd recommend handling it programatically if possible. Have your code run the sql update and then call the appropriate function within your code to get the report you need. You can then easily re-use the code for that report in other ways.
I want to build a report that is completely static in size and shape. I'm attempting to mimic a hand-entered report that someone in my organization has been building from a word doc for years.
The critical piece appears to be fixing the number of rows that are produced in the various Table grids that fill the page. I would like them to always contain a set number of rows, whether data is present or not. It would seem that if I can just fix the size my tables, then all the other elements will not be forced to move because of stretching repeater sections.
All my grids are backed by stored procedures, so I'm open to SQL tricks as well.
Sorry i did miss-read the question.
If you know how many rows you need to return (say 20) maybe you could pad some bogus info into your records returned from the stored procedure. You might be able to count the records your query has returned before you send them back, and if you have less than 20 add some bogus ones to the record set, put something like 'NonDisp' or something in them.
Then in the report put an iif statement into the cells that checks for this bogus info, if it is found change the cell to display nothing, otherwise show the valid values
Not a direct answer, but perhaps a workaround you might consider: perhaps you can insert a page break after the table grids that have dynamic sizes, so that all elements that follow it have a fixed position (relative to the top of the page).
Add a parent group to tablix with =Ceiling((RowNumber(Nothing)) / 10000) expression. (10000 or whatever is required no. of rows)
In page break properties of group, check box for insert break between groups, leave the bottom boxes un-checked.
Optionally, we may chose to set hidden property true for text boxes added because of new parent group.
In tablix properties, check box for "Keep together on one page".