Dec 3, 2017 - Look at most relevant Fastreport for lazarus websites out of 15.8 Thousand at KeyOptimize.com. Fastreport for lazarus found at linkedin.com,.
Hi, I have a print dialog, shown before the report is generated. The user can make some selections. Based on that, I want to set the value of a global variable, then use that variable to decide if a column of data must be visible or not. I've used File - Variable List to define a new variable (just the name). I then double clicked on a header memo field and enabled the Script checkbox, and typed in the following code in the Script box: if HideKlas = '0' then Visible:= True else Visible:= False; In my.pas unit I temporarily tried to set a hard-coded value of the 'HideKlas' variable to see what happens in the report.
I tried both the values '0' and '1'. If FRPrint.PrepareReport then begin FRPrint.Variables.Values'HideKlas':= '1'; // for testing only FRPrint.Preview:= FAfdrukForm.PrintPanel; FRPrint.ShowPreparedReport; end; No matter what I do, the header (memo) field is now always hidden. Changing the hard-coded value of the variable doesn't seem to make any difference. Before any of the above script changes the report worked, and the header text was visible. But I can't seem to make that visibility a dynamic option.
Any tips would be much appreciated. Regards, - Graeme - - fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal - Lazarus mailing list.
On 2015-06-30 14:03, Graeme Geldenhuys wrote: If FRPrint.PrepareReport then begin FRPrint.Variables.Values'HideKlas':= '1'; // for testing only FRPrint.Preview:= FAfdrukForm.PrintPanel; FRPrint.ShowPreparedReport; end; I've even tried removing the 'HideKlas' variable completely, then do something like this in the.pas unit. (FRPrint.Pages.Pages0.FindObject('memo5') as TfrMemoView).Visible:= False; FRPrint.Preview:= FAfdrukForm.PrintPanel; FRPrint.ShowPreparedReport; But not even that works.
In this case the memo5 is always shown, as if I didn't have that extra line of code. Regards, - Graeme - - fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal - Lazarus mailing list. On 2015-06-30 14:03, Graeme Geldenhuys wrote: I've used File - Variable List to define a new variable (just the name). Digging deeper into the LazReport code, I finally found the solution. Even though you setup a variable, you must not refer to it via the Scripts.Values or Variables.Values properties. Instead you use the Values.FindVariables method. FRPrint.Values.FindVariable('HideKlas').Field:= '1'; For more details of what I've done, see the Lazarus Forum post.
Now this begs the question. What the hell does Scripts.Values and Variables.Values actually do?
Regards, - Graeme - - fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal - Lazarus mailing list. On 2015-06-30 14:03, Graeme Geldenhuys wrote: I've used File - Variable List to define a new variable (just the name).
Digging deeper into the LazReport code, I finally found the solution. Even though you setup a variable, you must not refer to it via the Scripts.Values or Variables.Values properties.
Instead you use the Values.FindVariables method. FRPrint.Values.FindVariable('HideKlas').Field:= '1'; Those are not global variables. They are report variables. I think the easier way to modify global variables is through the frVariables object ej. FrVariables'HideKlas':= 1; For more details of what I've done, see the Lazarus Forum post. Now this begs the question.
What the hell does Scripts.Values and Variables.Values actually do? They do the same thing they do for any TStrings list, ie. Assign values to supposedly existing 'names', for they to work you have to have a list like: name1=value1 name2=value2 etc. But in LazReport this TStrings list functionality is not used.
Report.Variables holds the list of variables and variables categories that you have defined in the Report (usually using the report designer gui). Variables categories can only be used as distinctive tags for a group of variables, and I guess that is the reason why there are a Values object too, which btw has a list of only variables.
I was not able to find a Report.Scripts property or field, maybe you mean Report.Script? In that case supposedly it holds the script to be run as 'BeforePrint' script. Jesus Reyes A. Lazarus mailing list.
Hi Jesus, Thanks for taking the time to reply. It is much appreciated. On 2015-07-01 21:47, Jesus Reyes A. Wrote: Those are not global variables.
They are report variables. In the context of a report, they are the same thing to me. You define a variable via the Report GUI Designer (I still don't know how to do it from code), that variable is then available for use anywhere in your report. Ie: gloabal;-) I think the easier way to modify global variables is through the frVariables object ej. frVariables'HideKlas':= 1; I'll take a look at that, thanks. But in LazReport this TStrings list functionality is not used.
You lot me there. So if they are not used, why do those properties still exist in TfrReport? I was not able to find a Report.Scripts property or field, maybe you mean Report.Script? Sorry, it was a typo. I meant Report.Script. As far as I understand, LazReport is based on some open source version of FastReport.
Due to the lack of documentation (or updated documentation) of LazReport, I looked at the documentation for FastReport and tried to use some if what it suggests. But it seems much of it doesn't translate to LazReport. Here is the URL of FastReport I looked at.
I worked through the whole 'Working with a list of variables' section. Regards, - Graeme - - fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal - Lazarus mailing list. En Wed, 01 Jul 2015 17:52:57 -0500, Graeme Geldenhuys escribi贸: On 2015-07-01 21:47, Jesus Reyes A. Wrote: Those are not global variables. They are report variables. In the context of a report, they are the same thing to me. You define a variable via the Report GUI Designer (I still don't know how to do it from code), that variable is then available for use anywhere in your report.
Ie: gloabal;-):) Yes, you can consider them as global if you so desire. However they exists only in your report, where they were defined. The frVariables list however can be used by n-number of reports in your application. This is why I think of them as 'global' I think the easier way to modify global variables is through the frVariables object ej.
frVariables'HideKlas':= 1; I'll take a look at that, thanks. It seems possible to have report and global variables named the same, however I have not investigated who takes precedence, I would guess report variables are found first, but I'm not sure TBH. But in LazReport this TStrings list functionality is not used. You lot me there. So if they are not used, why do those properties still exist in TfrReport? They are not specific to LazReport, this is basic functionality of every TStringList, just because they descend from TStrings.
Values and Names are public properties of TStrings, how can one hide those properties in a instance of TStringList?, you can't, so LazReport also can't.:D. I was not able to find a Report.Scripts property or field, maybe you mean Report.Script?
Sorry, it was a typo. I meant Report.Script. As far as I understand, LazReport is based on some open source version of FastReport.
Due to the lack of documentation (or updated documentation) of LazReport, I looked at the documentation for FastReport and tried to use some if what it suggests. But it seems much of it doesn't translate to LazReport. Yes, probably, however one could find that they have also many things on common.
Here is the URL of FastReport I looked at. I worked through the whole 'Working with a list of variables' section. frxReport1.Variables'My Variable 1':= 10; and likewise Variable:= frxReport1.Variables.Add and Variable:= frxReport1.Variables.Insert(1); Wouldn't work on LazReport as here frxReport1.Variables is just a mere mortal TStringList which already have a default property: Strings indexed by integer, This part is in LazReport a little mess:), I think FastReport guys noted this and they fixed the situation in FastReport. Regards- Graeme - - Usando el cliente de correo de Opera: - Lazarus mailing list.
A supercell thunderstorm moving along a warm front enhanced by an outflow boundary from an overnight mesoscale convective system produced a violent tornado from northeast Missouri into west central Illinois. The supercell initially produced a funnel cloud over Fort Madison, Iowa then moved into west-central Illinois and produced the F4 tornado. The weather map on the morning of May 13, 1995, showed low pressure in eastern Kansas with a warm front extending through central Missouri.
During the afternoon, low pressure moved northeast to near Fort Madison, Iowa with the warm front extending east toward Macomb, Illinois. The supercell thunderstorm that eventually spawned this violent tornado developed over Clark County, Missouri at around 3 pm. The storm produced a funnel cloud over Fort Madison, Iowa then continued to track east along the north side of the warm front, before spawning the tornado just after crossing the Mississippi River into west central Illinois.
The tornado started as an F0 when it initially touched down south of Niota, IL then caused F3 damage by the time it reached Dallas City, IL. Eyewitnesses saw three separate funnels at one point. The Dallas City school received major damage and one older house was blown off its foundation. Several mobile homes were destroyed and a car was rolled six feet up a hill. The tornado proceded to the east northeast and continued to strengthen.
About one mile northwest of Disco, IL the tornado caused F4 damage. At this time the tornado was on the county line between Hancock and Henderson Counties in Illinois and struck the Maxine Clover farm site. The Clover brick home was nearly totally destroyed with only a few parts of walls still standing.
The tornado appeared to be about one-half mile wide. It continued to the northeast where it struck the Dick Edmunds farm site.
The Edmunds seventeen year old brick home was destroyed along with most of the other farm buildings. Sixty animals had to be destroyed.
As the tornado crossed highway 94 just south of Terre Haute, IL, it only produced F0 to F1 damage, but still appeared to be about one-half mile wide by the scoured dirt path it ground into the area farm fields. At this time the tornado was approaching the small community of Raritan, IL. The Wendell Shaner farm site, located one and one-half miles southwest of Raritan, was hit at this time. Shaner was thrown about 70 yards out of his home into a field east of the house. He received broken rips and other internal injuries. The Shaner farm site was totally destroyed. Where the home had been located there was nothing left but the basement stuffed full of debris.
Hundreds of dead hogs were scattered along and up a hill to the northeast of the home site. The tornado then clipped the southeast corner of Raritan where damage was occurred along and south of Main Street. The Carl Huss home was totally destroyed while he was in the basement. Huss received a large bruise on his back when cement blocks were pulled in from the west side of the basement as the home was shredded off its foundation. The 137-year-old farmstead of John and Bev Livermore was also hit at about this time. Livermore was in the basement with his two grand-children when the tornado struck.
The home heating fuel tank, located in the basement, was sucked up and thrown 50 yards away from the house. Livermore literally had to lay on his grandson to keep him from being pulled out of the basement. The home was totally destroyed.
The Richard Likes home, also on the east side of Raritan, was totally blown off the foundation and pushed 50 yards into the field to the east. The Likes were not home at the time. This is also about the time the tornado appeared to reach its maximum width of 0.6 miles. Tornado northeast of Raritan, IL near Roseville, IL (photo courtesy of NWS) One to two miles northeast of Rariton, the large tornado either weakened or dissipated.
F0 to F1 damage and debris continued across Warren County from either the weakened tornado or subsequent tornados. The tornado finally exited Warren county about six miles southwest of Abingdon, IL. This large tornado produced no fatalities and only one injury was of a serious nature. Damage in Raritan was estimated at 2 million dollars. Twenty five homes were destroyed, 48 homes were damaged and 10 farmsteads received heavy damage. Seventy five other homes received damage of a lesser nature. Hundreds of farm buildings in the area were damaged or destroyed, and hundreds of head of livestock were killed by the tornado or later had to be destroyed due to injury.
One to two miles northeast of Raritan the large and violent tornado weakened. The storm survey showed F0 to F1 damage continuing across Warren County before ending roughly 6 miles southwest of Abingdon, Illinois in Knox County. Raritan, IL tornado damage from May 13, 1995 (photo courtesy of NWS) Tornado damage in Raritan, IL (photo courtesy of NWS) Radar images from NWS St. Louis at 4:48pm (CST) (photo courtesy of NWS) The radar data is from NWS St. Louis since the NWS Quad Cities radar was not yet archiving data. Note how 21 provides incomplete volumetric data and only at 6 minute intervals.
The 0.5° beam elevation at this storm was 14,500 ft, so the details of what was ongoing in the lower part of the storm are not available. However, the SW data even at this level seems to track well with the timing and location of the tornado. (NWS Quad Cities Weather Home Companion, Spring 2005).