I am trying to format the output of my data in crystal reports 2008. Currently, you can see in the picture that the data is in the top left of the cell. I am trying to have the data appear on the bottom left hand spacing of the cell, instead of top left hand side, for gldesc. Is there a way to do this?
Thank you.
Create a Formula with that field, by calling that data field in that formula. Then in the section place a text object and place the forumla where you wish in that text object. Hope this helps.
Ok, after examining the problem further, I realized that I was making this too hard, and all you have to do is drag and drop, to place the formulas/items where you would like them to be.
I was going to delete this question but I decided to answer it and share how I fixed it incase someone else has this question along the way.
Related
Sorry for no code sample, I can try to get a small sample at some point. But hoping someone has seen this behavior before.
I have a DHTMLxGrid (3.0) that was created from an HTML table. The column widths are set using grid.setColumnWidthsP. When you click on the header to sort the columns, it continually expands the widths of most of the columns. If I remove the setColumnWidthsP and allow the grid to calculate the widths, it works fine. Another issue that might be tied to it, the sort image never appears. Again both items work fine if the column widths are not set by percentages.
Please, check width of your HTML table. if it has the relative sizes it may expand to the parent.
If the problem still occurs for you please, provide any kind of snippet or a complete demo, where the problem can be reconstructed.
You can also try to create a snippet here:
https://snippet.dhtmlx.com/5/
The main method I have for altering the formatting of the final reports is in SQL Server Report Builder.
I have a table within this system which currently is as shown below with some information blacked out.
As shown currently the second line (as shown by 004A) of groupings (referred to as a subsample) comes up with blank areas in the second, third, and fifth columns where the cells have been hidden.
This shading has been done with the following code:
=Iif(Left(Fields!LabSampleNo.Value,3) MOD 2 = 0, "WhiteSmoke", "Transparent")
Is there a way to fix this issue without having to go to coding outside the report builder or by making the fields no longer hidden?
Any help would be great.
As the textboxes are hidden you will not be able to see the backcolor. It is the entire textbox you are hiding, not just it's content.
So the answer to your question is no, you will have to make the textboxes visible again however you can just wrap your value expression inside the same logic as you used to hide the columns.
So, let's say you are hiding the columns based on the first column have non numeric characters and the column you wanted to hide was called myDataColumn then you could do something like...
=IIF(ISNUMERIC(Fields!myFirstColumn.Value), Fields!myDataColumn.Value, "")
Your row's background color expression would remain the same.
I'm creating a trial project wherein my window has two grids, left grid is sort of a table that has labels and textboxes each row and asks for a specific part of the invoice like item, name, address stuff like that and the right grid is to show a preview of the invoice that the left side is creating.
I thought about using a document viewer on the right side but I thought that anything I open there would be static and if I put values on the textboxes on the left grid, it wouldn't matter since I opened a standalone document to view on the right grid.
I thought about just creating a table out of the right grid and have the default values and populate the other ones when a user types something on the textbox and make it function as the preview but then I don't know how would I go about and printing it and also, it has about 45 rows which I couldn't fit in the grid without it being unreadable (because I had to cram 45 rows of data inside that small grid)
So is there a tool in the toolbox that could potentially create a interact-able grid? I tried the grid control but I can't seem to only make it show 4 columns because that's all I need, I don't want it to show E and the rest of the alphabet because I want it to resize accordingly with only 4 columns to make it more readable.
Oh and I also have devexpress installed so you guys could also recommend something I can use from there. Thank You.
I think this is the best solution since it does what I wanted it to do.
I created a scroll view and placed a grid inside it then set the length accordingly to show it in a reasonable size and let the scroll bar do its magic for me to see the rest of the grid without compromises of the content's size.
I would like to include an expression and an ssrs indicator based on the same expression in the same cell of a table.
I have tried doing the approach in the link shown :
http://social.msdn.microsoft.com/Forums/en-US/f5f19834-ba37-410c-bb7e-179807dfefea/indicator-value-in-same-cell?forum=sqlreportingservices
but the borders for that cell become invisible when I preview the report.
Please let me know if there is any other good way to do this which doesnt effect the borders.
my expression looks like this :
=Sum(Fields!Total_Sales.Value)/Sum(Fields!Products.Value)*100
My understanding of the issue, is that you want to show the value of the expression and the indicator in the same cell. I struggled with a similar issue a while back but settled with the following basic workaround. See below:
First create two columns, one with the expression and another with the indicator. It should look something like this:
Then change the border style of both cells to none but only for the left and right border. This will make it appear as if the cells are one in the same. The end result will look like this:
Its not perfect, but this should solve your problem. I hope it helps!
I have a report which displays customer address in multiple labels.
My customers use windowed envelopes for mailing. I need the address labels position to be configurable.
Something like, I'll have a database table which stores the Top/Left position of each label per customer. Based on this table, I need to position the address labels on my report.
I thought, it is doable by expressions, but Location property doesn't provides ability to set an expression and make the label's top and left dynamic.
Anybody, any ideas, on how to achieve this?
As you mentioned, you cannot set an expression for location property. I want to do this before but it seems that there is no solution for this work.
Sorry for the duplicate post
I had the same problem as you did. I got around the problem by using an old HTML trick. It involves using a transparent.gif in an image. You put your image (linked to the gif), then put your label on top. Using a parameter, you can toggle which item to appear by setting an expression in the hidden property for both controls.
As stated by others, it isn't supported. However, here are two ugly work around possible for basic reporting.
Work around with padding.
You can't set formula on the label's location, but you can use padding option instead.
So you can set the label as wide as the report and as tall as the region.
Also, set the label's horizontal alignment to "Left" and Vertical alignment to "Top".
Then, add a formula in left and top paddings to offset the text.
You can also achieve a right aligned offsetted label by setting the Horizontal alignment to "right" and using right padding instead of the left one to offset the field from the right. With the same recipe, you can offset from the bottom by using "bottom" vertical alignment and bottom padding.
The ugly side:
This method will create a mess in the report designer as all dynamic label will overlap each other and take all the space over static label. Also, please note that with this method, you won't be able to do fancy stuff like adding borders around the text and hyperlinks.
Work around with sub report.
If the number of different positions for the label(s) are really low. You can create a subreport for each possibility and use a formula to display the right subreport for the right case. Sadly, this doesn't work for labels in the header as subreport aren't allowed there.
No solution, as it is not supported!!!
From MS online community support...
"As far as I know, the position of the textbox in the report is static not dynamic, so it will not shift to left."
Reference: http://forums.asp.net/t/1433297.aspx