Mathematical expression in Crystal Reports - math

I have two fields in a Crystal Report. Open and InProgress. Each field is a result of a separate command.
In my report, I have bound {Open} and {InProgress} to a text field. I want to create a third field with an expression like {Open} - {InProgress} that will calculate the difference.
Can I do this with such an expression, if yes how can it be acomplished?

I found a decent solution. If there is a better way, I will gladly accept that as the answer.
What I did was create a Formula Field, then put the expression I had above {Open} - {InProgress} into that field. I can now use the formula field in the report.

Related

How Convert amount to rupees and paise in words in Devexpress Xtrareport

I want to convert the summery of devexpress report to words. I found a question 'convert amount to rupees and paise in words format in c#' here convert amount to rupees and paise in words format in c# But i dont know how to use the code for devexpress report to convert the number to word? Please help me how to do.
if you're using the end-user-designer (not the visual studio), i may suggest to register custom function 'RupeesToWords' for binding expressions.
in this new function implemetation you may write your custom code.
in the XRLabel's summary expression specify the expression like this
RupeesToWords(sumSum(Value))
Assuming you were to display this value in an XRLabel, you could handle the XRLabel's BeforePrint event and set the Label's text to the result of the code you've already found for the conversion process.

Display label based on, field on one data-source (singular) being within another data-source fields many

I am still learning, and looking for help on how to display a label based on one data-sources field value, being within another data-sources field value list.
I have one calculated table, displaying rows of documents within a folder, and wish to use a field representing the document number in that data-source, so that if it's ANYWHERE within another tables field it displays my label.
I've been trying to use projection as I think this is how to achieve it.
I can get it working based on both the current #datasouce.item.fieldnames but need it to base the calculation on all possible numbers in that tables field (Image below should make it easier to understand).
I expect that it has something to do with projections, but can't find anything within the learning templates or anywhere else to resolve the issue.
I think the following should work for you. For the 'Reserved' label have the following binding for the text property:
(#datasources.project_quotes.items..quotenumber).indexOf(#widget.datasource.item.Qnumber) !== -1 ? 'Reserved' : ''
I would suggest alternatively just to include a field in your calculated datasource and making the determination in your server script.

Calling pentaho report from another pentaho report

I need to a call a pentaho report header of PRPT from another PRPT(without using subreport).
Exact requirement:
Report header part will change dynamically(Label position , number of labels , Number of text and all the alignments). So will give one prpt to the user to design it depends on their request. Once they done with their design part they will save that prpt. That saved prpt should call in report header of the main report on the go. Kindly guide us how to achieve this.
As far as I know, this is not possible without coding. If you have your own reporting engine embedded in your application you can achieve that, generating your own prpt definition and using it then in some point.
In the other hand, if you don't wanna code, you can change all those things dinamically using the expression properties, and apply the format required based on the request parameters.
Specify the parameters you need in the report to calculate the header.
Select the item you need to be dinamically customizable
In the value attribute choose the plus sign (+) and specifiy the formula you need to get the desired format, eg: in the color value you can specify something like
=IF([PROVIDER]="STACKOVERFLOW";"orange";"")
You must define all the attributes you need like visible, positions, alignments, a long and hard but nice job.

Creating own Report in Odoo: t-field for date, Customer ID etc.?

First of all I'm kinda new to Odoo and I'm trying to understand some Basic logic. I created my own Report based on the Basic Report of Odoo.
There are a lot of fields like t-field="o.date_invoice" or t-field="o.partner_id etc. which work really fine but where can I find all functions? Is there any list?
For Example I Need a Field for the order date and for the print date or for a Customer ID.
With a t-field attribute you can access and print fields from the actual model or from a related model, for example with the following element you can print the content of the phone column (field) of the actual record:
<span t-if="o.phone"
t-field="o.phone" />
Explanation of t-field in the documentation:
The t-field directive can only be used when performing field access
(a.b) on a "smart" record (result of the browse method). It is able to
automatically format based on field type, and is integrated in the
website's rich text edition.
Check this link for further information if you want to build reports and this one, where you can read about some the elements that you can use in Qweb
In addition, you can check here a list of some attributes that you can use in a Qweb template

Change the y-Position of a Text field in Crystal Report.

I´m trying to create a Report with a lot of Fields.
I´ve some fields they could be empty. I´ve suppressed these fields with the formula.
The Problem is how can I change the y-Position of the next field.
Currently I have an empty field in my Report an that looks not so good.
I´ve seen it is possible in formula editor to change the x-Position of a field.
Can I do this with the y-Position too?
Regards
Thomas
Either create a formula where you use the different options, and based on if they have a value don't show them, or create a different section for the fields that could be blank, and suppress them when empty

Resources