We print database records in rave using rvproject1 and rvdatasetconnection1 and that works.
How to acomplish this in rave:
If Adotabel1.fieldbyname('something').asstring = 'something' then
Rectangle1 on a data band.color=black
else
Rectangle1 on a data band.color=green
Rawn,
I believe you must download the Visual Designer Guide.pdf located here
http://www.nevrona.com/Rave/downloadbe.html. What you want to accomplish can be done in several ways(with editor events, from Delphi code, etc). In the manual you will find exactly how to code the band or datatext onbeforeprint event(Rave Report 'language' is very similar to Delphi). At this moment I don't have the time for making you an example.
best regards,
Radu
Related
I am absolutely new to Delphi and Crystal Reports.
I figured that I can export a crystal report to pdf like this:
crpe.Clear;
crpe.ReportName := 'CoverSheet.rpt';
crpe.ParamFields[0].CurrentValue := '0';
crpe.Output:=toExport;
crpe.ExportOptions.Destination:=toApplication;
crpe.ExportOptions.FileName:='C:\CoverSheet.pdf';
crpe.ExportOptions.FileType:=AdobeAcrobatPDF;
crpe.Export;
(Although this is working, please let me know if I am doing it wrong :) )
Now I have two .rpts "CoverSheet.rpt" and "Form.rpt" and I need to create one pdf out of them in Delphi.
Is there any way to merge two .rpts and export it into one pdf?
The easiest way to do this is to create a container report and to add the 2 reports as subreports. This will work just in case you don't already have subreports in your existing reports. If you have subreports then the only option is to export both reports to separate PDFs and then join the 2 PDFs in one. BTW, there are some free tools that you can use to generate one PDF from multiple reports. Do you need to write this by yourself or external tools will work for you ?
I'm working in a Delphi IDE expert and I wonder if it's possible add new items to the code completion combobox displayed by the Delphi IDE when the user press CtrlSpace
UPDATE:
What I need is add items to the code completion list based in a specified type.
example suppose which I have a type called TMytype, what I want to do is add addional items to the code completion list when the user type a variable of the type TMytype
check this image
I found your question somewhat confusing but if you are in search of credible source on "Custom Live Templates" and the like on Delphi, head to the blog of Cary Jensen here.
Edit:
Looking forward to further improvement of the scope of the question, I suggest here another direction to explore:
Source code manipulation using IOTAEditor, IOTASourceEditor, IOTAEditReader and the like
Some Parsing for sanity check prior to apply any modification.
Adoption of Client DataSet as a format to store data (It's serializable) to simplify the coding of IDE editors.
Perhaps I haven't fully grasped the extent of what you are asking here, but you can add templates simply by going to 'View|Templates' from the Delphi IDE. This then opens a template viewer. Press the '+' icon. It opens a template1.xml document which you can then edit so create your new item.
If you wish to do this programatically, just add an xml file (of the same format) to the ..\RAD Studio\code_templates folder.
I have various hierarchical structures and would like to allow navigation around then using an editor like the Microsoft one found in the explorer address bar below. Is there such a Delphi component? (Paid for or free)?
TAdvExplorerTreeview from TMS might be what your looking for:
http://www.tmssoftware.com/site/advexptree.asp
Haven't tried by myself but Roy Klever's PathViewer component looks quite interesting.
I have spent the morning writing such a control. Actually, I wrote a very generic, completely virtual base control, from which I later derived a directory browser control:
The source code is published here
Here are some images:
Style := bbsClassic
Style := bbsFlat
Style := bbsHeader
Style := bbsThemed
Style := bbsCommand
Not sure about anything exactly like that but the BergSoft Next Collection includes a path control similar to that (useful for breadcrumb trails and the like)
http://www.bergsoft.net/component/next-collection/overview.htm
It's free providing you don't want access to the source. Source is pretty cheap though and it's a one off cost that'll get you all future updates.
Exist any similar component to theme a stringrid like the ThemedDBGrid component compatible with delphi 5.
Surely you could take the source from ThemedDBGrid and re-work it for a stringgrid? Or you could use a DBGrid and wrap your strings up so that they can be accessed through a dataset.
TMSSoftware's Advanced String Grid is pretty popular:
http://www.tmssoftware.com/site/advgrid.asp
You could also look at skinning components that skin the built in grid, such as:
http://www.almdev.com/
i made a simple form designer in delphi, drag and drop a button on the form and it draws it, but the thing is i cant save/load this project since i dunno how to, is there anyway that i could be abel to save it to .rc file and load it from there?
That depends how you programmed your form designer. In forms created in Delphi's designer all components (and subcomponents) are referenced from TForm.Components array property. All controls are also referenced in TForm.Controls array property (if you remove an container control, all it's subcontrols are destroyed too).
If you have followed that pattern, all you have to do is monitor additions to the TForm.Components array (maybe using an overriden TForm.Notification method) and using this data to build your persistent form's file.
The VCL contains methods for using its builtin DFM support. There is a sample in the Delphi 2009 documentation for ObjectBinaryToText; I guess this works for D7 too. And IIRC there already was a code fragment for ComponentToString in the D5 help - search for ObjectBinaryToText.
Delphi stores form layout in *.dfm file. You can use it's structure to save your projects. File is textual and readable by humans. It is not hard to parse file like that rading one line by one. If you need more help, ask for it.
You can use something like delphi .DFM. Counting all objects and then read their attributes and write them into a file. Example Code:
For i:0 To Form1.ComponentsCount-1 Do Begin
// Read Component Attributes And Write Them In Your Format
End;
If you just want to save the form you designed in your designer, use something like TFileStream to create the RC file when the user saves. You might be better off with your own file format for your forms, with the option to export as an RC file, as RC files arent really meant to useful for storing any design time info you may need.