Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CrystalReport - variable from program

Status
Not open for further replies.

Asia001

Programmer
Jan 19, 2005
16
PL
Hi,
I have code:
// PageHeader

((TextObject)pozostaloDoRozliczenia1.ReportDefinition.Sections["Section2"].ReportObjects["Text1"]).Text = dateTimePicker1.Value.ToShortDateString();

I have value dateTimePicker1 in report but only on first page, next page have empty place, what can I do?
I want to this value on all page.

Asia :)
 
What do you want the field to do? It can probably be done better some other way.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
OK! I want to get:
Myke earn for 12-01-2004 to 12-10-2004:
//records with earn
Date give me user in aplication.
 
You probably need a running total, which can include this sort of test.

Right-click on a field and choose Insert to get a choice of Running Total, Summary and Grand Total. Or else use the Field Explorer, the icon that is a grid-like box.
It is also possible to get get totals using a Formula Field, which can contain a Variable or a Directly Calculated Total.
Running totals allow you to do clever things with grouping and formulas. They also accumulate for each line, hence the name. The disadvantage is that they are working out at the same time as the Crystal report formats the line. You cannot test for their values until after the details have been printed. You can show them in the group footer but not the group header, where they will be zero if you are resetting them for each group.
Summary totals are cruder, but are based directly on the data. This means that they can be shown in the header. They can also be used to sort groups, or to suppress them. Suppress a group if it has less than three members, say.


[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Hi
I am sorry but I don't understend You. I don't see relationship. I have variable from programs. I want to get it in report. Program asked user about two date, next in report in TextObjects are two value from program(two dataTimePicker value).
I hope that we will understand.
 
I'm suggesting a different method, better than variables.

If a variable gets cleared on the next page, there is probably something in the page header or footer that clears it.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Make sure you have your text object placed in the page header, not the report header.

-LB
 
Hi,
It is in page header. I am sure. I can't use Madawc's method becouse I have textBox, no field and I don't know how value from program get in report field.
So if can tell me in detail.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top