Dynamic Subreport Problems
i've report layout on my end user report sollution like below here,
Subreport Dynamic Subreport ...Max 4 Month/Page
| |
V V
----------------------------------------------------------...
| January |...
Item Group |--------------------------------|...
| Qty | % Qty | Amount | % Amt |
----------------------------------------------------------...
01 FRESH JUICE | 10 | 5 % | 70,000 | 3 % |
... ... ... ... ...
---------------------------------------------------------
rules :
- Maximum 4 Month/Page.
- if the month range count choosed by user is more then 4 then it will be
printed on next page.
- All report components are in Header Band.
i've defined 2 queries : one for Item Group Subreport, and other for
month subreport.
there are parameters on each query: StoreID and Month Range
my questions :
1. can i use 1 query for dynamic subreport (Month Range)? i thinks there'
s very difficult.
2. if not, should i generate multiple queries and multiple month
subreport depending on month range?.
3. or i must create 4 queries(because max 4 months in one page), and set
parameter for next page after current page printed?.
4. how to duplicate sub report via rap code?
5. ????
Thanks,
MFR
--------
D5 Ent
RB 7.04
--------
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
This discussion has been closed.
Comments
A good rule of thumb to use when designing report is to do as much data
processing you can before the report generates as possible. From looking at
your requirements below, I would create a two query report with a master
detail relationship on the month, then have a single subreport inside your
report that shows the data for each month.
Why is this necessary?
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
this sollution (master detail relationship) was in my mind, but the report
layout that i want is from left to right (horizontal) not from top to down
like master-detail act.
so the report layout that i want it like this :
Item Department | Month1 | Month2 | Month 3 |... and so on.
cause when i place the components like subreport on detail band, it not
printed.
i'm still on trying to solve this problem.
thanks
MFR
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
detail band to LeftToRight traversal.
This should not be the case. Which version of ReportBuilder are you using?
Items placed in the detail band should print the same as items placed in any
other band.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
became like this
:
----Detail Band Of Main Report----------------------
< Item Department > < MasterPeriod >
----Detail Band Of MasterPeriod-----
< DetailPeriod >
------------------------------------
-----------------------------------------------------
- i wrote "Report.DetailBand.ColumnTraversal:=ctLeftToRight;" routine, and
place it on
OnPrint event of MasterPeriod SubReport, but the DetailPeriod SubReport
not printed.
- where is i must place thats routine on?
- Can you give me sample code to do this via RAP?
- sorry this is my mistake, i set childtype of subreport to Fixed, but how
could this happened?
- i thinks if there is Object Inspector exist in report designer
environtment on runtime,
thats great.
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
You can set the DetailBand.ColumnTraversal property at design time from the
Delphi Object inspector. There is no need to set this in code unless you
are switching between traversal types.
We added an object inspector to the ReportBuilder designer for ReportBuilder
9. This can be activated by selecting the Report Tree option from the View
| Toolbars main menu in the designer.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I want to apply this setting to this report only in my end user report
sollutions.
i dont want to apply this setting to other reports already works.
i'm using Delphi 5 Ent, RB 7.04.
i create other project to test this case with 2 query linked by master
detail relations.
the layout is like this :
- Query1 MasterProductItem(ItmCode, ItmDesc)
- Query2 DetailSoldProduct(StoreID, Date, ItmCode, Qty, Price)
- Query1 and Query2 Linked By ItmCode Field.
- Set Main Report DataPipeline to MasterProductItem
- Main Report Group By ItmCode
- Put DetailSoldProduct subreport in the detail band of MainReport.
- Set DetailBand.ColumnTraversal property of MainReport DetailBand to
ctLeftToRight
- By Default, DetailSoldProduct Subreport type to Child
My Questions :
1. When i preview report DetailSoldProduct Subreport not printed, so i
changed SubReport type to Section, it works, why?.
2. Why Tips page of DM Web Site not Browsable?
3. if there is Code Completion and many features on RAP Code Editor like
on Delphi Editor, thats will be very nice.How do you think about this?
Thanks,
Fathur
sure the detail dataset is returning data for each master. If for instance
there is no data for a master record, you will need to adjust the
NoDataBehaviors property of the subreport to see anything. Also, note that
you will need to create a number of columns in order to traverse left to
right properly. This can be done with the Report.Columns property.
2. This is something we are working to provide in the future.
3. Thanks for the suggestion. You can use the code toolbox in the lower
right corner to drag items to the code editor to make coding in RAP easier
and quicker.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Sorry the internet connection on my work place has broken for a few days.
how to sets NoDataBehaviors property of subreport at runtime?because i've
got an error messages.
when i look into properties toolbox of subreport, i found no existing
NoDataBehaviors properties.
i work on my other project, sets Report.columns property of
subreport to 4.
Firstly it not works, after stretching Detail Band of , its
printed, but summary band of not printed.
the query relations layout is -> ->
the illustration of report like below here,
---DetailBand of -----
SubReport Of
----------DetailBand of ------------
SubReport of
------------------------------------------
-----------------------------
My questions :
- after set Columns property value to 4 on Detail Band of Subreport
, property PrintHeight changed to phStatic. what if amount of data
is greater than Detail Band can display?
Thanks,
MFR
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
sure to add ppTypes to your uses clause.
A dynamic detail band is not supported for left to right columns in
ReportBuilder.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com