Friday, March 23, 2012
how to incorporate data from more than one table(having no relation) in CR9
In there you have "Database Fields", you right click them and chose "Database Expert".
Then you chose meke new connection and you chose witch tables to import in your CR.
If the tables are in no relationship, thet is not a problem, you just won't be able to connect them together.
Afcourse CR will inform you about that, but just click OK a that should be it.
Afcourse if you don't get data from this tables (in code) you won't be able to show data.
Wednesday, March 21, 2012
How to Include months not in the records?
I have 2 tables created.
One is the Sale Persons (PersonID, PersonName) and the other is the Sales Detail (PersonID, Month, Year, TotalSales)
PersonID | PersonName PersonID | Month | Year | Total Sales
================== ==================================
ID1 | Sally ID1 | 1 | 2005 | 1000
ID2 | David ID2 | 2 | 2005 | 1500
Is it possible to write in a SQL statement to return all the sales person & the total sales for the 12 months for a particular year (even though some month data are not in the table)
I would like the result to be like the following:
PersonID | Month | Year | Total Sales
===================================
ID1 | 1 | 2005 | 1000
ID1 | 2 | 2005 | 0
ID1 | 3 | 2005 | 0
(For month 4 - 12) Total Sales will be 0 too as no records exist in the first place
ID2 | 1 | 2005 | 0
ID2 | 2 | 2005 | 1500
........
Do you have to do it in SQL or can you do it in code?|||
Create a temporary table using a sql proc or in code that contains the year(s) and months that you do want to include. Then you just have to OUTER join it to your existing tables to fill in the missing gaps.
HTH.
Sunday, February 19, 2012
How to hide subtotals if only 1 row in group?
Hello,
I have established a group so that I can provide subtotals following the presentation of the group's detail rows. I'm finding that many of the groups have only one row and my subtotals just echo what was already presented on the detail line. The overall effect is confusing to the user and a real vertical space-waster.
Can someone give me a technique or expression for hiding subtotals when the group size is 1 but showing subtotals when the group size is >= 2? If I hide the group when the group size is 1 row then the one detail row is hidden as well, no?
Thanks!
BCB
You can give your visibility the expression to count rows in that group and then False if more than 1|||But I just want to hide the subtotal line. Won't your approach hide the one detail line that belongs to the group as well as the group footer that contains the redundant subtotals?
Thanks.
|||Gotcha, another technique would be to make the font white or transparent by using the sae kind of expression....in this case you can determine exactly which text blocks you want to use
only problem is spacing issues
|||I'm, essentially, trying to do the same thing.
In my case, my report is a list of employees that can be generated for either full timers, part timers, or both.
I've set up a group on the full/part time field FT_PT. There is no group header, just a group footer.
When I generate the report for both I get:
Department Header
Full-Time Detail
FT_PT Group Footer
Part-Time Detail
FT_PT Group Footer
Department Footer
This is perfect.
When I generate it for, say, just Full-Time, I get:
Department Header
Full-Time Detail
FT_PT Group Footer
Department Footer
I don't want to see the FT_PT group footer. What I want is:
Department Header
Full-Time Detail
Department Footer
Gotta be a way to do this without having a blank line where the Full-Time Group Footer would be, isn't there?
How to hide subtotals if only 1 row in group?
Hello,
I have established a group so that I can provide subtotals following the presentation of the group's detail rows. I'm finding that many of the groups have only one row and my subtotals just echo what was already presented on the detail line. The overall effect is confusing to the user and a real vertical space-waster.
Can someone give me a technique or expression for hiding subtotals when the group size is 1 but showing subtotals when the group size is >= 2? If I hide the group when the group size is 1 row then the one detail row is hidden as well, no?
Thanks!
BCB
You can give your visibility the expression to count rows in that group and then False if more than 1|||But I just want to hide the subtotal line. Won't your approach hide the one detail line that belongs to the group as well as the group footer that contains the redundant subtotals?
Thanks.
|||Gotcha, another technique would be to make the font white or transparent by using the sae kind of expression....in this case you can determine exactly which text blocks you want to use
only problem is spacing issues
|||I'm, essentially, trying to do the same thing.
In my case, my report is a list of employees that can be generated for either full timers, part timers, or both.
I've set up a group on the full/part time field FT_PT. There is no group header, just a group footer.
When I generate the report for both I get:
Department Header
Full-Time Detail
FT_PT Group Footer
Part-Time Detail
FT_PT Group Footer
Department Footer
This is perfect.
When I generate it for, say, just Full-Time, I get:
Department Header
Full-Time Detail
FT_PT Group Footer
Department Footer
I don't want to see the FT_PT group footer. What I want is:
Department Header
Full-Time Detail
Department Footer
Gotta be a way to do this without having a blank line where the Full-Time Group Footer would be, isn't there?