Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
BIRT 2.3 - Questions I couldn't find answer to
nuraniuscc
Hi,
I am new to BIRT 2.3 (Ope Source Version) and I have a few tech questions that needs to be resolved ASAP. Could you please call me at 608-441-4408 (9 - 6 CST) or reply back to this thread.
1) How do I create a Header that needs to have a variable TEXT
displayed based on a certain database value from the query. I also need
to be able to set the PAGEBREAK based on that.
i.e., Eg : If database field ABC has value 'X' Then Header should
display "Title 1", if value 'Y' Header should read "Title 2" and also BREAK
on this value by printing "Title 2" on the next page.
I have been researching etc and have used the mapping feature for that
HEADER field. But no luck.
2) How do I insert a BLANK line if a value of a particular field changes.
Eg: Dtl 1 A B C
A B C
A B C
A B Y
X Y Z
X Y Z
3) Page # of Total Pages is also something I am unable to resolve. I can't believe that the solution for this one is apparently not that easy.
Your help is much appreciated and I need to have the answers ASAP
Thanks
Nurani Sivakumar
608-441-4408 (Office)
Find more posts tagged with
Comments
mwilliams
Hi Nurani,
Are you using 2.3.0 or 2.3.1?
For question 1: Can you give me a better understanding of what your data looks like and what you want the end result to be.
For question 2: I'll try to use your sample section of data to come up with a solution to suggest for you.
For question 3: On the master page tab, you can insert a premade element from the palette that puts "page n of m" on your report. If this is not what you're wanting, let me know more of what you're looking for.
nuraniuscc
Hi Mike,
I am using opensource 2.3.0.
For question 1: What I want is, Say for Example, I am reading the datbase
and fetching a column called "Run Code". If the value is 'D' : The Header should read "Daily", 'W' : Weekly, "M" : Monthly. Also, I need to pagebreak on this value. Hope that explains better. I tried using the Mapping Data tab under
properties and it doesn't seem to effect anything.
I will try the solution for Question 3 and let you know. Thanks for your Help.
I really appreciate that.
Thanks
Nurani Sivakumar
mwilliams
Nurani,
Is your data sorted on this "run code" column when it comes in? Or are you grouping on this column? Or is the data coming in in a specific order that you just want it to page break when the value changes? If you can post a small sample of data how it looks in the dataSet and then show how you'd like it in the report, that would be a great help. Thanks.
nuraniuscc
Question # 3 : How do I exactly do that?
I have a Master Page Tab and It has nothing. I just have a box for the Footer. Also, How do I actually code the statement.
Is it "Page # of Total Pages"
Please explain.
Also, to answer your prior post, YES the data is Order by asc and Yes it's also in the Group BY on that column along with other columns.
Eg: Data will be coming in like this
A1 B1 C1 D1
A1 B1 C2 D1
A1 B1 C3 D1
A1 B1 C1 D2
A1 B2 C2 D2
A1 B3 C3 D2
So, the result I want is
Title 1
A1 B1 C1 D1
A1 B1 C2 D1
A1 B1 C3 D1
Title 2
A1 B1 C1 D2
A1 B2 C2 D2
A1 B3 C3 D2
All I am saying is, in this case if the last column value changes I want a different Header Title (on the fly) and also I need to PAGEBREAK on the change.
Thanks
Nurani Sivakumar
mwilliams
Nurani,
Here is a screenshot of the palette and the master page. This is from 2.3.1, but it is the same in 2.3.0. All you need to do is drag the item from the palette over to the footer of the report master page If you want to have the date in there as well, you'll just need to put a grid in the footer and put the date in once cell and the page n of m element in another.
Hope this explains a little better than I did before. I'll work on the other 2 questions and let you know what I find.
nuraniuscc
Hi Mike,
Looking at your JPEG file (Which is not clearly visible) and what I have, I don't see any of the options that you have.
On the master page, I got ot the footer and right click and under Insert I see all the options. But there is no Page related options. Is it something I add and if so how and from where.
Also, I see on your page that is folder that is opened up. Are you creating some kind of external file to pull the options in?
You and I are not on the same page. No Pun Intended.
Thanks
Nurani
mwilliams
Nurani,
In BIRT 2.3.0 it looks just like the screenshot I posted. Here is a sample report that has the auto text "page n of m" in the master page footer. If you select the "master page" tab in the design window and then select the "palette" in the top left window where your dataSource and dataSet are shown, you'll see the "page n of m" option. In this example, you'll be able to see how it shows in the footer.
mwilliams
You can also use something like 'pageNumber + " of " + totalPage' in a dynamic text box in your master page footer.
nuraniuscc
Page Number issue is working. Thanks for your help Mike.
2 more to go, for now
mwilliams
Nurani,
For question 2, if you're grouping by the particular column you want a space after if it changes, you can add an extra line to the group to cause there to be a space between that group and the next group.
mwilliams
Nurani,
For question 1, the easy part is the page break. If you use grouping, you can add a page break to the footer of the group you want the break after to "always". For the title, you could create a computed column in your dataSet that determines what the title should be and then use that field in the group header row. I haven't tested this, but at first thought, I don't see why it wouldn't work.
nuraniuscc
How do I create a "Variable" based Table/Grid?
Example :- If I want a 6 month report I need 6 columns and If I want a quarterly report I need 3 columns. The Month range is given as an Input.
So I do have that information based on which I retrieve the data.
Thanks
Nurani
mwilliams
Hi Nurani,
A crosstab could be an option, depending on your data. If there are just a few options like last 3, last 6, or last 12 months....you could create a table for each option and hide/show them based off of the parameter.
nuraniuscc
Just to Recap on all the Questions
Qn 1) I have added the "Page Break" Always in the Footer line. But How do I
check for the value. I did use the "map" functionality to the specific
value and convert or assign the "Text" to it. This did NOT work. So, I
need more specifics on this.
Qn 2) How do I create a BLANK line. I am not understanding your response to
this question. The data is fetched from a Database.
Thanks
Nurani Sivakumar
Note : I added another new question yesterday !!!!
nuraniuscc
Hi,
I have 3 input parameters and the user can choose a value "ALL" for each of them or plug in specific values.
Depending on Input entered I need to Build the Query to retrieve the data.
How do I build the Query? Please reply ASAP.
I read through other Posts and kind of understand...But I want to be very
specific for my case. Where Do I find the Parameters and Sub parameters.
Thanks
Nurani Sivakumar
mwilliams
Nurani,
Here is a sample report that will show you how to use groups to skip a line when the value changes (question 2) and how to use grouping and a computed column in your dataSet to create a dynamic title (question 1). This report was created in 2.3.0.
Hope this helps.
mwilliams
<blockquote class='ipsBlockquote' data-author="nuraniuscc"><p>Hi,<br />
<br />
I have 3 input parameters and the user can choose a value "ALL" for each of them or plug in specific values.<br />
<br />
Depending on Input entered I need to Build the Query to retrieve the data.<br />
<br />
How do I build the Query? Please reply ASAP.<br />
<br />
I read through other Posts and kind of understand...But I want to be very<br />
specific for my case. Where Do I find the Parameters and Sub parameters.<br />
<br />
Thanks<br />
Nurani Sivakumar</p></blockquote>
<br />
<br />
Nurani,<br />
<br />
Are the parameters cascading or just 3 separate parameters? Also, are the parameters required?
nuraniuscc
OK, Mike, How do I reference the Dynamic Title column? Should I code the expression in the Dymanic Title column or the data column. Please explain.
Any attachments of How you actually do it helps.
Thanks
Nurani
nuraniuscc
<blockquote class='ipsBlockquote' data-author="mwilliams"><p>Nurani,<br />
<br />
Are the parameters cascading or just 3 separate parameters? Also, are the parameters required?</p></blockquote>
<br />
<br />
Hi Mike,<br />
<br />
These are 3 different parameters (required) that the users can choose based on which the SQL query will change and so the report gets produced accordingly.<br />
<br />
So, Before I produce a report I need to be able to read the input parms and decide what to do.<br />
<br />
Thanks<br />
Nurani Sivakumar
mwilliams
Nurani,
In the example I posted with the dynamic title, you can see in the dataSet computed column section how I changed the value based on another value in the row. In the report, you then just group by some value that will all have the same dynamic title and just use the actual data item for the dynamic title column in the group header as you can see in the example. Let me know if this doesn't answer your question.
mwilliams
Nurani,<br />
<br />
This <a class='bbc_url' href='
http://www.birt-exchange.com/devshare/designing-birt-reports/535-using-in-like-clause-in-birt/#description'>post</a>
; from the devShare should help you with the parameter thing. If they choose "all", you can just do the base query statement with no "where" statement.
nuraniuscc
Hi Mike,
The "Post" that you referred to seems a little complicated. Is there a "Better" way to do it? I am sure there must be another way to have multiple parameters for my report.
Thanks
Nurani Sivakumar
nuraniuscc
Hi Mike,
Sorry, I am not seeing what you are asking me to check for. On the sample report that you attached, I see "Dynamic Title" as one of the "Columns" of the dataset. All I see , when I right click on Dynamic Title is the "Data Binding" window.
Maybe, make it step by step so it's easy to follow.
Is there any way we can talk over the phone?
Thanks
Nurani Sivakumar
mwilliams
Nurani,<br />
<br />
Here's an <a class='bbc_url' href='
http://www.birt-exchange.com/devshare/designing-birt-reports/338-birt-parameters-using-in-clause/#description'>example</a>
; from the devShare that uses the IN clause to pass multiple values in a single parameter. You'll have to do something like this for all 3 parameters if you want to allow them to select multiple values in the parameters.
nuraniuscc
The example that you provided is an XML document.
mwilliams
Nurani,
The example from the devShare that I posted is a report design created in 2.2.0. As long as your version of BIRT is newer than that, you should be able to save it in your workspace and run the report with no problems.
nuraniuscc
Hi Mike,
What I need is based on the input parameter which can a month range
eg : Jan 08 - July 08, I need to be able to have 7 columns each with a heading for each month.
1) How do I count the number of months between those 2 dates in BIRT?
2) Also, the Dynamic Header issue is so confusing. Again, How do I get the
value to the individual headers
I am using a Grid (Instead on Cross Tab) and I am hoping I can hide the columns based on the input.
Jan - Jul 2008 is the input param. Report should look like below.
Col a Col b Resolution Days
Jan 08 Feb 08 Mar 08 Apr 08 May 08 Jun 08 Jul 08
XYZ ABC 27 22 20 19 7 11 22
Thanks
Nurani SivaKumar
mwilliams
Nurani,
If you're using a crosstab and an input parameter that limits the data to certain dates, the crosstab can be set up to display exactly how you're talking about by displaying it at the month level. See the attached report design that was created in BIRT 2.3.0.
The way I did the headers in the example from the past post was to use the data element in the group header of a table to act like a label while it's actually just a data element. Without knowing your report design exactly, I don't know that that way will work for you.
nuraniuscc
How do I drag and Drop the columns on to the Report Detail Line. The Table is pointing to the proper dataset. I know there is another place to make sure that the right Dataset name is assigned. I don't remeber where it is.
I have the query which reads the input parms and then gets the data. So. currently when I go to the dataset and underneath the report name if I click on the "+" to open I don't see anything.
Thanks
Nurani Sivakumar
mwilliams
Nurani,
You can check if the table is bound to the correct dataSet by selecting the table then going to the binding tab where the property editor is and checking there. As for dragging columns into the table. You should be able to do that from the data explorer in the top left corner of your designer. Expand the dataSet and drag the fields over.