Method from a data bind (DevExpress Report) - asp.net-core

I am creating a label report for bank check printing. I would like to know which component of the toolbox I can use to create a method (which I already have) to convert the numeric value to value in full.
Follow the design screen.
Report

I think you could place an XRLabel control onto the report for the text value and handle its BeforePrint event to invoke your method for converting the numeric value to text.

Related

Can I change the column showing in the same report through a button?

I have a report that opens from like 7 different forms, and I wanted it to show a bit different from each one (not by much, just 1 column).
Is there a way that the report can show different columns from each form or do I have to create the same report 7 times?
To achieve this I would make use of the OpenArgs Property.
Use VBA to pass value through this property to the report. For each different button i would pass a different value Ex. ("ThisLocation", "ThisOtherLocation", "ThisRandomPlace", etc). Then based on the value that is passed in, I would create hidden expression for the columns you don't want to show on "said version";
This solution will create the allusion of 7 different reports, but be One that shows data based upon a value you pass undeneath that the user will never see or have to enter. See below for more information on the OpenArgs Property.
https://www.fmsinc.com/microsoftaccess/Forms/openargs/index.htm
As an alternative to Chance Finley's answer, I suggest passing the values in a multidimensional public array. Making it public enables passing the array within multiple userforms.
Each time you want to show different information in the report, you can overwrite it with the information in the array.
Here you can see how a public array is created:
VBA Public Array : how to?
Best regards

Why did I have to manually set the .value from the .text on losing focus in an unbound textbox

I have an unbound textbox to accept the delete older than: number of days. It is in the report header. I set it to 30 days but I want the user to be able to change it. I was banging my head trying to figure out why entering 40 was not being accepted and it reverted back to 30 every time. I finally decided on using the lost_focus event to set .value to .text. That worked.
Further research showed that when the textbox get's focus text and value are both the same, 30 in my case. Changing the number in the text box to 40 shows the values of text at 40 and value at 30. Unless I specifically set Value to the value of text Access changes text to the value of value. This is different behavior than other places in Access such as forms.
Can anyone tell me why this might be? I can't find any setting that might do this. Is it because it's in a report header? what is the difference between this and every other text box I've ever used?
From a "best practices" viewpoint, Access Reports are not intended to be used interactively despite the ability to manipulate some unbound controls. Although workarounds can be implemented that function sufficiently well, such solutions are often incomplete and buggy and function differently depending on the active view: Report View vs. Print Preview. Appropriate design patterns include using Access Forms for specifying report options which then open the Report in a static configuration.
This may not satisfy the question "Why?" if seeking a deeper answer as to why Microsoft implemented inconsistent binding behavior in Access, or why they allowed interactive controls in reports at all if they don't behave the same way as in forms. But Access has plenty of other quirky behaviors that have no known/published explanation.
Regarding the priority of the Value property updating the Text property (and not vice versa): Value is the key field because it contains the actual data for the control (bound or unbound). Although it is natural to have a single control for both display and input (uh, that's how almost all controls work), the processes of displaying data and parsing user input are two distinct functions. The visual representation returned by the Text property can be manipulated using the various formatting properties, and technically could display an incomplete representation of the underlying Value data. If there are any conflicts between the stored Value property and the Text property, it is natural that the existing Value property has precedent.
My guess is that the automatic binding behavior was "relaxed" for reports to allow more flexible custom reporting output. First consider an Access Form in Datasheet view: An unbound Form control shows the same value for all records. Even if the control is edited while on a particular row, the updated value is displayed for all rows. The same control object is essentially repainted for each row and there is no concept of individual instances of the control that can hold different values. Bound controls have built-in code that repaint the control with data from the particular row, but there are still not multiple instances each "holding" the individual values. The visual output differs from an intuitive object-oriented paradigm where our minds what to assign each visual row its own in-memory instance of the controls--it just doesn't work like that in Access.
Unlike the Form behavior just described, the Report's Print Preview (and actual printed output) allows unbound controls to display different data per row using the Detail_Format() event. Within the Detail_Format() event, one can set the Value property of a control at which time the Text property is automatically updated according to various formatting properties. This update Text is then output for the current row. Perhaps (just guessing) that this behavior would not function properly if the Text property updated the value property. I suspect it would cause recursive events during report generation. Because reports are not meant to be interactive, relevant text-input parsing code was "disconnected" so that it doesn't behave like on a form.
All that explanation doesn't make Access any less frustrating nor remove its limitations, but at least learn to adapt and design things in the "Access-esque" way rather than fighting it.
your best bet is to design a form with the unbound combo boxes and have your data displayed in a subreport. I like to design my reports so that when values are updated the query for the recordsource of the report is generated doing this requires 2 queries to exist, one with all data possible and a filtered one as subreport recordsource. This will control the data for printing and also allow users to close or navigate away from the report and return to the data later.
Private Sub ComboBox1_AfterUpdate()
Dim Query1 as Object
Dim Temp_Name as Variant
Temp_Name = SubReport.SourceObject
SubReport.SourceObject = Empty
Set Query1 = Me.Form.Application.DBEngine.Workspaces(0).Databases(0).QueryDefs ("SubReport_Query")
Query1.SQL = "Select * Unfiltered_Query WHERE Field1 <= " ComboBox1 & ";"
SubReport.SourceObject = Temp_Name
End Sub

Report Builder 3.0: How do I specify the dataset for this textbox?

I made a simple query to return 1 field. One of the fields is the user's input.
Item (input)
Description (return value)
I now want to use the returned value in a simple textbox on the report, but it's giving me a scope error. Makes sense, but how do I tell the textbox which dataset to look in (there are multiple datasets)?
If you right mouse click on the text box you can create a placeholder.
You can then specify the value of this placeholder to be the required value from the dataset.

can grow field object not working in crystal report

I am working with crystal report in visual studio , the report contains data from the data base . the Problem is that the field object height in the report it is fine for short text length but for long text some characters that exceed the field object height will be hidden.
I have been used can grow property by checking it in the format object window but it didn't work the section height didn't increase automatically to wrap all text .
please how can i solve this problem ? any help would be appreciated
thanks in advance
In crystal reports, create a new formula. (it can be done by right-mouse clicking on Formular Fields in the "Field Explorer". In this formula field, drag and drop the notes field so the formula would look something like this {Command.Notes} or {TableName.Notes}. Then back in your report, right mouse click in the Details section and select Insert --> Text Object. Then drag and drop that newly created Formula field into the newly created blank text object.

change value of field dynamically (OpenERP)

lets say I have a char field under osv.osv_memory
I generate a dynamic form (in "dialog" window) via the fields_view_get method containing this field.
During the generation of the dynamic form, how do I set the value of this field so that when the form is displayed it will contain this value (the value itself depends on the type of processing).
default_get works but only on initialization.
I can change attributes of the field such as readonly, string etc...
But the value itself need to be able to change.
If your osv.osv_memory object is opening from osv.osv, then first create a record of osv_memory object and try to open this record in the wizard. you will not need the default_get function now to load the data to the wizard