Can view report in designer but not in application
Hi,
I've designed a report and I can view it in the designer (F9) with no problems.
But when I run the report in my application (call the ShowReport method), I get a single, blank, page as the output.
Any suggestion as to what I am doing wrong?
- Niels
I've designed a report and I can view it in the designer (F9) with no problems.
But when I run the report in my application (call the ShowReport method), I get a single, blank, page as the output.
Any suggestion as to what I am doing wrong?
- Niels
Comments
typically Frxreport1.loadfromfile('path&filename.fr3');
frxreport1.showreport;
Please when you post tell us what build and level of fr you are using what ide and a code sample of where you are having your problem.
Sorry - it's just that there is so little code involved it is almost untrue! [img]style_emoticons/<#EMO_DIR#>/rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0" alt="rolleyes.gif" /> I literally just call ShowReport on the report component... I've not loaded the report from disk, I assumed that if I designed it by double-clicking the report component in my datamodule that the report design would be stored in the component (i.e. in the dfm file), and thus could be executed directly. I don't particularly want to have to distribute a separate .fr3 file with the app. It's the latest FR, only bought a week or so ago, Enterprise version. Delphi 7 IDE.[/img]
a statement like above tells us nothing
stable version or daily build and build no.
if you saved in the dfm
are you calling the correct report component.
ie if you designed using frxreport1 you must call frxreport1.showreport; from the same form
not frxreport1 from another form.
is your masterdataband connected to an frxdbdataset component?
if so is its properties set correctly.
Thanks, I appreciate your help. I wasn't in front of the computer when I wrote the previous reply - hence the vague version info. It's version 4.7.154, stable build.
The report is placed in a datamodule, with a public call interface for the main app to call, to display the report. Because the report is a master-detail-detail report, there are also some query parameters that need to be set, so the public interface sets those too. I've included the entire code below. Apologies for the large post - and the indentation doesn't work in quoted text so slightly harder to read.
The report works fine when pressing F9 in the report designer (invoked by double-clicking the report in the datamodule). So, presumably this means that the settings are set correctly?
Thanks very much - no need now. I've managed to make it work. I think the main issue was the writing of the InvoiceDate variable value as a string. For some reason, this yields the correct result when done in the script but not when done from the calling application.
I did notice another slight issue. If a field (in this case my "Period Ending ..." text field in the top right corner) is formatted as text (i.e. no formatting) and the date is displayed as 'mm/dd/yyyy', then instead of getting the date displayed, the field shows the result of dividing mm by dd and yyyy! Easily fixed by formatting the field as a date but unexpected nontheless.
Thanks for your help
-Niels
a string value in the variable must look like 'strvalue'
for your text memo turn off allow expressions.
btw when you have a long sample zip and post it in the binaries news group.
with a brief message either here or in the fr4 newsgroup.