FastReport 5 Master/Detail band print master on new page - delphi

I created a report with a master band and a detail band, both connected to datasource and table. The 2 tables are master/detail. The first table(Table1) has 1 record and the second(Table2) has 2 records. Now I can print one page for each record in Table2, but the master band is only on the first page. I need to print the master band on the second page too. Is there a way to do this?
I'm using Delphi XE8 and FastReport 5. I used to do it in Rave and Delphi 7 but I can't find how to do it with FastReport.

Ok what you can do is, is loop through the records and generate one report for each row and then concatenate the reports together with preparereport(False) and then once you have have all the reports made you can just use Showpreparedreport

Related

How to merge fields and vertical lines in details section

I am working on web based application using Visual Studio 2019 Preview with SAP Crystal Reports 2016 Support Pack 7.
The report consists of 20 columns in single row. There is a requirement to show two fix headings in details section.
Report Design:
What I want is to set the first heading in first row then list records from database then set other heading and print rest of the records by merging the fields and lines of first and second heading in details sections (similar to excel “Merge Cells Function”). Heading value is set in first column but since the width of first column is too short it is not visible and looks ugly.
Current Output:
Desired Output:
The number of records between first and second heading are not fixed and fetch from database.
In addition, since there are too many columns in single row not all columns are visible in printing. Could anyone advice how to fix them while printing?
Thanks
Group the report based on the logic of how you wish to separate the 2 groups of records.
Then, use a Group Header section to present the information you need at the top of each group.
note: if you are not familiar with Crystal, you Group by using
Insert, Group
or Report, Group Expert

Delphi FastReports - How to change Rows?

Delphi Tokyo, FastReports V5. I have a report that I cannot seem to get correct. The report is showing information for 1 sales rep. It contains two Master Data bands and 1 detail data band. Within Delphi, the pseudo code looks like this:
For each sales rep in table
Get Rep ID
Filter ActiveOrders DataSource based on rep ID
Load report definition
Execute report
Export Report to PDF
Next Sales Rep
This works fine for a simple report, such as one that only has a single MasterData band. My report is a little more complex. Specifically, it has two MasterData bands, which are only slightly related. The first band works fine with the pseudo code above. The second band is ONLY a graph. The graph has 4 datasources, because each datasource is tied to a series (aka each datasource adds a different line to the graph). I cannot figure out how to handle the coordination of the data.
My report looks like this.
As an example... the rep is Bob. Bob has 6 active orders, which shows up fine in the top MasterData band, as 6 rows of data. Of those 6 active orders, there are 3 separate companies. I want a graph of each company (in MasterData2). Below each graph, I want detailed data about the orders for that company. I want this to show up as
Graph of Company 1
Details of Company 1
Graph of Company 2
Details of Company 2
Graph of Company 3
Details of Company 3
I can write the queries to get the correct data. I just can't figure out HOW to coordinate the data changing. Since the MasterData2 is a graph, I can't return the data for all 3 companies, or FastReports will try to graph all the rows. How do I tell MasterData2 WHICH data to look at, and how do I tell it that there are more companies to graph (aka another Master/Detail) set to process?

Pentaho Report integration in Grails web Application

Pentaho RD version : 5.2.0.0-209
Requirement Show / Hide Fields in Pentaho Report Based on User Input
I have a requirement that invisible elements on the report should not consume any space in row or column.
so i use the banding element and the functionality formula to 'invisible consumes space'
I have used two bands one within another, with different layouts 'row' and 'block' to remove both spaces for invisible elements (in rows and columns).
Note It is giving appropriate result and working fine in Pentaho Report Desinger tool itself while updating Query to fetch any field either col1,col2 etc...
But Integration that .prpt report in Grails, it stil shows the "Invisible Consumes Space" in row and column both.
Please help me to remove both spaces for invisible elements (in rows and columns) while integrating the Report to Grails or any web application

Multi table report viewer

I have a stored procedure with two parameter who returns 3 tables, In report viewer I can see only first table from SP query, is there a possibility to return all 3 tables from SP query into report?
I'm currently using VS 2010
Thanking you in advanced for your help,
Gogolo

Crystal Reports 11 - How to print different data on multiple pages

I have a shipping label that needs to print on a Dymo Label printer with slightly different data on each of 3 pages. Can this be done with just one .rpt so the users only need to print one report, rather than three?
It's been a while since I've used Crystal Reports, but you can setup your .RPT to have three detail sections (A/B/C) and have B and C "print new page before". That way each detail will be on three separate sections.
You shouldn't need to do anything crazy with custom formulas. All you need to do is display each piece of data three times, one on each page, with each page being slightly different.
(Of course you could use a header and just put the changing data in the details section... but that will take more time to get right then just repeating the required data in each data section.)
Confirmed
Open your report
Right-Click on the Details secton
Select "Insert Section Below"
Repeat steps 2 & 3 twice
Confirm that you see three Detail Sections
Use "Section Expert" (or Visual Studio Properties) for sections A & B and select "New Page After". (If using Section Expert, be sure you are on the Paging tab.)
Create the desired content in each Detail Section.
You probably want to Suppress all other sections, including Report/Page Headers & Footers.
.RPT Detail Section Setup
Section Expert
You have two basic methods.
You can use groups and use the option to start a new page for the group when it changes. The other option is to use subreports, but I would avoid this option. If you want me to elaborate, please let me know.
If you can get your data to repeat three times, so each 'record' for your report is duplicated you could do something with multiple details sections (from the section expert create three details sections)
And then use the 'Supress (No Drill-Down)' with a formula to show each version of the label in turn, depending on the record number.
For each details section add the formula (using Basic Syntax)
formula = (Remainder(RecordNumber,3) <> 1)
formula = (Remainder(RecordNumber,3) <> 2)
formula = (Remainder(RecordNumber,3) <> 0)
Then create each slightly different label on each of the thee details sections.
I managed to get the three data rows by doing a cross join like so (in SQL Server) assuming a table with the data called ReportData
;with cte as
(
select 1 as ver
union
select 2 as ver
union
select 3 as ver
)
select * from
cte cross join ReportData
order by OrderNumber, ver;

Resources