Hello, I am new to Visual Studio and Infragistics reporting.
I've created a view from my database and am able to see data from my SQL database but I have what I consider basic questions:
1. In my report I want to make the first page header unique as I want to show company information as well as the report header labels. On the 2nd and subsequent pages I just want to show the labels at the top of the page. How do I make the first page header unique? Or is it possible to have the report header and page header on the same page?
2. I see a control for a horizontal line but I want to create a vertical line as I want to draw a "box" around each row of data (3 lines on the page for each row of data). How do I create a vertical line?
3. How do I show a counter so I put a 1 beside the first row of data and 2 beside the 2nd row and so on?
Thanks!
Hello Andy,
You have many ways to design the report in order to create the report you want. Now I'm going to answer one by one your questions:
1- We are trying to understand the scenario you want to draw. Could you send us a description of what headers should be displayed and in which order? Maybe you could use a SummaryHeader to suit your needs.
2- You can use a table control to resolve this requirement. Here you can design the report in many ways. Please see the attached image to see one posible solution.
3- You need a field with that values, and then use them as any field in the report. If you use an SQL Data source, you have to modify the query to add that field in the select statement (e.g. "SELECT row_number(), columns... FROM tables.." ) . If you use an object data source, you have to add a property to the class returned by the ODS method.
"SELECT row_number(), columns... FROM tables..
hope this helps
Simon
Thanks for your quick answer Simon! You've taken care of item number 3 for me!
1. Page Header. As a quick example I want page 1s header to say "THIS IS PAGE ONE". and the header for subsequent pages to say "THIS IS PAGE TWO OR BEYOND PAGE TWO". (In other words I want page 1s header to be unique and page 2 and beyond headers to have similar layouts)
2. I will investigate using table controls but it may take several days to get back to you.
3. THANKS! Good solution!
Andy
Hi Andy
1- You can use an expression like the following in the Label Text property:
= if (CurrentPage = 1, "Page Header of Page 1", "Page Header of Page > 1")
If you prefer show/hide the content of the labels, you can use the Foreground property, and bing the color to "Black" or "Transparent":
= if (CurrentPage = 1, "Transparent", "Black")
You may want binding the Visibility property of the controls to show/hide them, but when the controls are placed in a Page Header section, or when they are placed in a section that has Repeat On Every Page = True, the reporting engine set the Visibility property to True or False once at the beginning (when rendering the first page) and won't change its value after that. Other properties, like Text or Foreground color can have bindings to expressions that contain CurrentPage, and will work as everyone expected.
2- It won't take that long. It's very easy ;) and if you have questions on how to use it please ask us. For a reference on how to use it see this link.
3- Here a link for better understanding
hope it helps!